diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-07 21:29:16 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-07 21:29:16 +0900 |
| commit | 5d18af00077ae6ba8ef686d1fd93d888f69681b2 (patch) | |
| tree | eff32422fe3ef095c6a915ccb41c2a10a06990f7 /container/initdev.go | |
| parent | 0e6c1a50260de141c50bb50fd3f2b2bcf9a3fe64 (diff) | |
container/fhs: move pathname constants
This allows referencing FHS pathnames without importing container.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/initdev.go')
| -rw-r--r-- | container/initdev.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/container/initdev.go b/container/initdev.go index e7c4eabf..89a66138 100644 --- a/container/initdev.go +++ b/container/initdev.go @@ -7,6 +7,7 @@ import ( . "syscall" "hakurei.app/container/check" + "hakurei.app/container/fhs" ) func init() { gob.Register(new(MountDevOp)) } @@ -49,7 +50,7 @@ func (d *MountDevOp) apply(state *setupState, k syscallDispatcher) error { } if err := k.bindMount( state, - toHost(FHSDev+name), + toHost(fhs.Dev+name), targetPath, 0, ); err != nil { @@ -58,15 +59,15 @@ func (d *MountDevOp) apply(state *setupState, k syscallDispatcher) error { } for i, name := range []string{"stdin", "stdout", "stderr"} { if err := k.symlink( - FHSProc+"self/fd/"+string(rune(i+'0')), + fhs.Proc+"self/fd/"+string(rune(i+'0')), path.Join(target, name), ); err != nil { return err } } for _, pair := range [][2]string{ - {FHSProc + "self/fd", "fd"}, - {FHSProc + "kcore", "core"}, + {fhs.Proc + "self/fd", "fd"}, + {fhs.Proc + "kcore", "core"}, {"pts/ptmx", "ptmx"}, } { if err := k.symlink(pair[0], path.Join(target, pair[1])); err != nil { |
