]> git.proxmox.com Git - mirror_qemu.git/commit - hmp.c
qapi: Drop inline nested structs in query-pci
authorEric Blake <eblake@redhat.com>
Mon, 4 May 2015 15:05:32 +0000 (09:05 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 5 May 2015 16:39:02 +0000 (18:39 +0200)
commit9fa02cd194a131aca75ab646ece975b6835400e1
tree4569f38c50dc9970128adb18f9e0c3cba9c9aea2
parent4752cdbbf330ac7c593a6f337b97a79648f3f878
qapi: Drop inline nested structs in query-pci

A future patch will be using a 'name':{dictionary} entry in the
QAPI schema to specify a default value for an optional argument
(see previous commit message for more details why); but existing
use of inline nested structs conflicts with that goal. This patch
fixes one of only two commands relying on nested types, by
breaking the nesting into an explicit type; it means that the
type is now boxed instead of unboxed in C code, but the QMP wire
format is unaffected by this change.

Prefer the safer g_new0() while making the conversion, and reduce
some long lines.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
hmp.c
hw/pci/pci.c
qapi-schema.json