From cf314d3f1f96e2c07b68a7171e27f58c899bcdbb Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 1 Jun 2022 02:41:36 -0600 Subject: fix --- pkg/btrfs/btrfsitem/item_chunk.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'pkg/btrfs/btrfsitem') diff --git a/pkg/btrfs/btrfsitem/item_chunk.go b/pkg/btrfs/btrfsitem/item_chunk.go index 5c573b0..7bb65b1 100644 --- a/pkg/btrfs/btrfsitem/item_chunk.go +++ b/pkg/btrfs/btrfsitem/item_chunk.go @@ -1,6 +1,8 @@ package btrfsitem import ( + "fmt" + "lukeshu.com/btrfs-tools/pkg/binstruct" "lukeshu.com/btrfs-tools/pkg/btrfs/internal" ) @@ -21,11 +23,10 @@ type Chunk struct { // CHUNK_ITEM=228 } type ChunkStripe struct { - // Stripes follow (for each number of stripes): - DeviceID internal.ObjID `bin:"off=0, siz=8"` // device ID - Offset uint64 `bin:"off=8, siz=8"` // offset - DeviceUUID internal.UUID `bin:"off=10, siz=10"` // device UUID - binstruct.End `bin:"off=20"` + DeviceID internal.ObjID `bin:"off=0x0, siz=0x8"` + Offset uint64 `bin:"off=0x8, siz=0x8"` + DeviceUUID internal.UUID `bin:"off=0x10, siz=0x10"` + binstruct.End `bin:"off=0x20"` } func (chunk *Chunk) UnmarshalBinary(dat []byte) (int, error) { -- cgit v1.2.3-2-g168b