summaryrefslogtreecommitdiffstats
path: root/shlibs/mount/src/optstr.c
diff options
context:
space:
mode:
authorKarel Zak2010-09-15 16:27:06 +0200
committerKarel Zak2011-01-03 12:28:42 +0100
commit33eff02a448a048fc1b90e61a0f1f7a42c0507c7 (patch)
tree01ff935cbee53402c33f54dc931c8a7cc2464af9 /shlibs/mount/src/optstr.c
parentlibmount: add new pseudo filesystems (diff)
downloadkernel-qcow2-util-linux-33eff02a448a048fc1b90e61a0f1f7a42c0507c7.tar.gz
kernel-qcow2-util-linux-33eff02a448a048fc1b90e61a0f1f7a42c0507c7.tar.xz
kernel-qcow2-util-linux-33eff02a448a048fc1b90e61a0f1f7a42c0507c7.zip
libmount: improve debugging, fix optstr prepend
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/optstr.c')
-rw-r--r--shlibs/mount/src/optstr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shlibs/mount/src/optstr.c b/shlibs/mount/src/optstr.c
index 6d4d35052..b809386aa 100644
--- a/shlibs/mount/src/optstr.c
+++ b/shlibs/mount/src/optstr.c
@@ -227,7 +227,7 @@ int mnt_optstr_prepend_option(char **optstr, const char *name, const char *value
*optstr = NULL;
rc = mnt_optstr_append_option(optstr, name, value);
- if (!rc)
+ if (!rc && tmp)
rc = mnt_optstr_append_option(optstr, tmp, NULL);
if (!rc) {
free(tmp);
@@ -236,6 +236,8 @@ int mnt_optstr_prepend_option(char **optstr, const char *name, const char *value
free(*optstr);
*optstr = tmp;
+
+ DBG(OPTS, mnt_debug("failed to prepend '%s[=%s]' to '%s'", name, value, optstr));
return rc;
}