]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Fix umount.nfs exit status
authorSteinar H. Gunderson <sesse@debian.org>
Sat, 14 Jul 2007 09:18:48 +0000 (11:18 +0200)
committerNeil Brown <neilb@suse.de>
Mon, 16 Jul 2007 00:58:57 +0000 (10:58 +1000)
Hi,

As per a bug report from a user:

mount.c seems to assume that nfsumount() uses standard C true/false
return values, and inverts them for the exit status (where 0 is
traditionally considered success). However, nfsumount() consistently
seems to use 0 for success, and thus a success gets returned as exit
status 1 and a failure as exit status 0. This confuses at least
the GNOME drive manager applet, and probably others as well.

Signed-off-by: Steinar H. Gunderson <sesse@debian.org>
Signed-off-by: Neil Brown <neilb@suse.de>
utils/mount/mount.c

index 442ce0ea034bcefd025b0dad6cd1faac248621a7..17c79e452e9f30ce9315be8ea9868c00c6b7486c 100644 (file)
@@ -399,7 +399,7 @@ int main(int argc, char *argv[])
                        umount_usage();
                        exit(1);
                }
-               exit(nfsumount(argc, argv) ? 0 : 1);
+               exit(nfsumount(argc, argv));
        }
 
        if(argv[1] && argv[1][0] == '-') {