diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-06-26 19:55:49 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-06-26 19:55:49 -0600 |
commit | 502cdc72771de93ce41e2a00bc201fc488603f59 (patch) | |
tree | d8b7bc9890d0f8f8069c70376220ab54daae52f7 /cmd/btrfs-dump-tree | |
parent | e6b7c243462b1412390d0048dafe3430d07c05be (diff) |
better volume!
Diffstat (limited to 'cmd/btrfs-dump-tree')
-rw-r--r-- | cmd/btrfs-dump-tree/main.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cmd/btrfs-dump-tree/main.go b/cmd/btrfs-dump-tree/main.go index 3c7bcda..9c8e4c5 100644 --- a/cmd/btrfs-dump-tree/main.go +++ b/cmd/btrfs-dump-tree/main.go @@ -32,14 +32,11 @@ func Main(imgfilename string) (err error) { defer func() { maybeSetErr(fh.Close()) }() - fs := &btrfs.FS{ - Devices: []*btrfs.Device{ - { - File: fh, - }, - }, - } + fs := new(btrfs.FS) + if err := fs.AddDevice(&btrfs.Device{File: fh}); err != nil { + return err + } if err := fs.Init(); err != nil { fmt.Printf("(error) %v\n", err) } |