Print this page
4833 Remove volrmmount
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/rmformat/rmf_menu.c
          +++ new/usr/src/cmd/rmformat/rmf_menu.c
↓ open down ↓ 9 lines elided ↑ open up ↑
  10   10   * See the License for the specific language governing permissions
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20      - */
  21      -/*
       20 + *
       21 + *
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright 2014 Andrew Stormont.
  24   26   */
  25   27  
  26   28  /*
  27   29   * rmf_menu.c :
  28   30   *      Command line options to rmformat are processed in this file.
  29   31   */
  30   32  
  31   33  #include "rmformat.h"
  32   34  #include <sys/smedia.h>
  33   35  #include <priv_utils.h>
↓ open down ↓ 267 lines elided ↑ open up ↑
 301  303   * This options should not be used for floppy. However,
 302  304   * if this option is used for floppy, the option will
 303  305   * be forced to SM_FORMAT_HD and smedia_format is called.
 304  306   * Note that smedia_format is a blocked mode format and it
 305  307   * returns only after the complete formatting is over.
 306  308   */
 307  309  
 308  310  static void
 309  311  process_F_flag(smedia_handle_t handle, int32_t fd)
 310  312  {
 311      -        uint32_t format_flag;
      313 +        uint32_t format_flag = 0;
 312  314          int32_t old_per = 0;
 313  315          int32_t new_per, ret_val;
 314  316  
 315  317          if (force_format) {
 316  318                  (void) fprintf(stderr,
 317  319                      gettext("Formatting disk.\n"));
 318  320          } else {
 319  321                  (void) fprintf(stderr,
 320  322                      gettext("Formatting will erase all the data on disk.\n"));
 321  323                  if (!get_confirmation())
↓ open down ↓ 86 lines elided ↑ open up ↑
 408  410  /*
 409  411   * List removable devices.
 410  412   */
 411  413  static void
 412  414  process_l_flag()
 413  415  {
 414  416          int retry;
 415  417          int removable;
 416  418          int total_devices_found_last_time;
 417  419          int defer = 0;
 418      -        char *tmpstr;
      420 +        char *tmpstr = NULL;
 419  421  
 420  422  #define MAX_RETRIES_FOR_SCANNING 3
 421  423  
 422  424          vol_running = volmgt_running();
 423  425          if (vol_running)
 424  426                  defer = 1;
 425  427          (void) printf(gettext("Looking for devices...\n"));
 426  428          total_devices_found_last_time = 0;
 427  429  
 428  430          /*
↓ open down ↓ 781 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX