]> 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>
Fri, 16 Nov 2012 10:29:28 +0000 (11:29 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/umount.c

index 38a2fc8f2e594c8650ee95609167562a8137bdc7..1fbf281c8e58f9d9bbf7c5aff6cc346d931f96c8 100644 (file)
@@ -258,7 +258,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) {
@@ -285,7 +285,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"));