]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: escape string for disk driver name attribute
authorLuyao Huang <lhuang@redhat.com>
Tue, 22 Sep 2015 08:13:53 +0000 (16:13 +0800)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 23 Sep 2015 09:46:16 +0000 (11:46 +0200)
Just like e92e5ba1, this attribute was missed.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
src/conf/domain_conf.c

index 2c723f97be8d8827b6a521742b094225020d8c33..c8909776e4df31bb73017971fe1f3ab61cc1aed5 100644 (file)
@@ -18917,8 +18917,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
         def->ioeventfd || def->event_idx || def->copy_on_read ||
         def->discard || def->iothread) {
         virBufferAddLit(buf, "<driver");
-        if (def->src->driverName)
-            virBufferAsprintf(buf, " name='%s'", def->src->driverName);
+        virBufferEscapeString(buf, " name='%s'", def->src->driverName);
         if (def->src->format > 0)
             virBufferAsprintf(buf, " type='%s'",
                               virStorageFileFormatTypeToString(def->src->format));