* [PATCH] Btrfs: Print key type in decimal everywhere
@ 2013-07-16 13:38 Stefan Behrens
2013-07-16 15:59 ` Zach Brown
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Behrens @ 2013-07-16 13:38 UTC (permalink / raw)
To: linux-btrfs
This is confusing, sometimes the key type is printed in hex (without
a leading "0x" which makes things even more complicated), sometimes
in decimal...
Change it to be in decimal everywhere.
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
---
fs/btrfs/print-tree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c
index b6b209c..32022f3 100644
--- a/fs/btrfs/print-tree.c
+++ b/fs/btrfs/print-tree.c
@@ -95,7 +95,7 @@ static void print_extent_item(struct extent_buffer *eb, int slot)
struct btrfs_tree_block_info *info;
info = (struct btrfs_tree_block_info *)(ei + 1);
btrfs_tree_block_key(eb, info, &key);
- printk(KERN_INFO "\t\ttree block key (%llu %x %llu) "
+ printk(KERN_INFO "\t\ttree block key (%llu %u %llu) "
"level %d\n",
(unsigned long long)btrfs_disk_key_objectid(&key),
key.type,
@@ -202,7 +202,7 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
item = btrfs_item_nr(l, i);
btrfs_item_key_to_cpu(l, &key, i);
type = btrfs_key_type(&key);
- printk(KERN_INFO "\titem %d key (%llu %x %llu) itemoff %d "
+ printk(KERN_INFO "\titem %d key (%llu %u %llu) itemoff %d "
"itemsize %d\n",
i,
(unsigned long long)key.objectid, type,
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Btrfs: Print key type in decimal everywhere
2013-07-16 13:38 [PATCH] Btrfs: Print key type in decimal everywhere Stefan Behrens
@ 2013-07-16 15:59 ` Zach Brown
0 siblings, 0 replies; 2+ messages in thread
From: Zach Brown @ 2013-07-16 15:59 UTC (permalink / raw)
To: Stefan Behrens; +Cc: linux-btrfs
On Tue, Jul 16, 2013 at 03:38:33PM +0200, Stefan Behrens wrote:
> This is confusing, sometimes the key type is printed in hex (without
> a leading "0x" which makes things even more complicated), sometimes
> in decimal...
> Change it to be in decimal everywhere.
This seems particularly reasonable to me because the key types are
defined with decimal constants in ctree.h. I like it.
- z
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-16 15:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-16 13:38 [PATCH] Btrfs: Print key type in decimal everywhere Stefan Behrens
2013-07-16 15:59 ` Zach Brown
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).