container/initdev: check path equivalence by value

Fixes regression introduced while integrating Absolute.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-08-20 02:55:45 +09:00
parent 022cc26b2e
commit 9aec2f46fe
2 changed files with 69 additions and 2 deletions

View File

@@ -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)