qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC Patch 1/3] chardev: add new socket fd parameter for un


From: Wei Xu
Subject: [Qemu-devel] [RFC Patch 1/3] chardev: add new socket fd parameter for unix socket
Date: Wed, 22 Jun 2016 23:25:55 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

There has been comments on this patch, but i forgot adding this patch to the list, just forward it again.

When manage VMs via libvirt, qemu ofter runs with limited permission,
thus qemu can't create a file/socket, this patch is to  add a new
parameter 'sockfd' to accept fd opened and passed in from libvirt.

Signed-off-by: Wei Xu <address@hidden>
---
 qapi-schema.json | 3 ++-
 qemu-char.c      | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/qapi-schema.json b/qapi-schema.json
index 8483bdf..e9f0268 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -2921,7 +2921,8 @@
 ##
 { 'struct': 'UnixSocketAddress',
   'data': {
-    'path': 'str' } }
+    'path': 'str',
+    'sockfd': 'int32' } }

 ##
 # @SocketAddress
diff --git a/qemu-char.c b/qemu-char.c
index b597ee1..ea9c02e 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -4116,6 +4116,9 @@ QemuOptsList qemu_chardev_opts = {
             .name = "path",
             .type = QEMU_OPT_STRING,
         },{
+            .name = "sockfd",
+            .type = QEMU_OPT_NUMBER,
+        },{
             .name = "host",
             .type = QEMU_OPT_STRING,
         },{
--
2.7.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]