From 5d18af00077ae6ba8ef686d1fd93d888f69681b2 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 7 Oct 2025 21:29:16 +0900 Subject: container/fhs: move pathname constants This allows referencing FHS pathnames without importing container. Signed-off-by: Ophestra --- container/initdev.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'container/initdev.go') 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 { -- cgit v1.3.1