summaryrefslogtreecommitdiffstats
path: root/sys-utils/umount.c
diff options
context:
space:
mode:
authorKarel Zak2012-11-13 16:50:02 +0100
committerKarel Zak2012-11-13 16:50:02 +0100
commit06069d5f636d68736a2bd7ab406efd9645a40cac (patch)
treea7d7a7eaaa03411ba408a23d0f999b39fc950af7 /sys-utils/umount.c
parentumount: add -R, --recursive option (diff)
downloadkernel-qcow2-util-linux-06069d5f636d68736a2bd7ab406efd9645a40cac.tar.gz
kernel-qcow2-util-linux-06069d5f636d68736a2bd7ab406efd9645a40cac.tar.xz
kernel-qcow2-util-linux-06069d5f636d68736a2bd7ab406efd9645a40cac.zip
umount: allways return MOUNT_EX_*
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/umount.c')
-rw-r--r--sys-utils/umount.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/umount.c b/sys-utils/umount.c
index 196a511ba..b0031026d 100644
--- a/sys-utils/umount.c
+++ b/sys-utils/umount.c
@@ -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"));