]> xenbits.xensource.com Git - libvirt.git/commitdiff
virpci: report dev->name in virPCIGetHeaderType error message
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Fri, 21 Jun 2019 15:58:28 +0000 (12:58 -0300)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 24 Jun 2019 16:06:59 +0000 (18:06 +0200)
Trivial change. Adding the name of the device that has an
unknown PCI header type in that function helps when debugging
PCI code.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/util/virpci.c

index 8f2936c23aa7fdd9e5b6096655b2e2969414f567..75e8daadd55d1ceccab4d6eca3ad65a5a76ef00a 100644 (file)
@@ -3239,7 +3239,8 @@ int virPCIGetHeaderType(virPCIDevicePtr dev, int *hdrType)
     type &= PCI_HEADER_TYPE_MASK;
     if (type >= VIR_PCI_HEADER_LAST) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Unknown PCI header type '%d'"), type);
+                       _("Unknown PCI header type '%d' for device '%s'"),
+                       type, dev->name);
         return -1;
     }