Print this page
6727 lofiadm: remove "o:" from getopt argument
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/lofiadm/main.c
          +++ new/usr/src/cmd/lofiadm/main.c
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   * Copyright 2012 Joyent, Inc.  All rights reserved.
  25   25   *
  26   26   * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  27   27   * Copyright (c) 2014 Gary Mills
       28 + * Copyright (c) 2016 Andrey Sokolov
  28   29   */
  29   30  
  30   31  /*
  31   32   * lofiadm - administer lofi(7d). Very simple, add and remove file<->device
  32   33   * associations, and display status. All the ioctls are private between
  33   34   * lofi and lofiadm, and so are very simple - device information is
  34   35   * communicated via a minor number.
  35   36   */
  36   37  
  37   38  #include <sys/types.h>
↓ open down ↓ 1787 lines elided ↑ open up ↑
1825 1826          token_spec_t *token = NULL;
1826 1827          char    *rkey = NULL;
1827 1828          size_t  rksz = 0;
1828 1829          char realfilename[MAXPATHLEN];
1829 1830  
1830 1831          pname = getpname(argv[0]);
1831 1832  
1832 1833          (void) setlocale(LC_ALL, "");
1833 1834          (void) textdomain(TEXT_DOMAIN);
1834 1835  
1835      -        while ((c = getopt(argc, argv, "a:c:Cd:efk:o:rs:T:U")) != EOF) {
     1836 +        while ((c = getopt(argc, argv, "a:c:Cd:efk:rs:T:U")) != EOF) {
1836 1837                  switch (c) {
1837 1838                  case 'a':
1838 1839                          addflag = B_TRUE;
1839 1840                          if ((filename = realpath(optarg, realfilename)) == NULL)
1840 1841                                  die("%s", optarg);
1841 1842                          if (((argc - optind) > 0) && (*argv[optind] != '-')) {
1842 1843                                  /* optional device */
1843 1844                                  devicename = argv[optind];
1844 1845                                  optind++;
1845 1846                          }
↓ open down ↓ 212 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX