mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
conf: Ignore device address for model=none usb controller and memballon
It make no sense at all to have it there. Signed-off-by: Luyao Huang <lhuang@redhat.com>
This commit is contained in:
parent
791fc05acc
commit
f6f4bd10b2
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user