virpci: report dev->name in virPCIGetHeaderType error message

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>
This commit is contained in:
Daniel Henrique Barboza 2019-06-21 12:58:28 -03:00 committed by Andrea Bolognani
parent a190f86729
commit 0a5a547725

View 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;
}