diff options
author | Karel Zak | 2013-04-08 18:22:13 +0200 |
---|---|---|
committer | Karel Zak | 2013-04-08 18:22:13 +0200 |
commit | 0540ea544d4b459bc148d29645225190b76ca8b7 (patch) | |
tree | f0902ec8cb04f8148ffd87170c2f1bdd7534564e /libblkid/src/resolve.c | |
parent | bash-completion: Symlink runuser symlink to su so it gets loaded on demand. (diff) | |
download | kernel-qcow2-util-linux-0540ea544d4b459bc148d29645225190b76ca8b7.tar.gz kernel-qcow2-util-linux-0540ea544d4b459bc148d29645225190b76ca8b7.tar.xz kernel-qcow2-util-linux-0540ea544d4b459bc148d29645225190b76ca8b7.zip |
libblkid: clean up DBG()
- use stderr only
- use BLKID_ prefix for debug masks
- don't use \n in in messages and don't use printf(),
but use generic blkid_debug().
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/resolve.c')
-rw-r--r-- | libblkid/src/resolve.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libblkid/src/resolve.c b/libblkid/src/resolve.c index 96749b3ec..3a93f53dc 100644 --- a/libblkid/src/resolve.c +++ b/libblkid/src/resolve.c @@ -32,7 +32,7 @@ char *blkid_get_tag_value(blkid_cache cache, const char *tagname, blkid_cache c = cache; char *ret = NULL; - DBG(DEBUG_RESOLVE, printf("looking for %s on %s\n", tagname, devname)); + DBG(RESOLVE, blkid_debug("looking for %s on %s", tagname, devname)); if (!devname) return NULL; @@ -68,8 +68,7 @@ char *blkid_get_devname(blkid_cache cache, const char *token, if (!cache && blkid_get_cache(&c, NULL) < 0) return NULL; - DBG(DEBUG_RESOLVE, - printf("looking for %s%s%s %s\n", token, value ? "=" : "", + DBG(RESOLVE, blkid_debug("looking for %s%s%s %s", token, value ? "=" : "", value ? value : "", cache ? "in cache" : "from disk")); if (!value) { @@ -103,7 +102,7 @@ int main(int argc, char **argv) char *value; blkid_cache cache; - blkid_init_debug(DEBUG_ALL); + blkid_init_debug(BLKID_DEBUG_ALL); if (argc != 2 && argc != 3) { fprintf(stderr, "Usage:\t%s tagname=value\n" "\t%s tagname devname\n" |