Fix init path passed to fexec_impl

Getting this path wrong breaks dynamically linking init.
This commit is contained in:
bjorn3
2026-04-27 20:35:05 +02:00
parent b1136568fa
commit 7757d2d32f
+2 -4
View File
@@ -222,17 +222,15 @@ pub fn main() -> ! {
cwd_fd: Some(cwd_fd.as_raw_fd()),
};
let path = "/scheme/initfs/bin/init";
let exe_path = "/scheme/initfs/bin/init";
let image_file = FdGuard::new(
syscall::openat(extrainfo.ns_fd.unwrap(), path, O_RDONLY | O_CLOEXEC, 0)
syscall::openat(extrainfo.ns_fd.unwrap(), exe_path, O_RDONLY | O_CLOEXEC, 0)
.expect("failed to open init"),
)
.to_upper()
.unwrap();
let exe_path = alloc::format!("/scheme/initfs{}", path);
let FexecResult::Interp {
path: interp_path,
interp_override,