summaryrefslogtreecommitdiffstats
path: root/libmount/src/context_loopdev.c
diff options
context:
space:
mode:
authorKarel Zak2012-05-28 12:49:55 +0200
committerKarel Zak2012-05-28 12:49:55 +0200
commit61f5ff6cb4e094b77279b7d52be0d7cc3bb13f72 (patch)
tree65664f52534d560ba46ae10ac70f1c14700ba19f /libmount/src/context_loopdev.c
parentmount: (new) add loopdev specific error message (diff)
downloadkernel-qcow2-util-linux-61f5ff6cb4e094b77279b7d52be0d7cc3bb13f72.tar.gz
kernel-qcow2-util-linux-61f5ff6cb4e094b77279b7d52be0d7cc3bb13f72.tar.xz
kernel-qcow2-util-linux-61f5ff6cb4e094b77279b7d52be0d7cc3bb13f72.zip
libmount: add MNT_ERR_MOUNTOPT
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_loopdev.c')
-rw-r--r--libmount/src/context_loopdev.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libmount/src/context_loopdev.c b/libmount/src/context_loopdev.c
index 0dcf5803e..290e0d3d2 100644
--- a/libmount/src/context_loopdev.c
+++ b/libmount/src/context_loopdev.c
@@ -181,8 +181,10 @@ int mnt_context_setup_loopdev(struct libmnt_context *cxt)
if (rc == 0 && (cxt->user_mountflags & MNT_MS_OFFSET) &&
mnt_optstr_get_option(optstr, "offset", &val, &len) == 0) {
rc = mnt_parse_offset(val, len, &offset);
- if (rc)
+ if (rc) {
DBG(CXT, mnt_debug_h(cxt, "failed to parse offset="));
+ rc = -MNT_ERR_MOUNTOPT;
+ }
}
/*
@@ -191,8 +193,10 @@ int mnt_context_setup_loopdev(struct libmnt_context *cxt)
if (rc == 0 && (cxt->user_mountflags & MNT_MS_SIZELIMIT) &&
mnt_optstr_get_option(optstr, "sizelimit", &val, &len) == 0) {
rc = mnt_parse_offset(val, len, &sizelimit);
- if (rc)
+ if (rc) {
DBG(CXT, mnt_debug_h(cxt, "failed to parse sizelimit="));
+ rc = -MNT_ERR_MOUNTOPT;
+ }
}
/*