From a1482ecdd0f98728f4b97137cd7b2fa17f67bb89 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 20 Aug 2025 20:17:28 +0900 Subject: container/inittmpfs: check path equivalence by value Fixes regression introduced while integrating Absolute. Signed-off-by: Ophestra --- container/inittmpfs.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'container/inittmpfs.go') diff --git a/container/inittmpfs.go b/container/inittmpfs.go index d4f03237..332fec89 100644 --- a/container/inittmpfs.go +++ b/container/inittmpfs.go @@ -42,6 +42,11 @@ func (t *MountTmpfsOp) apply(*setupState) error { return mountTmpfs(t.FSName, toSysroot(t.Path.String()), t.Flags, t.Size, t.Perm) } -func (t *MountTmpfsOp) Is(op Op) bool { vt, ok := op.(*MountTmpfsOp); return ok && *t == *vt } +func (t *MountTmpfsOp) Is(op Op) bool { + vt, ok := op.(*MountTmpfsOp) + return ok && ((t == nil && vt == nil) || + (t.Path != nil && vt.Path != nil && t.Path.Is(vt.Path)) && + t.FSName == vt.FSName && t.Flags == vt.Flags && t.Size == vt.Size && t.Perm == vt.Perm) +} func (*MountTmpfsOp) prefix() string { return "mounting" } func (t *MountTmpfsOp) String() string { return fmt.Sprintf("tmpfs on %q size %d", t.Path, t.Size) } -- cgit v1.3.1