From 710d875fb7d1e3c584415105a67f66724d0ea89d Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Oct 19 2016 18:53:30 +0000 Subject: xl: fix 8126d870 broken test xlconfigtest expects the comma, don't clean it up even if there is no target to write. --- diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index 3752464..9a24039 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@ -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;