From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbhCt-0006Ei-Ex for qemu-devel@nongnu.org; Mon, 14 Sep 2015 23:47:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbhCs-0002FW-Gm for qemu-devel@nongnu.org; Mon, 14 Sep 2015 23:46:59 -0400 References: <1441878905-5272-1-git-send-email-wency@cn.fujitsu.com> <1441878905-5272-2-git-send-email-wency@cn.fujitsu.com> <87r3m1krdl.fsf@blackfin.pond.sub.org> <55F6EBF5.2090101@redhat.com> <55F78059.4030309@cn.fujitsu.com> <55F78225.404@cn.fujitsu.com> From: Eric Blake Message-ID: <55F794A4.5060903@redhat.com> Date: Mon, 14 Sep 2015 21:46:44 -0600 MIME-Version: 1.0 In-Reply-To: <55F78225.404@cn.fujitsu.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wo3fB7HPW9wD5tbCARmo1CB2R9pUi4lxt" Subject: Re: [Qemu-devel] [PATCH v3 1/5] support nbd driver in blockdev-add List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang , Markus Armbruster Cc: Kevin Wolf , Alberto Garcia , zhanghailiang , qemu block , Jiang Yunhong , Dong Eddie , qemu devel , "Dr. David Alan Gilbert" , Gonglei , Stefan Hajnoczi , Yang Hongyang This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wo3fB7HPW9wD5tbCARmo1CB2R9pUi4lxt Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/14/2015 08:27 PM, Wen Congyang wrote: >> Building fails: >> GEN qmp-commands.h >> In file included from /work/src/qemu/qapi-schema.json:9: >> In file included from /work/src/qemu/qapi/block.json:6: >> /work/src/qemu/qapi/block-core.json:1844: Flat union 'BlockdevOptionsN= BD' must have a string base field >> Makefile:286: recipe for target 'qmp-commands.h' failed >> make: *** [qmp-commands.h] Error 1 Yep, doesn't work until pending qapi patches land. >> >> What about this: >> { 'struct': 'BlockdevOptionsNBDBase', >> 'data': { 'transport': 'NBDTransport', 'export': 'str' } } >> { 'union': 'BlockdevOptionsNBD', >> 'base': 'BlockdevOptionsNBDBase', >> 'discriminator': 'transport', >> 'data': { 'unix': 'NBDUnix', 'tcp': 'NBDInet', 'udp': 'NBDInet' } } >=20 > Another problem: > In file included from /work/src/qemu/qapi-schema.json:9: > In file included from /work/src/qemu/qapi/block.json:6: > /work/src/qemu/qapi/block-core.json:1866: Member 'nbd' of union 'Blockd= evOptions' cannot use union type 'BlockdevOptionsNBD' > Makefile:286: recipe for target 'qmp-commands.h' failed Yep. Artificial restriction; we hope to lift it soon, but don't have enough qapi patches in place for that one yet (I have not posted my work in progress to get us that far). Possible workaround in the meantime - instead of trying to go with a nice flat union (where all QMP keys are in the same {} level), we can use nesting (structs that add another {} to include the unions). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --wo3fB7HPW9wD5tbCARmo1CB2R9pUi4lxt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV95SkAAoJEKeha0olJ0NqkosH/ApMonnPUUq1ADR3lvDAFtE0 KftONq1b7ht81kcTaAj59039Z/4/HAP9pnXP6g8PqbOtBPwMeeWf8AdrcltuTt3n n2TgOnUQACiNjxwPiiPKu5OE91r3XZ1s0+ky1Z7GYlOTF3M+/x2EqVjwIXRO1T9Q FiFYY4Qk0j1UvWIJZK1MqOVXOg7MXCRIJi587JkU1u2h9IaMNWkPWRvh87pnCO7R PdfcekEGKpHMorJOzskVzY7QxLIsABOzL5Ln5t7Jq8nqVsVogB2G5MPortVy+eJr osyTD6HAkyE+tosOje6SzXSUJy8LbClxpHqbmdeLzk8zQ8b/62vSjHRdWuI7qlc= =ueJg -----END PGP SIGNATURE----- --wo3fB7HPW9wD5tbCARmo1CB2R9pUi4lxt--