aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/initdev.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-20 02:55:45 +0900
committerOphestra <cat@gensokyo.uk>2025-08-20 02:55:45 +0900
commit9aec2f46fe775e1e885df32ed77bdef125aa5391 (patch)
treea88aba4001276895aa0f80efcb5943386f87f659 /container/initdev.go
parent022cc26b2eb2260cbec1187c45e8bab1afe87116 (diff)
container/initdev: check path equivalence by value
Fixes regression introduced while integrating Absolute. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/initdev.go')
-rw-r--r--container/initdev.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/container/initdev.go b/container/initdev.go
index 827df9e9..c06cf224 100644
--- a/container/initdev.go
+++ b/container/initdev.go
@@ -126,8 +126,14 @@ func (d *MountDevOp) apply(state *setupState) error {
fmt.Sprintf("cannot remount %q:", target))
}
-func (d *MountDevOp) Is(op Op) bool { vd, ok := op.(*MountDevOp); return ok && *d == *vd }
-func (*MountDevOp) prefix() string { return "mounting" }
+func (d *MountDevOp) Is(op Op) bool {
+ vd, ok := op.(*MountDevOp)
+ return ok && ((d == nil && vd == nil) || (d != nil && vd != nil &&
+ d.Target != nil && vd.Target != nil &&
+ d.Target.String() == vd.Target.String() &&
+ d.Mqueue == vd.Mqueue && d.Write == vd.Write))
+}
+func (*MountDevOp) prefix() string { return "mounting" }
func (d *MountDevOp) String() string {
if d.Mqueue {
return fmt.Sprintf("dev on %q with mqueue", d.Target)