summaryrefslogtreecommitdiff
path: root/lib/btrfsprogs
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-02-12 11:29:25 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-02-12 14:28:41 -0700
commitffabc8c276fcdc97bc15193d511622c4356cdcf0 (patch)
tree3f6b44040c9c0eff44ef0ab3686fea0f31bf4fba /lib/btrfsprogs
parent37a7aff4df234151f7e68ac4180b5c88a5e02bcf (diff)
btrfsinspect/print_tree: Switch printf formatters to match btrfs-progs
This is lame, but it matches what the C btrfs-progs does.
Diffstat (limited to 'lib/btrfsprogs')
-rw-r--r--lib/btrfsprogs/btrfsinspect/print_tree.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/print_tree.go b/lib/btrfsprogs/btrfsinspect/print_tree.go
index 3fc3a3f..3807df5 100644
--- a/lib/btrfsprogs/btrfsinspect/print_tree.go
+++ b/lib/btrfsprogs/btrfsinspect/print_tree.go
@@ -151,7 +151,7 @@ func printTree(ctx context.Context, out io.Writer, fs *btrfs.FS, treeID btrfspri
body.TransID, body.DataLen, body.NameLen)
textui.Fprintf(out, "\t\tname: %s\n", body.Name)
if len(body.Data) > 0 {
- textui.Fprintf(out, "\t\tdata %v\n", body.Data)
+ textui.Fprintf(out, "\t\tdata %s\n", body.Data)
}
// case btrfsitem.DIR_LOG_INDEX_KEY, btrfsitem.DIR_LOG_ITEM_KEY:
// // TODO
@@ -253,7 +253,7 @@ func printTree(ctx context.Context, out io.Writer, fs *btrfs.FS, treeID btrfspri
textui.Fprintf(out, "\t\tblock group used %v chunk_objectid %v flags %v\n",
body.Used, body.ChunkObjectID, body.Flags)
case btrfsitem.FreeSpaceInfo:
- textui.Fprintf(out, "\t\tfree space info extent count %v flags %v\n",
+ textui.Fprintf(out, "\t\tfree space info extent count %v flags %d\n",
body.ExtentCount, body.Flags)
case btrfsitem.FreeSpaceBitmap:
textui.Fprintf(out, "\t\tfree space bitmap\n")
@@ -286,7 +286,7 @@ func printTree(ctx context.Context, out io.Writer, fs *btrfs.FS, treeID btrfspri
body.FSUUID)
case btrfsitem.DevExtent:
textui.Fprintf(out, ""+
- "\t\tdev extent chunk_tree %v\n"+
+ "\t\tdev extent chunk_tree %d\n"+
"\t\tchunk_objectid %v chunk_offset %d length %d\n"+
"\t\tchunk_tree_uuid %v\n",
body.ChunkTree, body.ChunkObjectID, body.ChunkOffset, body.Length,