Skip to content

Commit 729f613

Browse files
committed
mount: Symlink remaining FEX-Emu shared files
This is needed for thunks to work. Signed-off-by: Asahi Lina <[email protected]>
1 parent 13b10f7 commit 729f613

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

crates/muvm/src/guest/mount.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,19 @@ fn mount_fex_rootfs() -> Result<()> {
8888
if Path::new(base).exists() {
8989
let json = format!("{{\"Config\":{{\"RootFS\":\"{dir_rootfs}\"}}}}\n");
9090
let path = base.to_string() + "/Config.json";
91+
let host_dir = "/run/muvm-host".to_string() + base;
9192

9293
make_tmpfs(base)?;
94+
for entry in read_dir(host_dir).unwrap() {
95+
let entry = entry.unwrap();
96+
let file_name = entry.file_name();
97+
if file_name == "Config.json" {
98+
continue;
99+
}
100+
let dest = Path::new(base).join(file_name);
101+
symlink(entry.path(), dest)?;
102+
}
103+
93104
File::create(Path::new(&path))?.write_all(json.as_bytes())?;
94105
}
95106
}

0 commit comments

Comments
 (0)