On Mon, Jul 20, 2009 at 12:51:22PM +0100, Mark McLoughlin wrote:
> The current code for parsing pci_add replies ignores the the domain and
> bus numbers. Re-write the code to rectify that.
>
> Also, since pci_add is used for NIC hotplug as well ask disk hotplug,
> re-factor the code into a separate function.
>
> * src/qemu_driver.c: add qemudParsePciAddReply() function which can
> handle parsing domain and bus numbers
> ---
> src/qemu_driver.c | 111
> +++++++++++++++++++++++++++++++++++++++--------------
Ah, okay, as raised previously I really prefer a full parsing.
but shouldn't the parsed item be saved in the Def directly, instead of
keeping the string version.
> + VIR_FREE(reply);
> +
> + if (virAsprintf(&dev->data.disk->pci_addr, "%.4x:%.2x:%.2x",
> + domain, bus, slot) < 0) {
> + virReportOOMError(conn);
> + return -1;
> + }
> +
And do that serialization only when outputting the commandlines ?
ACK,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
[email protected] | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
--
Libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list