diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-07-28 17:49:28 -0400 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-07-30 16:11:00 +1000 |
commit | d98b797653f1a021c4d157c8dd09d2b732e522da (patch) | |
tree | 2db45859d0e2f69d6f3331984c67edaae46a998a | |
parent | a574c7558e33f172b6dfee53ee8df9e59c84c7b5 (diff) | |
download | nfs-utils-d98b797653f1a021c4d157c8dd09d2b732e522da.tar.gz nfs-utils-d98b797653f1a021c4d157c8dd09d2b732e522da.tar.xz nfs-utils-d98b797653f1a021c4d157c8dd09d2b732e522da.zip |
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 <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
-rw-r--r-- | utils/mount/nfsumount.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/mount/nfsumount.c b/utils/mount/nfsumount.c index aa68dee..ae2b2d2 100644 --- a/utils/mount/nfsumount.c +++ b/utils/mount/nfsumount.c @@ -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"); |