Skip to contentSkip to conversation

mount.nfs: add EX_SUCCESS exit code

PATCH In review Chuck Lever 1 participant 1 message Sep 17, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/10 mount.nfs: add EX_SUCCESS exit code

We've had some recent trouble, especially in the umount code, that appears to be due to functions returning a 1 or a 0 return code when they should be returning a mount exit code (such as EX_FAIL) or a 0.

To help clearly distinguish these two classes of functions, define an EX_SUCCESS exit code, which is equal to zero.

---

 support/include/xcommon.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
support/include/xcommon.h +1 -0
index 9e23d12..d1a4b18 100644
@@ -36,6 +36,7 @@ extern void die(int err, const char *fmt, ...);
 extern void (*at_die)(void);
 
 /* exit status - bits below are ORed */
+#define EX_SUCCESS	0	/* no failure occurred */
 #define EX_USAGE	1	/* incorrect invocation or permission */
 #define EX_SYSERR	2	/* out of memory, cannot fork, ... */
 #define EX_SOFTWARE	4	/* internal mount bug or wrong version */

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs