[libvirt] [PATCH libvirt 2/8] domain: add <codec> sound sub-element
Eric Blake
eblake at redhat.com
Thu May 17 17:40:07 UTC 2012
On 05/15/2012 04:55 PM, Marc-André Lureau wrote:
> Allow specifying sound device codecs. See formatdomain.html for
> more details.
> ---
> docs/formatdomain.html.in | 19 +++++++
> docs/schemas/domaincommon.rng | 29 +++++++---
> src/conf/domain_conf.c | 120 ++++++++++++++++++++++++++++++++++++++++-
> src/conf/domain_conf.h | 20 +++++++
> 4 files changed, 180 insertions(+), 8 deletions(-)
>
> +static int
> virDomainSoundDefFormat(virBufferPtr buf,
> virDomainSoundDefPtr def,
> unsigned int flags)
> {
> const char *model = virDomainSoundModelTypeToString(def->model);
> + int children = 0;
You are using this as a bool.
ACK with this squashed in:
diff --git i/src/conf/domain_conf.c w/src/conf/domain_conf.c
index 78755cf..9def71d 100644
--- i/src/conf/domain_conf.c
+++ w/src/conf/domain_conf.c
@@ -11888,7 +11888,7 @@ virDomainSoundDefFormat(virBufferPtr buf,
unsigned int flags)
{
const char *model = virDomainSoundModelTypeToString(def->model);
- int children = 0;
+ bool children = false;
int i;
if (!model) {
@@ -11902,7 +11902,7 @@ virDomainSoundDefFormat(virBufferPtr buf,
for (i = 0; i < def->ncodecs; i++) {
if (!children) {
virBufferAddLit(buf, ">\n");
- children = 1;
+ children = true;
}
virDomainSoundCodecDefFormat(buf, def->codecs[i]);
}
@@ -11910,7 +11910,7 @@ virDomainSoundDefFormat(virBufferPtr buf,
if (virDomainDeviceInfoIsSet(&def->info, flags)) {
if (!children) {
virBufferAddLit(buf, ">\n");
- children = 1;
+ children = true;
}
if (virDomainDeviceInfoFormat(buf, &def->info, flags) < 0)
return -1;
--
Eric Blake eblake at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120517/54b9dcf4/attachment-0001.sig>
More information about the libvir-list
mailing list