diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-06-05 15:48:20 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-06-05 15:48:20 -0600 |
commit | e134a9fbd0d8ae43e2d24c5aabad8bf6a16190ed (patch) | |
tree | 79f2514b7a53e780297fafa14123be02ecd44739 /cmd/btrfs-dump-tree | |
parent | abfd61441c4b36d6e01e589e03cadaa74fa2febf (diff) |
woohoo! it matches (enough)
Diffstat (limited to 'cmd/btrfs-dump-tree')
-rw-r--r-- | cmd/btrfs-dump-tree/main.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/btrfs-dump-tree/main.go b/cmd/btrfs-dump-tree/main.go index f5eb6c7..ce79994 100644 --- a/cmd/btrfs-dump-tree/main.go +++ b/cmd/btrfs-dump-tree/main.go @@ -109,6 +109,9 @@ func Main(imgfilename string) (err error) { }); err != nil { return err } + fmt.Printf("total bytes %d\n", superblock.Data.TotalBytes) + fmt.Printf("bytes used %d\n", superblock.Data.BytesUsed) + fmt.Printf("uuid %v\n", superblock.Data.FSUUID) return nil } @@ -142,6 +145,10 @@ func printTree(fs *btrfs.FS, root btrfs.LogicalAddr) error { item.Head.DataOffset, item.Head.DataSize) switch body := item.Body.(type) { + case btrfsitem.FreeSpaceHeader: + fmt.Printf("\t\tlocation %s\n", fmtKey(body.Location)) + fmt.Printf("\t\tcache generation %d entries %d bitmaps %d\n", + body.Generation, body.NumEntries, body.NumBitmaps) case btrfsitem.Inode: fmt.Printf(""+ "\t\tgeneration %d transid %d size %d nbytes %d\n"+ |