linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs-progs: do not print uuid 0 when printing root item
@ 2013-06-18  3:52 Wang Shilong
  0 siblings, 0 replies; only message in thread
From: Wang Shilong @ 2013-06-18  3:52 UTC (permalink / raw)
  To: linux-btrfs

Signed-off-by: Wang Shilong <wangshilong1991@gmail.com>
---
 print-tree.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/print-tree.c b/print-tree.c
index aae47a9..c1d8d18 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -355,8 +355,10 @@ static void print_root(struct extent_buffer *leaf, int slot)
 		(unsigned long long)btrfs_root_generation(&root_item));
 
 	if (root_item.generation == root_item.generation_v2) {
-		uuid_unparse(root_item.uuid, uuid_str);
-		printf("\t\tuuid %s\n", uuid_str);
+		if (count_bytes(root_item.uuid, BTRFS_UUID_SIZE, 0) != BTRFS_UUID_SIZE) {
+			uuid_unparse(root_item.uuid, uuid_str);
+			printf("\t\tuuid %s\n", uuid_str);
+		}
 		if (count_bytes(root_item.parent_uuid, BTRFS_UUID_SIZE, 0) != BTRFS_UUID_SIZE) {
 			uuid_unparse(root_item.parent_uuid, uuid_str);
 			printf("\t\tparent_uuid %s\n", uuid_str);
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-18  3:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18  3:52 [PATCH] Btrfs-progs: do not print uuid 0 when printing root item Wang Shilong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).