summaryrefslogtreecommitdiff
path: root/e2fsprogs/blkid/read.c
diff options
context:
space:
mode:
authorMike Frysinger2006-03-08 07:03:27 +0000
committerMike Frysinger2006-03-08 07:03:27 +0000
commit874af85d5eb08b65476f406f6a1e7edc127ac210 (patch)
tree1cb4ee52f1592350dd9c4471b2a334957cc42b5e /e2fsprogs/blkid/read.c
parent0f2dd9f4eb9007bf44aa3f0cf30a35c36fbbd5b2 (diff)
downloadbusybox-874af85d5eb08b65476f406f6a1e7edc127ac210.zip
busybox-874af85d5eb08b65476f406f6a1e7edc127ac210.tar.gz
import most of e2fsprogs 1.38 updates
Diffstat (limited to 'e2fsprogs/blkid/read.c')
-rw-r--r--e2fsprogs/blkid/read.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/e2fsprogs/blkid/read.c b/e2fsprogs/blkid/read.c
index 08a3162..5f7422b 100644
--- a/e2fsprogs/blkid/read.c
+++ b/e2fsprogs/blkid/read.c
@@ -33,6 +33,11 @@
#include <stdlib.h>
+#ifdef TEST_PROGRAM
+#define blkid_debug_dump_dev(dev) (debug_dump_dev(dev))
+static void debug_dump_dev(blkid_dev dev);
+#endif
+
/*
* File format:
*
@@ -355,7 +360,7 @@ static int blkid_parse_line(blkid_cache cache, blkid_dev *dev_p, char *cp)
blkid_free_dev(dev);
}
- DEB_DUMP_DEV(DEBUG_READ, dev);
+ DBG(DEBUG_READ, blkid_debug_dump_dev(dev));
return ret;
}
@@ -433,6 +438,32 @@ errout:
}
#ifdef TEST_PROGRAM
+static void debug_dump_dev(blkid_dev dev)
+{
+ struct list_head *p;
+
+ if (!dev) {
+ printf(" dev: NULL\n");
+ return;
+ }
+
+ printf(" dev: name = %s\n", dev->bid_name);
+ printf(" dev: DEVNO=\"0x%0llx\"\n", dev->bid_devno);
+ printf(" dev: TIME=\"%lu\"\n", dev->bid_time);
+ printf(" dev: PRI=\"%d\"\n", dev->bid_pri);
+ printf(" dev: flags = 0x%08X\n", dev->bid_flags);
+
+ list_for_each(p, &dev->bid_tags) {
+ blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags);
+ if (tag)
+ printf(" tag: %s=\"%s\"\n", tag->bit_name,
+ tag->bit_val);
+ else
+ printf(" tag: NULL\n");
+ }
+ printf("\n");
+}
+
int main(int argc, char**argv)
{
blkid_cache cache = NULL;