diff options
author | M. Mohan Kumar <mohan@in.ibm.com> | 2011-12-14 13:49:28 +0530 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2012-01-04 20:13:39 +0530 |
commit | 4c793dda22213a7aba8e4d9a814e8f368a5f8bf7 (patch) | |
tree | 8e74ae998bb6e9edcc1376f9c9464d3fa7d4744d /vl.c | |
parent | ddca7f86ac022289840e0200fd4050b2b58e9176 (diff) |
hw/9pfs: Add new proxy filesystem driver
Add new proxy filesystem driver to add root privilege to qemu process.
It needs a helper process to be started by root user.
Following command line can be used to utilize proxy filesystem driver
-virtfs proxy,id=<id>,mount_tag=<tag>,socket_fd=<socket-fd>
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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2661,7 +2661,7 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_virtfs: { QemuOpts *fsdev; QemuOpts *device; - const char *writeout; + const char *writeout, *sock_fd; olist = qemu_find_opts("virtfs"); if (!olist) { @@ -2701,6 +2701,10 @@ int main(int argc, char **argv, char **envp) qemu_opt_set(fsdev, "path", qemu_opt_get(opts, "path")); qemu_opt_set(fsdev, "security_model", qemu_opt_get(opts, "security_model")); + sock_fd = qemu_opt_get(opts, "sock_fd"); + if (sock_fd) { + qemu_opt_set(fsdev, "sock_fd", sock_fd); + } qemu_opt_set_bool(fsdev, "readonly", qemu_opt_get_bool(opts, "readonly", 0)); |