umount.nfs: some umount.nfs error return codes are confusing
Subsystems (2)
PATCH 4/23 umount.nfs: some umount.nfs error return codes are confusing
umount.nfs should return the standard EX_ mount return codes. At some point in the past, it was returning 0 for failure and 1 for success, and some of these have been changed and some haven't. See if we can rectify this.
Signed-off-by Chuck Lever <[email protected]>
---
utils/mount/nfsumount.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
utils/mount/nfsumount.c +5 -5
@@ -281,17 +281,17 @@ int nfsumount(int argc, char *argv[])case 'h' :default :umount_usage (); -return 0 ; +return EX_USAGE ; } }if (optind != argc) {umount_usage (); -return 0 ; +return EX_USAGE ; }if (spec ==NULL || (*spec !='/' &&strchr (spec,':' ) ==NULL )) { -printf (_ ("umount: %s: not found\n" ), spec); -return 0 ; +nfs_error (_ ("%s: %s: not found\n" ), progname, spec); +return EX_USAGE ; }if (*spec =='/' )
@@ -319,7 +319,7 @@ int nfsumount(int argc, char *argv[]) only_root:nfs_error (_ ("%s: You are not permitted to unmount %s" ), progname, spec); -return 0 ; +return EX_USAGE ; }if (hasmntopt (&mc->m,"users" ) ==NULL ) {char *opt =hasmntopt (&mc->m,"user" );
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs