diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-06-10 12:51:09 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-06-10 12:51:09 +0900 |
| commit | f333b8fbd677ac3ab18c96897e23b6eda19d6a53 (patch) | |
| tree | d265a909da2928f93f5609a335483f3165af87c2 /cmd | |
| parent | 928a9f61e92b1570a81d005e1c2e7e849336856f (diff) | |
cmd/mbf: register binfmt entry for shell
This fixes --arch for shell.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/mbf/main.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go index e4c6af96..4ca86cf2 100644 --- a/cmd/mbf/main.go +++ b/cmd/mbf/main.go @@ -1052,6 +1052,13 @@ func main() { Bind(tempdir, fhs.AbsTmp, std.BindWritable). Proc(fhs.AbsProc).Dev(fhs.AbsDev, true) + if flagArch != "" && flagArch != runtime.GOARCH { + if entry, ok := pkg.Arch()[flagArch]; ok { + z.InitAsRoot = true + z.Binfmt = []container.BinfmtEntry{entry} + } + } + if err := z.Start(); err != nil { return err } |
