summaryrefslogtreecommitdiff
path: root/lib/btrfs/internal/misc.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/btrfs/internal/misc.go')
-rw-r--r--lib/btrfs/internal/misc.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/btrfs/internal/misc.go b/lib/btrfs/internal/misc.go
index eb5c287..3bc5402 100644
--- a/lib/btrfs/internal/misc.go
+++ b/lib/btrfs/internal/misc.go
@@ -26,15 +26,17 @@ func (k Key) String() string {
}
func (a Key) Cmp(b Key) int {
- if d := containers.CmpUint(a.ObjectID, b.ObjectID); d != 0 {
+ if d := containers.NativeCmp(a.ObjectID, b.ObjectID); d != 0 {
return d
}
- if d := containers.CmpUint(a.ItemType, b.ItemType); d != 0 {
+ if d := containers.NativeCmp(a.ItemType, b.ItemType); d != 0 {
return d
}
- return containers.CmpUint(a.Offset, b.Offset)
+ return containers.NativeCmp(a.Offset, b.Offset)
}
+var _ containers.Ordered[Key] = Key{}
+
type Time struct {
Sec int64 `bin:"off=0x0, siz=0x8"` // Number of seconds since 1970-01-01T00:00:00Z.
NSec uint32 `bin:"off=0x8, siz=0x4"` // Number of nanoseconds since the beginning of the second.