[libvirt] [PATCH 1/1] 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> --- src/util/virpci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index 8f2936c23a..75e8daadd5 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -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; } -- 2.20.1

On Fri, 2019-06-21 at 12:58 -0300, Daniel Henrique Barboza wrote:
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> --- src/util/virpci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Andrea Bolognani <abologna@redhat.com> and pushed. -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
Daniel Henrique Barboza