]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: fix parsing 'cmd_per_lun' and 'max_sectors'
authorMo yuxiang <moyuxiang@huawei.com>
Thu, 14 Aug 2014 07:55:34 +0000 (15:55 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 14 Aug 2014 08:25:57 +0000 (10:25 +0200)
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>
src/conf/domain_conf.c

index 934f6cbf51b328ba38cdfb08a8f55c774c652c49..5c762fab40e9cc8e4574a62fab2d9651dd65abe6 100644 (file)
@@ -6295,10 +6295,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;
     }