All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix umount.nfs exit status
@ 2007-07-14  9:18 Steinar H. Gunderson
  2007-07-16  0:59 ` Neil Brown
  2007-07-16 17:07 ` Chuck Lever
  0 siblings, 2 replies; 3+ messages in thread
From: Steinar H. Gunderson @ 2007-07-14  9:18 UTC (permalink / raw)
  To: nfs

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>

Index: nfs-utils-1.1.0/utils/mount/mount.c
===================================================================
--- nfs-utils-1.1.0.orig/utils/mount/mount.c
+++ nfs-utils-1.1.0/utils/mount/mount.c
@@ -371,7 +371,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] == '-') {

/* Steinar */
-- 
Homepage: http://www.sesse.net/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-16 17:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-14  9:18 [PATCH] Fix umount.nfs exit status Steinar H. Gunderson
2007-07-16  0:59 ` Neil Brown
2007-07-16 17:07 ` Chuck Lever

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.