Skip to contentSkip to conversation

Changed type field to be %x for tree header (line in btrfs_print_tree)

PATCH In review Alan D. Brunelle 2 participants 3 messages Jun 10, 2008 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Changed type field to be %x for tree header (line in btrfs_print_tree)

This makes it easier to visually match keys - see:
print-tree.c:btrfs_print_tree():329:

	printf("\tkey %d (%llu %x %llu) block %llu (%llu) gen %llu\n",

I'm not sure if this breaks any other parsers?

---
 debug-tree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
debug-tree.c +1 -1
index fa5c90c..9185dc2 100644
@@ -190,7 +190,7 @@ int main(int ac, char **av)
 				break;
 			}
 			if (!skip && !extent_only) {
-				printf("tree %llu %u %llu\n",
+				printf("tree %llu %x %llu\n",
 				       (unsigned long long)found_key.objectid,
 				       found_key.type,
 				       (unsigned long long)found_key.offset);
Signature · 1 line
1.5.4.3
#1 lore raw

[ use %x for key type printks ]

I've gone back and forth on this, since the type used to be a mask. But, right now all the #defines are in decimal, I'd rather keep the output the same way.

-chris

#2 lore raw
Quoted 7 lines · Chris Mason

[ use %x for key type printks ]

I've gone back and forth on this, since the type used to be a mask. But, right now all the #defines are in decimal, I'd rather keep the output the same way.

-chris

Then, perhaps, one should change the %x in
print-tree.c:btrfs_print_tree() to a %u?

Alan