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

Eric Blake eblake at redhat.com
Wed Apr 17 21:07:54 UTC 2013


On 04/17/2013 01:00 PM, Ján Tomko wrote:
> 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(-)

ACK; qemuPCIAddressAsString is only used for hash lookups, and is not
something directly handed to qemu.

> 
> 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,
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130417/5b0ad1dc/attachment-0001.sig>


More information about the libvir-list mailing list