Add --mount flag for 9p host directory sharing #9
+4
-1
@@ -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}"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user