]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/nfsumount.c
umount.nfs: some umount.nfs error return codes are confusing
[nfs-utils.git] / utils / mount / nfsumount.c
index aa68deeb83b2c9e32a8c0a91b317a24647c0b93a..ae2b2d201fe41df575ff5c46e97995bd750dc577 100644 (file)
@@ -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");