From: Ian Jackson Date: Thu, 21 May 2009 16:57:38 +0000 (+0100) Subject: pass-through: porvide leading zero for vdevfn X-Git-Tag: xen-4.0.0-rc1~81 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=414a6144ec9a964fb4d2c201e9378cad59a46212;p=qemu-xen-4.2-testing.git pass-through: porvide leading zero for vdevfn This is consistent with the format used elsewhere. At this time this inconsistency manifests in the output of pci-list for functions that have been hot-plugged. While the pci-list output could be unified inside xm or xend by, for example parsing the string as an integer and then formating it as a string, there seems to be no disadvantage in making the string representation used consistent. Cc: Masaki Kanno Cc: Dexuan Cui Signed-off-by: Simon Horman --- diff --git a/hw/piix4acpi.c b/hw/piix4acpi.c index 7844cb8a9..d5c5c3553 100644 --- a/hw/piix4acpi.c +++ b/hw/piix4acpi.c @@ -508,7 +508,7 @@ void acpi_php_add(int slot) power_on_php_slot(slot); /* tell Control panel which slot for the new pass-throgh dev */ - sprintf(ret_str, "0x%x", slot); + sprintf(ret_str, "0x%02x", slot); xenstore_record_dm("parameter", ret_str); /* signal the CP ACPI hot insert done */