diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-20 20:17:28 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-20 20:17:28 +0900 |
| commit | a1482ecdd0f98728f4b97137cd7b2fa17f67bb89 (patch) | |
| tree | a1ef24752ffc3a2b5f5dfdecc440d2fc46968267 /container/inittmpfs.go | |
| parent | a07f9ed84c9fc131dba261c5175aa90b6f3e5331 (diff) | |
container/inittmpfs: check path equivalence by value
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/inittmpfs.go')
| -rw-r--r-- | container/inittmpfs.go | 7 |
1 files changed, 6 insertions, 1 deletions
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) } |
