From cedfceded548ef3b8d80b4e46e64dbaa9de8bd93 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 25 Aug 2025 03:38:12 +0900 Subject: container/autoroot: remove prefix field This field has been a noop for a long time. Remove it to prevent further confusion. Signed-off-by: Ophestra --- container/autoroot.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'container/autoroot.go') diff --git a/container/autoroot.go b/container/autoroot.go index e1c397c9..69595c2e 100644 --- a/container/autoroot.go +++ b/container/autoroot.go @@ -10,14 +10,13 @@ func init() { gob.Register(new(AutoRootOp)) } // Root appends an [Op] that expands a directory into a toplevel bind mount mirror on container root. // This is not a generic setup op. It is implemented here to reduce ipc overhead. -func (f *Ops) Root(host *Absolute, prefix string, flags int) *Ops { - *f = append(*f, &AutoRootOp{host, prefix, flags, nil}) +func (f *Ops) Root(host *Absolute, flags int) *Ops { + *f = append(*f, &AutoRootOp{host, flags, nil}) return f } type AutoRootOp struct { - Host *Absolute - Prefix string + Host *Absolute // passed through to bindMount Flags int @@ -71,12 +70,11 @@ func (r *AutoRootOp) Is(op Op) bool { vr, ok := op.(*AutoRootOp) return ok && r.Valid() && vr.Valid() && r.Host.Is(vr.Host) && - r.Prefix == vr.Prefix && r.Flags == vr.Flags } func (*AutoRootOp) prefix() string { return "setting up" } func (r *AutoRootOp) String() string { - return fmt.Sprintf("auto root %q prefix %s flags %#x", r.Host, r.Prefix, r.Flags) + return fmt.Sprintf("auto root %q flags %#x", r.Host, r.Flags) } // IsAutoRootBindable returns whether a dir entry name is selected for AutoRoot. -- cgit v1.3.1