diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-05-11 13:00:44 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-05-11 13:00:44 -0600 |
commit | c519ae6b97b63024dae8ee349fe1e4e47c3ad54f (patch) | |
tree | e3e71f5a3b74c9e3994bca9fd3033ecf67f03370 /cmd/btrfs-dbg | |
parent | 3179489ad6498e3d8b2b7948d93cee4efa01049f (diff) |
implement parsing sys_chunks
Diffstat (limited to 'cmd/btrfs-dbg')
-rw-r--r-- | cmd/btrfs-dbg/main.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cmd/btrfs-dbg/main.go b/cmd/btrfs-dbg/main.go index 3d2103a..9a87f10 100644 --- a/cmd/btrfs-dbg/main.go +++ b/cmd/btrfs-dbg/main.go @@ -42,12 +42,18 @@ func Main(imgfilename string) (err error) { spew := spew.NewDefaultConfig() spew.DisablePointerAddresses = true - spew.Dump(superblocks[0].Data) sum, err := superblocks[0].Data.CalculateChecksum() if err != nil { return err } - fmt.Printf("calculated sum: %x\n", sum) + fmt.Printf("superblock checksum: %x\n", sum) + spew.Dump(superblocks[0].Data) + + syschunks, err := superblocks[0].Data.ParseSysChunkArray() + if err != nil { + return err + } + spew.Dump(syschunks) return nil } |