Re: [PATCH v3 2/4] conf: add optional attribte primary to video <model> element

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

 



On 12/13/2012 02:06 AM, Guannan Ren wrote:
> If there are multiple video devices
> primary = 'yes' marks this video device as the primary one.
> The rest are secondary video devices. No more than one could be
> mark as primary. If none of them has primary attribute, the first
> one will be the primary by default like what it was.
> The reason of this changing is that for qemu, only one primary video
> device is permitted which can be of any type. For secondary video
> devices, only qxl is allowd. Primary attribute removes the restriction
> that the first have to be the primary one.
> 
> We always put the primary video device into the first position of
> video device structure array after parsing.

> @@ -10001,7 +10008,23 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
>                                                                 flags);
>          if (!video)
>              goto error;
> -        def->videos[def->nvideos++] = video;
> +
> +        size_t ii = def->nvideos;

The compiler didn't warn about a declaration after a goto?  C99 permits
this late declaration, but our style has tended to be more like C89 with
declarations hoisted to the top.

ACK.

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