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>
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 == '/')
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");