aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/autoroot.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-17 01:29:54 +0900
committerOphestra <cat@gensokyo.uk>2025-08-17 01:32:07 +0900
commit8aa65f28c68815db9dd1f246ee2656759574c3bb (patch)
tree5bd72d78f6a77defb5cda3767016f97a7f1c2adc /container/autoroot.go
parentf9edec7e4169ecda63ba15762f12e64803b9984d (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'container/autoroot.go')
-rw-r--r--container/autoroot.go8
1 files changed, 4 insertions, 4 deletions
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
}
}