diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/mount/mount.c | 3 | ||||
-rw-r--r-- | utils/mount/nfsumount.c | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/utils/mount/mount.c b/utils/mount/mount.c index 71a8737..9ae66f0 100644 --- a/utils/mount/mount.c +++ b/utils/mount/mount.c @@ -350,6 +350,7 @@ int main(int argc, char *argv[]) spec = argv[1]; mount_point = argv[2]; + argv[2] = argv[0]; /* so that getopt error messages are correct */ while ((c = getopt_long (argc - 2, argv + 2, "rt:vVwfno:hs", longopts, NULL)) != -1) { switch (c) { @@ -448,7 +449,7 @@ int main(int argc, char *argv[]) if (mount_point == NULL || mount_point[0] != '/') { fprintf(stderr, "%s: unknown mount point %s\n", - progname, argv[2]); + progname, mount_point ? : ""); exit(1); } diff --git a/utils/mount/nfsumount.c b/utils/mount/nfsumount.c index e101105..81d0d3a 100644 --- a/utils/mount/nfsumount.c +++ b/utils/mount/nfsumount.c @@ -288,6 +288,7 @@ int nfsumount(int argc, char *argv[]) argv += 1; argc -= 1; + argv[0] = argv[-1]; /* So that getopt error messages are correct */ while ((c = getopt_long (argc, argv, "fvnrlh", umount_longopts, NULL)) != -1) { |