]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Ignore device address for model=none usb controller and memballon
authorLuyao Huang <lhuang@redhat.com>
Fri, 12 Dec 2014 02:32:53 +0000 (10:32 +0800)
committerMartin Kletzander <mkletzan@redhat.com>
Sat, 13 Dec 2014 09:01:31 +0000 (10:01 +0100)
It make no sense at all to have it there.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
src/conf/domain_conf.c

index defa44058b5bc6c9ea3746767f47ed0f2fd57f77..d4ac301d6d00855f6a87790c31da5bf4b17b26be 100644 (file)
@@ -6684,8 +6684,12 @@ virDomainControllerDefParseXML(xmlNodePtr node,
         goto error;
     }
 
-    if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)
+    if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
+        def->model == VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE) {
+        VIR_DEBUG("Ignoring device address for none model usb controller");
+    } else if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0) {
         goto error;
+    }
 
     switch (def->type) {
     case VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL: {
@@ -9990,7 +9994,9 @@ virDomainMemballoonDefParseXML(xmlNodePtr node,
         goto error;
     }
 
-    if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)
+    if (def->model == VIR_DOMAIN_MEMBALLOON_MODEL_NONE)
+        VIR_DEBUG("Ignoring device address for none model Memballoon");
+    else if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)
         goto error;
 
  cleanup: