Signed-off-by: Karel Zak <kzak@redhat.com>
return 0;
}
- DBG(CACHE, mnt_debug_h(cache, "reading tags for: %s", devname));
-
pr = blkid_new_probe_from_filename(devname);
if (!pr)
return -1;
if (blkid_do_safeprobe(pr))
goto error;
+ DBG(CACHE, mnt_debug_h(cache, "reading tags for: %s", devname));
+
for (i = 0; i < ARRAY_SIZE(tags); i++) {
const char *data;
char *dev;
*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);
free(*optstr);
*optstr = tmp;
+
+ DBG(OPTS, mnt_debug("failed to prepend '%s[=%s]' to '%s'", name, value, optstr));
return rc;
}