From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctZv8-0002cu-25 for qemu-devel@nongnu.org; Thu, 30 Mar 2017 09:15:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctZv7-0002V1-10 for qemu-devel@nongnu.org; Thu, 30 Mar 2017 09:15:22 -0400 From: Markus Armbruster Date: Thu, 30 Mar 2017 15:15:03 +0200 Message-Id: <1490879707-6060-7-git-send-email-armbru@redhat.com> In-Reply-To: <1490879707-6060-1-git-send-email-armbru@redhat.com> References: <1490879707-6060-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [RFC v2 for-2.9 06/10] qapi-schema: SocketAddressFlat variants 'vsock' and 'fd' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, mitake.hitoshi@lab.ntt.co.jp, namei.unix@gmail.com, jcody@redhat.com, kwolf@redhat.com, mreitz@redhat.com, eblake@redhat.com, pbonzini@redhat.com Note that the new variants are impossible in qemu_gluster_glfs_init(), because the gconf->server can only come from qemu_gluster_parse_uri() or qemu_gluster_parse_json(), and neither can create anything but 'inet' or 'unix'. Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz --- block/gluster.c | 2 ++ qapi-schema.json | 19 ++++++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index fb0aafe..cf29b5f 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -429,6 +429,8 @@ static struct glfs *qemu_gluster_glfs_init(BlockdevOptionsGluster *gconf, server->value->u.inet.host, (int)port); break; + case SOCKET_ADDRESS_FLAT_TYPE_VSOCK: + case SOCKET_ADDRESS_FLAT_TYPE_FD: default: abort(); } diff --git a/qapi-schema.json b/qapi-schema.json index b921994..927c9a2 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4144,7 +4144,7 @@ # Since: 2.9 ## { 'enum': 'SocketAddressFlatType', - 'data': [ 'unix', 'inet' ] } + 'data': [ 'inet', 'unix', 'vsock', 'fd' ] } ## # @SocketAddressFlat: @@ -4153,22 +4153,19 @@ # # @type: Transport type # -# This is similar to SocketAddress, only distinction: -# -# 1. SocketAddressFlat is a flat union, SocketAddress is a simple union. -# A flat union is nicer than simple because it avoids nesting -# (i.e. more {}) on the wire. -# -# 2. SocketAddressFlat supports only types 'unix' and 'inet', because -# that's what its current users need. +# This is just like SocketAddress, except it's a flat union rather +# than a simple union. Nicer because it avoids nesting (i.e. more {}) +# on the wire. # # Since: 2.9 ## { 'union': 'SocketAddressFlat', 'base': { 'type': 'SocketAddressFlatType' }, 'discriminator': 'type', - 'data': { 'unix': 'UnixSocketAddress', - 'inet': 'InetSocketAddress' } } + 'data': { 'inet': 'InetSocketAddress', + 'unix': 'UnixSocketAddress', + 'vsock': 'VsockSocketAddress', + 'fd': 'String' } } ## # @getfd: -- 2.7.4