summaryrefslogtreecommitdiff
path: root/lib/btrfs/btrfsitem
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2022-07-13 21:10:10 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2022-07-13 21:51:12 -0600
commit166e51d3a6f81834cc89aec36015f05f350be31e (patch)
tree122745341f3431b2220448d7d71965cd3e84aa97 /lib/btrfs/btrfsitem
parent296e9fc0f8812ce0c5684ff99f84e80eef07cd4c (diff)
Fix package names/imports
Diffstat (limited to 'lib/btrfs/btrfsitem')
-rw-r--r--lib/btrfs/btrfsitem/item_chunk.go3
-rw-r--r--lib/btrfs/btrfsitem/item_dev.go5
-rw-r--r--lib/btrfs/btrfsitem/item_devextent.go3
-rw-r--r--lib/btrfs/btrfsitem/item_extent.go6
-rw-r--r--lib/btrfs/btrfsitem/item_inode.go9
-rw-r--r--lib/btrfs/btrfsitem/item_root.go10
-rw-r--r--lib/btrfs/btrfsitem/statmode.go2
7 files changed, 19 insertions, 19 deletions
diff --git a/lib/btrfs/btrfsitem/item_chunk.go b/lib/btrfs/btrfsitem/item_chunk.go
index 2ccc860..754d650 100644
--- a/lib/btrfs/btrfsitem/item_chunk.go
+++ b/lib/btrfs/btrfsitem/item_chunk.go
@@ -8,7 +8,6 @@ import (
"git.lukeshu.com/btrfs-progs-ng/lib/binstruct"
"git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsvol"
"git.lukeshu.com/btrfs-progs-ng/lib/btrfs/internal"
- "git.lukeshu.com/btrfs-progs-ng/lib/util"
)
// Maps logical address to physical.
@@ -36,7 +35,7 @@ type ChunkHeader struct {
type ChunkStripe struct {
DeviceID btrfsvol.DeviceID `bin:"off=0x0, siz=0x8"`
Offset btrfsvol.PhysicalAddr `bin:"off=0x8, siz=0x8"`
- DeviceUUID util.UUID `bin:"off=0x10, siz=0x10"`
+ DeviceUUID internal.UUID `bin:"off=0x10, siz=0x10"`
binstruct.End `bin:"off=0x20"`
}
diff --git a/lib/btrfs/btrfsitem/item_dev.go b/lib/btrfs/btrfsitem/item_dev.go
index 9c3781d..020f2ca 100644
--- a/lib/btrfs/btrfsitem/item_dev.go
+++ b/lib/btrfs/btrfsitem/item_dev.go
@@ -8,7 +8,6 @@ import (
"git.lukeshu.com/btrfs-progs-ng/lib/binstruct"
"git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsvol"
"git.lukeshu.com/btrfs-progs-ng/lib/btrfs/internal"
- "git.lukeshu.com/btrfs-progs-ng/lib/util"
)
// key.objectid = BTRFS_DEV_ITEMS_OBJECTID
@@ -30,8 +29,8 @@ type Dev struct { // DEV_ITEM=216
SeekSpeed uint8 `bin:"off=0x40, siz=0x1"`
Bandwidth uint8 `bin:"off=0x41, siz=0x1"`
- DevUUID util.UUID `bin:"off=0x42, siz=0x10"`
- FSUUID util.UUID `bin:"off=0x52, siz=0x10"`
+ DevUUID internal.UUID `bin:"off=0x42, siz=0x10"`
+ FSUUID internal.UUID `bin:"off=0x52, siz=0x10"`
binstruct.End `bin:"off=0x62"`
}
diff --git a/lib/btrfs/btrfsitem/item_devextent.go b/lib/btrfs/btrfsitem/item_devextent.go
index 3185bb0..8eca935 100644
--- a/lib/btrfs/btrfsitem/item_devextent.go
+++ b/lib/btrfs/btrfsitem/item_devextent.go
@@ -8,7 +8,6 @@ import (
"git.lukeshu.com/btrfs-progs-ng/lib/binstruct"
"git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsvol"
"git.lukeshu.com/btrfs-progs-ng/lib/btrfs/internal"
- "git.lukeshu.com/btrfs-progs-ng/lib/util"
)
// key.objectid = device_id
@@ -18,7 +17,7 @@ type DevExtent struct { // DEV_EXTENT=204
ChunkObjectID internal.ObjID `bin:"off=8, siz=8"`
ChunkOffset btrfsvol.LogicalAddr `bin:"off=16, siz=8"`
Length btrfsvol.AddrDelta `bin:"off=24, siz=8"`
- ChunkTreeUUID util.UUID `bin:"off=32, siz=16"`
+ ChunkTreeUUID internal.UUID `bin:"off=32, siz=16"`
binstruct.End `bin:"off=48"`
}
diff --git a/lib/btrfs/btrfsitem/item_extent.go b/lib/btrfs/btrfsitem/item_extent.go
index d49243d..e8cd9b9 100644
--- a/lib/btrfs/btrfsitem/item_extent.go
+++ b/lib/btrfs/btrfsitem/item_extent.go
@@ -9,7 +9,7 @@ import (
"git.lukeshu.com/btrfs-progs-ng/lib/binstruct"
"git.lukeshu.com/btrfs-progs-ng/lib/btrfs/internal"
- "git.lukeshu.com/btrfs-progs-ng/lib/util"
+ "git.lukeshu.com/btrfs-progs-ng/lib/fmtutil"
)
type Extent struct { // EXTENT_ITEM=168
@@ -91,7 +91,9 @@ var extentFlagNames = []string{
}
func (f ExtentFlags) Has(req ExtentFlags) bool { return f&req == req }
-func (f ExtentFlags) String() string { return util.BitfieldString(f, extentFlagNames, util.HexNone) }
+func (f ExtentFlags) String() string {
+ return fmtutil.BitfieldString(f, extentFlagNames, fmtutil.HexNone)
+}
type ExtentInlineRef struct {
Type Type // only 4 valid values: {TREE,SHARED}_BLOCK_REF_KEY, {EXTENT,SHARED}_DATA_REF_KEY
diff --git a/lib/btrfs/btrfsitem/item_inode.go b/lib/btrfs/btrfsitem/item_inode.go
index 0fb637e..27204f6 100644
--- a/lib/btrfs/btrfsitem/item_inode.go
+++ b/lib/btrfs/btrfsitem/item_inode.go
@@ -7,8 +7,7 @@ package btrfsitem
import (
"git.lukeshu.com/btrfs-progs-ng/lib/binstruct"
"git.lukeshu.com/btrfs-progs-ng/lib/btrfs/internal"
- "git.lukeshu.com/btrfs-progs-ng/lib/linux"
- "git.lukeshu.com/btrfs-progs-ng/lib/util"
+ "git.lukeshu.com/btrfs-progs-ng/lib/fmtutil"
)
type Inode struct { // INODE_ITEM=1
@@ -20,7 +19,7 @@ type Inode struct { // INODE_ITEM=1
NLink int32 `bin:"off=0x28, siz=0x04"` // stat
UID int32 `bin:"off=0x2C, siz=0x04"` // stat
GID int32 `bin:"off=0x30, siz=0x04"` // stat
- Mode linux.StatMode `bin:"off=0x34, siz=0x04"` // stat
+ Mode StatMode `bin:"off=0x34, siz=0x04"` // stat
RDev int64 `bin:"off=0x38, siz=0x08"` // stat
Flags InodeFlags `bin:"off=0x40, siz=0x08"` // statx.stx_attributes, sorta
Sequence int64 `bin:"off=0x48, siz=0x08"` // NFS
@@ -65,4 +64,6 @@ var inodeFlagNames = []string{
}
func (f InodeFlags) Has(req InodeFlags) bool { return f&req == req }
-func (f InodeFlags) String() string { return util.BitfieldString(f, inodeFlagNames, util.HexLower) }
+func (f InodeFlags) String() string {
+ return fmtutil.BitfieldString(f, inodeFlagNames, fmtutil.HexLower)
+}
diff --git a/lib/btrfs/btrfsitem/item_root.go b/lib/btrfs/btrfsitem/item_root.go
index d1781ec..7725363 100644
--- a/lib/btrfs/btrfsitem/item_root.go
+++ b/lib/btrfs/btrfsitem/item_root.go
@@ -8,7 +8,7 @@ import (
"git.lukeshu.com/btrfs-progs-ng/lib/binstruct"
"git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsvol"
"git.lukeshu.com/btrfs-progs-ng/lib/btrfs/internal"
- "git.lukeshu.com/btrfs-progs-ng/lib/util"
+ "git.lukeshu.com/btrfs-progs-ng/lib/fmtutil"
)
type Root struct { // ROOT_ITEM=132
@@ -25,9 +25,9 @@ type Root struct { // ROOT_ITEM=132
DropLevel uint8 `bin:"off=0x0ed, siz=0x01"`
Level uint8 `bin:"off=0x0ee, siz=0x01"`
GenerationV2 internal.Generation `bin:"off=0x0ef, siz=0x08"`
- UUID util.UUID `bin:"off=0x0f7, siz=0x10"`
- ParentUUID util.UUID `bin:"off=0x107, siz=0x10"`
- ReceivedUUID util.UUID `bin:"off=0x117, siz=0x10"`
+ UUID internal.UUID `bin:"off=0x0f7, siz=0x10"`
+ ParentUUID internal.UUID `bin:"off=0x107, siz=0x10"`
+ ReceivedUUID internal.UUID `bin:"off=0x117, siz=0x10"`
CTransID int64 `bin:"off=0x127, siz=0x08"`
OTransID int64 `bin:"off=0x12f, siz=0x08"`
STransID int64 `bin:"off=0x137, siz=0x08"`
@@ -52,4 +52,4 @@ var rootFlagNames = []string{
}
func (f RootFlags) Has(req RootFlags) bool { return f&req == req }
-func (f RootFlags) String() string { return util.BitfieldString(f, rootFlagNames, util.HexLower) }
+func (f RootFlags) String() string { return fmtutil.BitfieldString(f, rootFlagNames, fmtutil.HexLower) }
diff --git a/lib/btrfs/btrfsitem/statmode.go b/lib/btrfs/btrfsitem/statmode.go
index 2cca56d..a1302ee 100644
--- a/lib/btrfs/btrfsitem/statmode.go
+++ b/lib/btrfs/btrfsitem/statmode.go
@@ -5,7 +5,7 @@
//
// Based on https://github.com/datawire/ocibuild/blob/master/pkg/python/stat.go
-package linux
+package btrfsitem
type StatMode uint32