X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fnfsumount.c;h=a0fe78ea1cd52456bd6cbdce784fa5846a87ac80;hp=aa68deeb83b2c9e32a8c0a91b317a24647c0b93a;hb=d32d65025276630e2f38bf8dc56eef630fcf09e7;hpb=5835b1eec5a1f1e463c0762c510c6643fa2bff62 diff --git a/utils/mount/nfsumount.c b/utils/mount/nfsumount.c index aa68dee..a0fe78e 100644 --- a/utils/mount/nfsumount.c +++ b/utils/mount/nfsumount.c @@ -200,7 +200,6 @@ int _nfsumount(const char *spec, char *opts) pmap->pm_prog = MOUNTPROG; pmap->pm_vers = MOUNTVERS_NFSV3; - pmap->pm_prot = IPPROTO_TCP; if (opts && (p = strstr(opts, "mountprog=")) && isdigit(*(p+10))) pmap->pm_prog = atoi(p+10); if (opts && (p = strstr(opts, "mountport=")) && isdigit(*(p+10))) @@ -281,17 +280,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 +318,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");