summaryrefslogtreecommitdiff
path: root/pkg/btrfs
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/btrfs')
-rw-r--r--pkg/btrfs/btrfsitem/item_chunk.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/btrfs/btrfsitem/item_chunk.go b/pkg/btrfs/btrfsitem/item_chunk.go
index 17f069c..5c573b0 100644
--- a/pkg/btrfs/btrfsitem/item_chunk.go
+++ b/pkg/btrfs/btrfsitem/item_chunk.go
@@ -38,7 +38,7 @@ func (chunk *Chunk) UnmarshalBinary(dat []byte) (int, error) {
_n, err := binstruct.Unmarshal(dat[n:], &stripe)
n += _n
if err != nil {
- return n, err
+ return n, fmt.Errorf("%T.UnmarshalBinary: %w", *chunk, err)
}
chunk.Stripes = append(chunk.Stripes, stripe)
}
@@ -55,7 +55,7 @@ func (chunk Chunk) MarshalBinary() ([]byte, error) {
_ret, err := binstruct.Marshal(stripe)
ret = append(ret, _ret...)
if err != nil {
- return ret, err
+ return ret, fmt.Errorf("%T.MarshalBinary: %w", chunk, err)
}
}
return ret, nil