]> xenbits.xensource.com Git - libvirt.git/commitdiff
xl: fix 8126d870 broken test
authorCédric Bosdonnat <cbosdonnat@suse.com>
Wed, 19 Oct 2016 18:51:15 +0000 (20:51 +0200)
committerCédric Bosdonnat <cbosdonnat@suse.com>
Wed, 19 Oct 2016 18:53:30 +0000 (20:53 +0200)
xlconfigtest expects the comma, don't clean it up even if there is
no target to write.

src/xenconfig/xen_xl.c

index 3752464d298f52638e713425903effd614f99b4f..9a240390580a0c5c4973bdc3d74c75b1940a985c 100644 (file)
@@ -1068,7 +1068,7 @@ xenFormatXLDisk(virConfValuePtr list, virDomainDiskDefPtr disk)
 
     /* devtype */
     if (disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM)
-        virBufferAddLit(&buf, "devtype=cdrom");
+        virBufferAddLit(&buf, "devtype=cdrom,");
 
     /*
      * target
@@ -1082,7 +1082,7 @@ xenFormatXLDisk(virConfValuePtr list, virDomainDiskDefPtr disk)
         goto cleanup;
 
     if (target)
-        virBufferAsprintf(&buf, ",target=%s", target);
+        virBufferAsprintf(&buf, "target=%s", target);
 
     if (virBufferCheckError(&buf) < 0)
         goto cleanup;