]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Remove restriction on duplicated sound devices in parser
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 10 Dec 2009 19:06:54 +0000 (19:06 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 18 Jan 2010 12:44:50 +0000 (12:44 +0000)
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
tests/xml2sexprdata/xml2sexpr-fv-sound.xml

index 5c427fbcbbe770634b15206e21ab02673b3c44e3..d2da072fc723d0d8704d8a770e1953e2f390b226 100644 (file)
@@ -3764,23 +3764,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);
index 0fe92fe38970247936a11f5dd1ea3fb193d468c2..75c295cc2402efc1c846047d93a0a4289c311c78 100644 (file)
@@ -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>