On Fri, Jan 08, 2010 at 05:23:09PM +0000, Daniel P. Berrange wrote: > It is perfectly acceptable to have multiple sound devices of > same type in guest configuration. If the underlying hypervisor > does not like this, it is its job to complain, not the XML > parser's > > * src/conf/domain_conf.c: Remove hack which deleted duplicated > sound device models. > * tests/xml2sexprdata/xml2sexpr-fv-sound.xml: Remove duplicate > models > --- > src/conf/domain_conf.c | 11 ----------- > tests/xml2sexprdata/xml2sexpr-fv-sound.xml | 3 --- > 2 files changed, 0 insertions(+), 14 deletions(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index dd10f36..5caf2ca 100644 > --- a/src/conf/domain_conf.c > +++ b/src/conf/domain_conf.c > @@ -3756,23 +3756,12 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn, > if (n && VIR_ALLOC_N(def->sounds, n) < 0) > goto no_memory; > for (i = 0 ; i < n ; i++) { > - int collision = 0, j; > virDomainSoundDefPtr sound = virDomainSoundDefParseXML(conn, > nodes[i], > flags); > if (!sound) > goto error; > > - /* Verify there's no duplicated sound card */ > - for (j = 0 ; j < def->nsounds ; j++) { > - if (def->sounds[j]->model == sound->model) > - collision = 1; > - } > - if (collision) { > - virDomainSoundDefFree(sound); > - continue; > - } > - > def->sounds[def->nsounds++] = sound; > } > VIR_FREE(nodes); > diff --git a/tests/xml2sexprdata/xml2sexpr-fv-sound.xml b/tests/xml2sexprdata/xml2sexpr-fv-sound.xml > index 0fe92fe..75c295c 100644 > --- a/tests/xml2sexprdata/xml2sexpr-fv-sound.xml > +++ b/tests/xml2sexprdata/xml2sexpr-fv-sound.xml > @@ -32,9 +32,6 @@ > </disk> > <graphics type='vnc' port='5917' keymap='ja'/> > <sound model='sb16'/> > - <sound model='sb16'/> > - <sound model='es1370'/> > - <sound model='sb16'/> > <sound model='es1370'/> > </devices> > </domain> makes sense, ACK, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@xxxxxxxxxxxx | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list