libvirt/xen-pv-cdrom.patch

17 lines
681 B
Diff

Index: libvirt-0.6.5/src/xend_internal.c
===================================================================
--- libvirt-0.6.5.orig/src/xend_internal.c
+++ libvirt-0.6.5/src/xend_internal.c
@@ -5289,7 +5289,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co
} else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) {
virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst);
} else {
- virBufferVSprintf(buf, "(dev '%s')", def->dst);
+ if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM)
+ virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst);
+ else
+ virBufferVSprintf(buf, "(dev '%s')", def->dst);
}
if (def->src) {