diff options
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -2707,6 +2707,8 @@ int main(int argc, char **argv, char **envp) qemu_opt_set(fsdev, "security_model", qemu_opt_get(opts, "security_model")); + qemu_opt_set_bool(fsdev, "readonly", + qemu_opt_get_bool(opts, "readonly", 0)); device = qemu_opts_create(qemu_find_opts("device"), NULL, 0); qemu_opt_set(device, "driver", "virtio-9p-pci"); qemu_opt_set(device, "fsdev", @@ -2715,6 +2717,24 @@ int main(int argc, char **argv, char **envp) qemu_opt_get(opts, "mount_tag")); break; } + case QEMU_OPTION_virtfs_synth: { + QemuOpts *fsdev; + QemuOpts *device; + + fsdev = qemu_opts_create(qemu_find_opts("fsdev"), "v_synth", 1); + if (!fsdev) { + fprintf(stderr, "duplicate option: %s\n", "virtfs_synth"); + exit(1); + } + qemu_opt_set(fsdev, "fsdriver", "synth"); + qemu_opt_set(fsdev, "path", "/"); /* ignored */ + + device = qemu_opts_create(qemu_find_opts("device"), NULL, 0); + qemu_opt_set(device, "driver", "virtio-9p-pci"); + qemu_opt_set(device, "fsdev", "v_synth"); + qemu_opt_set(device, "mount_tag", "v_synth"); + break; + } case QEMU_OPTION_serial: add_device_config(DEV_SERIAL, optarg); default_serial = 0; |