]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
mount.nfs: Fix for the bug in v1.2.4 that breaks mount.nfs
authorPrem Karat <prem.karat@linux.vnet.ibm.com>
Thu, 30 Jun 2011 11:29:20 +0000 (07:29 -0400)
committerSteve Dickson <steved@redhat.com>
Thu, 30 Jun 2011 12:59:22 +0000 (08:59 -0400)
commit 30ebf047 failed to include these changes that breaks mount.nfs.
mount.nfs will continue to work fine with these changes

Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/mount.c

index 62115bbdbfe579828e92e211670e6f477cd96380..eea00afe2679f28e3e4f10ea11c0553f5f51f712 100644 (file)
@@ -385,14 +385,6 @@ int main(int argc, char *argv[])
        if(!strncmp(progname, "umount", strlen("umount")))
                exit(nfsumount(argc, argv));
 
-       if (argv[1] && argv[1][0] == '-') {
-               if(argv[1][1] == 'V')
-                       printf("%s ("PACKAGE_STRING")\n", progname);
-               else
-                       mount_usage();
-               exit(EX_SUCCESS);
-       }
-
        if ((argc < 3)) {
                mount_usage();
                exit(EX_USAGE);
@@ -400,8 +392,7 @@ int main(int argc, char *argv[])
 
        mount_config_init(progname);
 
-       argv[2] = argv[0]; /* so that getopt error messages are correct */
-       while ((c = getopt_long(argc - 2, argv + 2, "rvVwfno:hs",
+       while ((c = getopt_long(argc, argv, "rvVwfno:hs",
                                longopts, NULL)) != -1) {
                switch (c) {
                case 'r':