Re: [PATCH v5.1 04/11] qemu: Record the default NIC model in the domain XML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/04/2013 06:10 AM, Peter Krempa wrote:
> This patch implements the devices post parse cllback and uses it to fill

s/cllback/callback/

> the default qemu network card model into the XML if none is specified.
> 
> Libvirt assumes that the network card model for qemu is the "rtl8139".
> Record this in the XML using the new callback to avoid user
> confusion.
> ---

> 
> +static int
> +qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
> +                             virDomainDefPtr def ATTRIBUTE_UNUSED,
> +                             virCapsPtr caps ATTRIBUTE_UNUSED,
> +                             void *opaque ATTRIBUTE_UNUSED)
> +{
> +    if (dev->type == VIR_DOMAIN_DEVICE_NET &&
> +        dev->data.net->type != VIR_DOMAIN_NET_TYPE_HOSTDEV) {
> +        if (!dev->data.net->model &&
> +            !(dev->data.net->model = strdup("rtl8139")))

Possible merge conflict with VIR_STRDUP patches, but we'll cross that
bridge when we get there.

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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]