pci: Use struct instead of QDict to pass back parameters
commit9edd5338a2404909ac8d373964021e6dbb8f5815
authorEric Blake <eblake@redhat.com>
Thu, 27 Apr 2017 21:58:12 +0000 (27 16:58 -0500)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 8 May 2017 18:32:14 +0000 (8 20:32 +0200)
treec3c730fbeac61539516f60c27677737d3bb8e56c
parentcb69166bb8defaaa4b3e0a4e31de693737634a54
pci: Use struct instead of QDict to pass back parameters

It's simpler to just use a C struct than it is to bundle things
into a QDict in one function just to pull them back out in the
caller.  Plus, doing this gets rid of one more user of dynamic
JSON through qobject_from_jsonf(), as well as a memory leak of
the QDict.

While cleaning the code, fix things to report all errors (the
code was previously silently ignoring a failure of
pcie_aer_inject_error(), at a distance).

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20170427215821.19397-2-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
hw/pci/pcie_aer.c