aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2014-04-10 10:24:36 +0200
committerLuiz Capitulino <lcapitulino@redhat.com>2014-05-08 14:19:59 -0400
commitcd9aa33e2cab11fb89071dc2f48550431406e524 (patch)
treef4082c171e3084a6a6f03850d381da95567f6d95 /include
parent665f119fbad97c05c2603673ac6b2dcbf0d0e9e1 (diff)
pci: add Error-propagating pci_add_capability2()
... and rebase pci_add_capability() to it. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/pci/pci.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 693dd6b658..8c25ae5d1d 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -6,6 +6,7 @@
#include "hw/qdev.h"
#include "exec/memory.h"
#include "sysemu/dma.h"
+#include "qapi/error.h"
/* PCI includes legacy ISA access. */
#include "hw/isa/isa.h"
@@ -308,6 +309,9 @@ pcibus_t pci_get_bar_addr(PCIDevice *pci_dev, int region_num);
int pci_add_capability(PCIDevice *pdev, uint8_t cap_id,
uint8_t offset, uint8_t size);
+int pci_add_capability2(PCIDevice *pdev, uint8_t cap_id,
+ uint8_t offset, uint8_t size,
+ Error **errp);
void pci_del_capability(PCIDevice *pci_dev, uint8_t cap_id, uint8_t cap_size);