]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
umount: allways return MOUNT_EX_*
authorKarel Zak <kzak@redhat.com>
Tue, 13 Nov 2012 15:50:02 +0000 (16:50 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 13 Nov 2012 15:50:02 +0000 (16:50 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/umount.c

index 196a511ba6c421ecef0f2331761719d7b9084412..b0031026d695ce3ad0040dd14bb08b21670b833d 100644 (file)
@@ -260,7 +260,7 @@ static int umount_all(struct libmnt_context *cxt)
        itr = mnt_new_iter(MNT_ITER_BACKWARD);
        if (!itr) {
                warn(_("failed to initialize libmount iterator"));
-               return -ENOMEM;
+               return MOUNT_EX_SYSERR;
        }
 
        while (mnt_context_next_umount(cxt, itr, &fs, &mntrc, &ignored) == 0) {
@@ -287,7 +287,7 @@ static int umount_one(struct libmnt_context *cxt, const char *spec)
        int rc;
 
        if (!spec)
-               return -EINVAL;
+               return MOUNT_EX_SOFTWARE;
 
        if (mnt_context_set_target(cxt, spec))
                err(MOUNT_EX_SYSERR, _("failed to set umount target"));