X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fmount.c;h=9ae66f070503dc9db3b6a3107f983ef34a1fb546;hp=71a87375868322c3dacebf86f92b5a0cad16adb5;hb=b8b6a251c372b134e66d0f436bf2c6231cc1c055;hpb=4bc447f758ee4d64706b990ac68cb766dbff113c 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); }