Add --mount flag for 9p host directory sharing #9

Merged
hulthe merged 3 commits from feature/9p-mount into master 2026-09-11 09:36:00 +02:00
Showing only changes of commit c3b6a72d39 - Show all commits
+4 -1
View File
@@ -101,9 +101,12 @@ pub(crate) fn run(
let tag = format!("slim{i}");
let dest_b64 = base64::engine::general_purpose::STANDARD.encode(path_str.as_bytes());
// QEMU's QemuOpts splits on commas — escape literal commas in the
// path as ",," per QEMU convention.
let path_escaped = path_str.replace(',', ",,");
virtfs_args.push("-virtfs".into());
virtfs_args.push(format!(
"local,path={path_str},mount_tag={tag},security_model=mapped-xattr"
"local,path={path_escaped},mount_tag={tag},security_model=mapped-xattr"
));
cmdline.push(format!("slim.mount={tag}:{dest_b64}"));
}