diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-12 16:17:34 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-12 16:17:34 -0700 |
commit | c55326b0cb6994bb802cf6aac4a296acfb0e41ff (patch) | |
tree | 020cb033adb3809bcc8ffed5f56ba8d167b32dd1 /lib/btrfs/btrfstree | |
parent | cfcc753dc8906817e15b1b7c36b4dc12462d12e4 (diff) | |
parent | acbbfafa07922b458506b91a58f3a082da453fd1 (diff) |
Merge branch 'lukeshu/enums'
Diffstat (limited to 'lib/btrfs/btrfstree')
-rw-r--r-- | lib/btrfs/btrfstree/path.go | 3 | ||||
-rw-r--r-- | lib/btrfs/btrfstree/types_node.go | 6 | ||||
-rw-r--r-- | lib/btrfs/btrfstree/types_superblock.go | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/lib/btrfs/btrfstree/path.go b/lib/btrfs/btrfstree/path.go index d9bf216..dd2cb74 100644 --- a/lib/btrfs/btrfstree/path.go +++ b/lib/btrfs/btrfstree/path.go @@ -9,7 +9,6 @@ import ( "io" "strings" - "git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsitem" "git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsprim" "git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsvol" ) @@ -104,7 +103,7 @@ func (path TreePath) String() string { return "(empty-path)" } else { var ret strings.Builder - fmt.Fprintf(&ret, "%s->", path[0].FromTree.Format(btrfsitem.ROOT_ITEM_KEY)) + fmt.Fprintf(&ret, "%s->", path[0].FromTree.Format(btrfsprim.ROOT_TREE_OBJECTID)) if len(path) == 1 && path[0] == (TreePathElem{FromTree: path[0].FromTree, FromItemIdx: -1}) { ret.WriteString("(empty-path)") } else { diff --git a/lib/btrfs/btrfstree/types_node.go b/lib/btrfs/btrfstree/types_node.go index fd4c939..0a89e05 100644 --- a/lib/btrfs/btrfstree/types_node.go +++ b/lib/btrfs/btrfstree/types_node.go @@ -58,7 +58,7 @@ var ( ) const ( - NodeWritten = NodeFlags(1 << iota) + NodeWritten NodeFlags = 1 << iota NodeReloc ) @@ -73,8 +73,8 @@ func (f NodeFlags) String() string { return fmtutil.BitfieldString(f, no type BackrefRev uint8 const ( - OldBackrefRev = BackrefRev(iota) - MixedBackrefRev = BackrefRev(iota) + OldBackrefRev BackrefRev = iota + MixedBackrefRev ) // Node: main ////////////////////////////////////////////////////////////////////////////////////// diff --git a/lib/btrfs/btrfstree/types_superblock.go b/lib/btrfs/btrfstree/types_superblock.go index 140d4a1..a9b1633 100644 --- a/lib/btrfs/btrfstree/types_superblock.go +++ b/lib/btrfs/btrfstree/types_superblock.go @@ -199,7 +199,7 @@ type RootBackup struct { type IncompatFlags uint64 const ( - FeatureIncompatMixedBackref = IncompatFlags(1 << iota) + FeatureIncompatMixedBackref IncompatFlags = 1 << iota FeatureIncompatDefaultSubvol FeatureIncompatMixedGroups FeatureIncompatCompressLZO |