aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/initremount.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-20 19:55:51 +0900
committerOphestra <cat@gensokyo.uk>2025-08-20 19:55:51 +0900
commit51304b03af49efc66926f259507aa3a208535890 (patch)
treed77924bfbb96889d71b965ce3e6dafd5841d5517 /container/initremount.go
parentc6397b941fe0c07795d8fd8615c37268c08082cd (diff)
container/initremount: check path equivalence by value
Fixes regression introduced while integrating Absolute. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/initremount.go')
-rw-r--r--container/initremount.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/container/initremount.go b/container/initremount.go
index 2b290af0..77efc21d 100644
--- a/container/initremount.go
+++ b/container/initremount.go
@@ -29,6 +29,11 @@ func (r *RemountOp) apply(*setupState) error {
fmt.Sprintf("cannot remount %q:", r.Target))
}
-func (r *RemountOp) Is(op Op) bool { vr, ok := op.(*RemountOp); return ok && *r == *vr }
+func (r *RemountOp) Is(op Op) bool {
+ vr, ok := op.(*RemountOp)
+ return ok && ((r == nil && vr == nil) ||
+ (r.Target != nil && vr.Target != nil && r.Target.Is(vr.Target)) &&
+ r.Flags == vr.Flags)
+}
func (*RemountOp) prefix() string { return "remounting" }
func (r *RemountOp) String() string { return fmt.Sprintf("%q flags %#x", r.Target, r.Flags) }