diff options
Diffstat (limited to 'libblkid/src/verify.c')
-rw-r--r-- | libblkid/src/verify.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/libblkid/src/verify.c b/libblkid/src/verify.c index bd756e7a7..1c0ca0f7d 100644 --- a/libblkid/src/verify.c +++ b/libblkid/src/verify.c @@ -71,14 +71,13 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) diff = now - dev->bid_time; if (stat(dev->bid_name, &st) < 0) { - DBG(DEBUG_PROBE, - printf("blkid_verify: error %m (%d) while " - "trying to stat %s\n", errno, + DBG(PROBE, blkid_debug("blkid_verify: error %m (%d) while " + "trying to stat %s", errno, dev->bid_name)); open_err: if ((errno == EPERM) || (errno == EACCES) || (errno == ENOENT)) { /* We don't have read permission, just return cache data. */ - DBG(DEBUG_PROBE, printf("returning unverified data for %s\n", + DBG(PROBE, blkid_debug("returning unverified data for %s", dev->bid_name)); return dev; } @@ -100,15 +99,13 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) return dev; #ifndef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - DBG(DEBUG_PROBE, - printf("need to revalidate %s (cache time %lu, stat time %lu,\n\t" - "time since last check %lu)\n", + DBG(PROBE, blkid_debug("need to revalidate %s (cache time %lu, stat time %lu,\t" + "time since last check %lu)", dev->bid_name, (unsigned long)dev->bid_time, (unsigned long)st.st_mtime, (unsigned long)diff)); #else - DBG(DEBUG_PROBE, - printf("need to revalidate %s (cache time %lu.%lu, stat time %lu.%lu,\n\t" - "time since last check %lu)\n", + DBG(PROBE, blkid_debug("need to revalidate %s (cache time %lu.%lu, stat time %lu.%lu,\t" + "time since last check %lu)", dev->bid_name, (unsigned long)dev->bid_time, (unsigned long)dev->bid_utime, (unsigned long)st.st_mtime, (unsigned long)st.st_mtim.tv_nsec / 1000, @@ -125,8 +122,8 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) fd = open(dev->bid_name, O_RDONLY|O_CLOEXEC); if (fd < 0) { - DBG(DEBUG_PROBE, printf("blkid_verify: error %m (%d) while " - "opening %s\n", errno, + DBG(PROBE, blkid_debug("blkid_verify: error %m (%d) while " + "opening %s", errno, dev->bid_name)); goto open_err; } @@ -177,7 +174,7 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) blkid_probe_to_tags(cache->probe, dev); - DBG(DEBUG_PROBE, printf("%s: devno 0x%04llx, type %s\n", + DBG(PROBE, blkid_debug("%s: devno 0x%04llx, type %s", dev->bid_name, (long long)st.st_rdev, dev->bid_type)); } |