diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-07 20:06:26 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-07 20:57:58 +0900 |
| commit | 0e6c1a50260de141c50bb50fd3f2b2bcf9a3fe64 (patch) | |
| tree | dfe9c40ceb8c1be8d2728a2db9017bffef174d3d /container/autoetc.go | |
| parent | d23b4dc9e64d3f00e746c65f3038a1a6de44b8f5 (diff) | |
container/check: move absolute pathname
This allows use of absolute pathname values without importing container.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/autoetc.go')
| -rw-r--r-- | container/autoetc.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/container/autoetc.go b/container/autoetc.go index 9a587404..295bdf71 100644 --- a/container/autoetc.go +++ b/container/autoetc.go @@ -3,13 +3,15 @@ package container import ( "encoding/gob" "fmt" + + "hakurei.app/container/check" ) func init() { gob.Register(new(AutoEtcOp)) } // Etc appends an [Op] that expands host /etc into a toplevel symlink mirror with /etc semantics. // This is not a generic setup op. It is implemented here to reduce ipc overhead. -func (f *Ops) Etc(host *Absolute, prefix string) *Ops { +func (f *Ops) Etc(host *check.Absolute, prefix string) *Ops { e := &AutoEtcOp{prefix} f.Mkdir(AbsFHSEtc, 0755) f.Bind(host, e.hostPath(), 0) @@ -57,8 +59,8 @@ func (e *AutoEtcOp) apply(state *setupState, k syscallDispatcher) error { return nil } -func (e *AutoEtcOp) hostPath() *Absolute { return AbsFHSEtc.Append(e.hostRel()) } -func (e *AutoEtcOp) hostRel() string { return ".host/" + e.Prefix } +func (e *AutoEtcOp) hostPath() *check.Absolute { return AbsFHSEtc.Append(e.hostRel()) } +func (e *AutoEtcOp) hostRel() string { return ".host/" + e.Prefix } func (e *AutoEtcOp) Is(op Op) bool { ve, ok := op.(*AutoEtcOp) |
