summaryrefslogtreecommitdiff
path: root/lib/btrfs/btrfsvol/devext.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-02-05 10:03:08 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-02-05 21:01:58 -0700
commit0ff1d420f21101a92d8da888d491860cf0cf16cc (patch)
tree3e5715b4e4fd6619f2edddf5bab315cb9a125598 /lib/btrfs/btrfsvol/devext.go
parent53d7fbb73869eb5defa1ca5c52b26abd346b13b9 (diff)
containers: s/Cmp/Compare/ to match the standard library
Go 1.18 added net/netip.Addr.Compare, and Go 1.20 added time.Time.Compare.
Diffstat (limited to 'lib/btrfs/btrfsvol/devext.go')
-rw-r--r--lib/btrfs/btrfsvol/devext.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/btrfs/btrfsvol/devext.go b/lib/btrfs/btrfsvol/devext.go
index e8e5446..037021c 100644
--- a/lib/btrfs/btrfsvol/devext.go
+++ b/lib/btrfs/btrfsvol/devext.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com>
+// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com>
//
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -23,7 +23,7 @@ type devextMapping struct {
// return -1 if 'a' is wholly to the left of 'b'
// return 0 if there is some overlap between 'a' and 'b'
// return 1 if 'a is wholly to the right of 'b'
-func (a devextMapping) cmpRange(b devextMapping) int {
+func (a devextMapping) compareRange(b devextMapping) int {
switch {
case a.PAddr.Add(a.Size) <= b.PAddr:
// 'a' is wholly to the left of 'b'.
@@ -40,7 +40,7 @@ func (a devextMapping) cmpRange(b devextMapping) int {
func (a devextMapping) union(rest ...devextMapping) (devextMapping, error) {
// sanity check
for _, ext := range rest {
- if a.cmpRange(ext) != 0 {
+ if a.compareRange(ext) != 0 {
return devextMapping{}, fmt.Errorf("devexts don't overlap")
}
}