[libvirt] [PATCH v2 02/11] qemu: print PCI address hexadecimally in errors

Ján Tomko jtomko at redhat.com
Wed Apr 17 19:00:24 UTC 2013


Use the same formatting as we do for XML in error and debug outputs.
---
 src/qemu/qemu_command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 009d42d..ac5e1f3 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1204,7 +1204,7 @@ static char *qemuPCIAddressAsString(virDevicePCIAddressPtr addr)
         return NULL;
     }
 
-    if (virAsprintf(&str, "%d:%d:%d.%d",
+    if (virAsprintf(&str, "%.4x:%.2x:%.2x.%.1x",
                     addr->domain,
                     addr->bus,
                     addr->slot,
-- 
1.8.1.5




More information about the libvir-list mailing list