container/init: use absolute compare method

More checks are also added.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-08-20 17:14:36 +09:00
parent 31f0dd36df
commit 97ab24feef
8 changed files with 62 additions and 23 deletions

View File

@@ -129,8 +129,7 @@ func (d *MountDevOp) apply(state *setupState) error {
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.Target != nil && vd.Target != nil && d.Target.Is(vd.Target) &&
d.Mqueue == vd.Mqueue && d.Write == vd.Write))
}
func (*MountDevOp) prefix() string { return "mounting" }