mount.nfs - make sure program name in error message is correct.
[nfs-utils.git] / utils / mount / nfsumount.c
index e101105..81d0d3a 100644 (file)
@@ -288,6 +288,7 @@ int nfsumount(int argc, char *argv[])
        argv += 1;
        argc -= 1;
 
        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) {
 
        while ((c = getopt_long (argc, argv, "fvnrlh",
                                umount_longopts, NULL)) != -1) {