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

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



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


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