From 8aa65f28c68815db9dd1f246ee2656759574c3bb Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 17 Aug 2025 01:29:54 +0900 Subject: container: allow additional state between ops This is useful for ops that need to be aware of previous instances of themselves. Signed-off-by: Ophestra --- container/autoroot.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'container/autoroot.go') diff --git a/container/autoroot.go b/container/autoroot.go index 70b504eb..b155145c 100644 --- a/container/autoroot.go +++ b/container/autoroot.go @@ -28,7 +28,7 @@ type AutoRootOp struct { resolved []Op } -func (r *AutoRootOp) early(params *Params) error { +func (r *AutoRootOp) early(state *setupState) error { if r.Host == nil { return syscall.EBADE } @@ -45,7 +45,7 @@ func (r *AutoRootOp) early(params *Params) error { Target: AbsFHSRoot.Append(name), Flags: r.Flags, } - if err = op.early(params); err != nil { + if err = op.early(state); err != nil { return err } r.resolved = append(r.resolved, op) @@ -55,10 +55,10 @@ func (r *AutoRootOp) early(params *Params) error { } } -func (r *AutoRootOp) apply(params *Params) error { +func (r *AutoRootOp) apply(state *setupState) error { for _, op := range r.resolved { msg.Verbosef("%s %s", op.prefix(), op) - if err := op.apply(params); err != nil { + if err := op.apply(state); err != nil { return err } } -- cgit v1.3.1