summaryrefslogtreecommitdiffstats
path: root/libblkid/src/read.c
diff options
context:
space:
mode:
authorKarel Zak2014-03-21 12:34:50 +0100
committerKarel Zak2014-03-21 12:34:50 +0100
commitc62a6311ee95556bdaf12106a6a1f8c353322ccd (patch)
treed82391d43277f80ac98ec5853d484183b016d893 /libblkid/src/read.c
parentlibmount: use new debug functions (diff)
downloadkernel-qcow2-util-linux-c62a6311ee95556bdaf12106a6a1f8c353322ccd.tar.gz
kernel-qcow2-util-linux-c62a6311ee95556bdaf12106a6a1f8c353322ccd.tar.xz
kernel-qcow2-util-linux-c62a6311ee95556bdaf12106a6a1f8c353322ccd.zip
libblkid: use new debug functions
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/read.c')
-rw-r--r--libblkid/src/read.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libblkid/src/read.c b/libblkid/src/read.c
index 59ceb019e..0e91c9c22 100644
--- a/libblkid/src/read.c
+++ b/libblkid/src/read.c
@@ -150,7 +150,7 @@ static int parse_start(char **cp)
return 0;
if (!strncmp(p, "<device", 7)) {
- DBG(READ, blkid_debug("found device header: %8s", p));
+ DBG(READ, ul_debug("found device header: %8s", p));
p += 7;
*cp = p;
@@ -169,7 +169,7 @@ static int parse_end(char **cp)
*cp = skip_over_blank(*cp);
if (!strncmp(*cp, "</device>", 9)) {
- DBG(READ, blkid_debug("found device trailer %9s", *cp));
+ DBG(READ, ul_debug("found device trailer %9s", *cp));
*cp += 9;
return 0;
}
@@ -193,13 +193,13 @@ static int parse_dev(blkid_cache cache, blkid_dev *dev, char **cp)
start = tmp = strchr(*cp, '>');
if (!start) {
- DBG(READ, blkid_debug("blkid: short line parsing dev: %s", *cp));
+ DBG(READ, ul_debug("blkid: short line parsing dev: %s", *cp));
return -BLKID_ERR_CACHE;
}
start = skip_over_blank(start + 1);
end = skip_over_word(start);
- DBG(READ, blkid_debug("device should be %*s",
+ DBG(READ, ul_debug("device should be %*s",
(int)(end - start), start));
if (**cp == '>')
@@ -210,12 +210,12 @@ static int parse_dev(blkid_cache cache, blkid_dev *dev, char **cp)
*tmp = '\0';
if (!(tmp = strrchr(end, '<')) || parse_end(&tmp) < 0) {
- DBG(READ, blkid_debug("blkid: missing </device> ending: %s", end));
+ DBG(READ, ul_debug("blkid: missing </device> ending: %s", end));
} else if (tmp)
*tmp = '\0';
if (end - start <= 1) {
- DBG(READ, blkid_debug("blkid: empty device name: %s", *cp));
+ DBG(READ, ul_debug("blkid: empty device name: %s", *cp));
return -BLKID_ERR_CACHE;
}
@@ -223,7 +223,7 @@ static int parse_dev(blkid_cache cache, blkid_dev *dev, char **cp)
if (name == NULL)
return -BLKID_ERR_MEM;
- DBG(READ, blkid_debug("found dev %s", name));
+ DBG(READ, ul_debug("found dev %s", name));
if (!(*dev = blkid_get_dev(cache, name, BLKID_DEV_CREATE))) {
free(name);
@@ -254,7 +254,7 @@ static int parse_token(char **name, char **value, char **cp)
if (**value == '"') {
end = strchr(*value + 1, '"');
if (!end) {
- DBG(READ, blkid_debug("unbalanced quotes at: %s", *value));
+ DBG(READ, ul_debug("unbalanced quotes at: %s", *value));
*cp = *value;
return -BLKID_ERR_CACHE;
}
@@ -326,7 +326,7 @@ static int parse_tag(blkid_cache cache, blkid_dev dev, char **cp)
} else
ret = blkid_set_tag(dev, name, value, strlen(value));
- DBG(READ, blkid_debug(" tag: %s=\"%s\"", name, value));
+ DBG(READ, ul_debug(" tag: %s=\"%s\"", name, value));
return ret < 0 ? ret : 1;
}
@@ -352,7 +352,7 @@ static int blkid_parse_line(blkid_cache cache, blkid_dev *dev_p, char *cp)
*dev_p = NULL;
- DBG(READ, blkid_debug("line: %s", cp));
+ DBG(READ, ul_debug("line: %s", cp));
if ((ret = parse_dev(cache, dev_p, &cp)) <= 0)
return ret;
@@ -364,7 +364,7 @@ static int blkid_parse_line(blkid_cache cache, blkid_dev *dev_p, char *cp)
}
if (dev->bid_type == NULL) {
- DBG(READ, blkid_debug("blkid: device %s has no TYPE",dev->bid_name));
+ DBG(READ, ul_debug("blkid: device %s has no TYPE",dev->bid_name));
blkid_free_dev(dev);
goto done;
}
@@ -400,12 +400,12 @@ void blkid_read_cache(blkid_cache cache)
goto errout;
if ((st.st_mtime == cache->bic_ftime) ||
(cache->bic_flags & BLKID_BIC_FL_CHANGED)) {
- DBG(CACHE, blkid_debug("skipping re-read of %s",
+ DBG(CACHE, ul_debug("skipping re-read of %s",
cache->bic_filename));
goto errout;
}
- DBG(CACHE, blkid_debug("reading cache file %s",
+ DBG(CACHE, ul_debug("reading cache file %s",
cache->bic_filename));
file = fdopen(fd, "r" UL_CLOEXECSTR);
@@ -428,7 +428,7 @@ void blkid_read_cache(blkid_cache cache)
}
if (blkid_parse_line(cache, &dev, buf) < 0) {
- DBG(READ, blkid_debug("blkid: bad format on line %d", lineno));
+ DBG(READ, ul_debug("blkid: bad format on line %d", lineno));
continue;
}
}