mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
conf: fix parsing 'cmd_per_lun' and 'max_sectors'
commit d9504941 introduces two new attributes "cmd_per_lun" and "max_sectors" same with the names QEMU uses for virtio-scsi. But the case of parsing them is not exact. Change to parse them if controller has "driver" element. Signed-off-by: Mo yuxiang <moyuxiang@huawei.com>
This commit is contained in:
parent
bd3b76e355
commit
ca8ef1df3b
@ -6295,11 +6295,12 @@ virDomainControllerDefParseXML(xmlNodePtr node,
|
|||||||
cur = node->children;
|
cur = node->children;
|
||||||
while (cur != NULL) {
|
while (cur != NULL) {
|
||||||
if (cur->type == XML_ELEMENT_NODE) {
|
if (cur->type == XML_ELEMENT_NODE) {
|
||||||
if (xmlStrEqual(cur->name, BAD_CAST "driver"))
|
if (xmlStrEqual(cur->name, BAD_CAST "driver")) {
|
||||||
queues = virXMLPropString(cur, "queues");
|
queues = virXMLPropString(cur, "queues");
|
||||||
cmd_per_lun = virXMLPropString(cur, "cmd_per_lun");
|
cmd_per_lun = virXMLPropString(cur, "cmd_per_lun");
|
||||||
max_sectors = virXMLPropString(cur, "max_sectors");
|
max_sectors = virXMLPropString(cur, "max_sectors");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user