Return correct exit status for umount.nfs.
authorNeil Brown <neilb@suse.de>
Fri, 16 Mar 2007 05:46:27 +0000 (16:46 +1100)
committerNeil Brown <neilb@suse.de>
Fri, 16 Mar 2007 05:46:27 +0000 (16:46 +1100)
nfsumount() returns 1 for success and 0 for failure.
Take proper account of this when producing an exit
status.

utils/mount/mount.c

index 6717941..639ff4b 100644 (file)
@@ -295,7 +295,7 @@ int main(int argc, char *argv[])
                        umount_usage();
                        exit(1);
                }
-               return(nfsumount(argc, argv));
+               exit(nfsumount(argc, argv) ? 0 : 1);
        }
 
        if ((argc < 2)) {