summaryrefslogtreecommitdiff
path: root/cmd/btrfs-rec/inspect_lsfiles.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-03-02 22:35:00 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-03-17 22:30:37 -0400
commite1569565240cf6487ebeb5ec4c1386c8ba70f493 (patch)
treea078f324529f9cefbc75fcf0e05b0d3e3a1b68ff /cmd/btrfs-rec/inspect_lsfiles.go
parent26e58f1cd1d47b63b1b05b26c73c4f69f7e245cb (diff)
btrfs: io4_fs.go: Subvolume: Don't have public members; use a constructor
Diffstat (limited to 'cmd/btrfs-rec/inspect_lsfiles.go')
-rw-r--r--cmd/btrfs-rec/inspect_lsfiles.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/cmd/btrfs-rec/inspect_lsfiles.go b/cmd/btrfs-rec/inspect_lsfiles.go
index a2b46ab..e9fd057 100644
--- a/cmd/btrfs-rec/inspect_lsfiles.go
+++ b/cmd/btrfs-rec/inspect_lsfiles.go
@@ -45,10 +45,11 @@ func init() {
}()
ctx := cmd.Context()
- printSubvol(out, "", true, "/", &btrfs.Subvolume{
- FS: btrfsutil.NewOldRebuiltForrest(ctx, fs),
- TreeID: btrfsprim.FS_TREE_OBJECTID,
- })
+ printSubvol(out, "", true, "/", btrfs.NewSubvolume(
+ btrfsutil.NewOldRebuiltForrest(ctx, fs),
+ btrfsprim.FS_TREE_OBJECTID,
+ false,
+ ))
return nil
}),
@@ -160,10 +161,7 @@ func printDirEntry(out io.Writer, prefix string, isLast bool, subvol *btrfs.Subv
}
printDir(out, prefix, isLast, name, dir)
case btrfsitem.ROOT_ITEM_KEY:
- printSubvol(out, prefix, isLast, name, &btrfs.Subvolume{
- FS: subvol.FS,
- TreeID: entry.Location.ObjectID,
- })
+ printSubvol(out, prefix, isLast, name, subvol.NewChildSubvolume(entry.Location.ObjectID))
default:
panic(fmt.Errorf("TODO: I don't know how to handle an FT_DIR with location.ItemType=%v: %q",
entry.Location.ItemType, name))