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

Eric Blake eblake at redhat.com
Thu Dec 13 23:01:36 UTC 2012


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121213/11d1e93e/attachment-0001.sig>


More information about the libvir-list mailing list