summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorM. Mohan Kumar <mohan@in.ibm.com>2011-10-25 12:10:39 +0530
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-10-31 12:34:17 +0530
commit2c74c2cb4bedddbfa67628fbd5f9273b4e0e9903 (patch)
tree308232ce3bd97b8e9641c88b396ed3e9c5009d90 /vl.c
parentf02b77c9bfc5c3ac93a89026f8c1d320f61f02c9 (diff)
downloadqemu-2c74c2cb4bedddbfa67628fbd5f9273b4e0e9903.tar.gz
hw/9pfs: Read-only support for 9p export
A new fsdev parameter "readonly" is introduced to control accessing 9p export. "readonly" can be used to specify the access type. By default "rw" access is given to 9p export. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index 1ddb17bfd9..c51a7403cb 100644
--- a/vl.c
+++ b/vl.c
@@ -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",