File 710d875f-libxl-cdrom-config-test.patch of Package libvirt.8364

commit 710d875fb7d1e3c584415105a67f66724d0ea89d
Author: C├ędric Bosdonnat <cbosdonnat@suse.com>
Date:   Wed Oct 19 20:51:15 2016 +0200

    xl: fix 8126d870 broken test
    
    xlconfigtest expects the comma, don't clean it up even if there is
    no target to write.

Index: libvirt-2.0.0/src/xenconfig/xen_xl.c
===================================================================
--- libvirt-2.0.0.orig/src/xenconfig/xen_xl.c
+++ libvirt-2.0.0/src/xenconfig/xen_xl.c
@@ -976,7 +976,7 @@ xenFormatXLDisk(virConfValuePtr list, vi
 
     /* devtype */
     if (disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM)
-        virBufferAddLit(&buf, "devtype=cdrom");
+        virBufferAddLit(&buf, "devtype=cdrom,");
 
     /*
      * target
@@ -990,7 +990,7 @@ xenFormatXLDisk(virConfValuePtr list, vi
         goto cleanup;
 
     if (target)
-        virBufferAsprintf(&buf, ",target=%s", target);
+        virBufferAsprintf(&buf, "target=%s", target);
 
     if (virBufferCheckError(&buf) < 0)
         goto cleanup;
openSUSE Build Service is sponsored by