On 06/22/2016 09:25 AM, Wei Xu wrote:
> 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 <w...@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' } }

Missing documentation.

This makes the new 'sockfd' parameter mandatory, but SocketAddress is an
input type.  This is not backwards compatible.  At best, you'd want to
make it optional, but I'm not even convinced you want to add it, since
we already can use the magic /dev/fdset/nnn in 'path' to pass an
arbitrary fd if the underlying code uses qemu_open().

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to