From: Mo yuxiang Date: Thu, 14 Aug 2014 07:55:34 +0000 (+0800) Subject: conf: fix parsing 'cmd_per_lun' and 'max_sectors' X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e5e173bddf6b1c22a16237bc5b1583ec6140023a;p=thirdparty%2Flibvirt.git 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 (cherry picked from commit ca8ef1df3b1d1d828ab9b99acc18108faaf8ac64) --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c25c74b627..828667b9c5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6188,10 +6188,11 @@ virDomainControllerDefParseXML(xmlNodePtr node, cur = node->children; while (cur != NULL) { if (cur->type == XML_ELEMENT_NODE) { - if (xmlStrEqual(cur->name, BAD_CAST "driver")) + if (xmlStrEqual(cur->name, BAD_CAST "driver")) { queues = virXMLPropString(cur, "queues"); cmd_per_lun = virXMLPropString(cur, "cmd_per_lun"); max_sectors = virXMLPropString(cur, "max_sectors"); + } } cur = cur->next; }