From: Wei Xu <wexu@redhat.com>
To: qemu-devel@nongnu.org
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 [thread overview]
Message-ID: <576AAE03.3000403@redhat.com> (raw)
In-Reply-To: <1464712247-11655-2-git-send-email-wexu@redhat.com>
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 <wexu@redhat.com>
---
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
next parent reply other threads:[~2016-06-22 15:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1464712247-11655-2-git-send-email-wexu@redhat.com>
2016-06-22 15:25 ` Wei Xu [this message]
2016-06-22 15:39 ` [Qemu-devel] [RFC Patch 1/3] chardev: add new socket fd parameter for unix socket Eric Blake
2016-06-22 16:46 ` Wei Xu
2016-06-27 15:47 ` Wei Xu
2016-06-28 6:48 ` Michael S. Tsirkin
2016-06-28 7:37 ` Wei Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=576AAE03.3000403@redhat.com \
--to=wexu@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).