[PATCH] conf: Ignore device address for model=none usb controller and memballon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It make no sense at all to have it there.

Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index ec45b8c..2965d8d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6683,8 +6683,12 @@ virDomainControllerDefParseXML(xmlNodePtr node,
                        _("Malformed 'max_sectors' value %s'"), max_sectors);
     }
 
-    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: {
@@ -9989,7 +9993,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:
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]