[libvirt] [PATCH]: Add floppy support to xm_internal
John Levon
levon at movementarian.org
Fri Jul 18 16:31:27 UTC 2008
On Fri, Jul 18, 2008 at 02:05:06PM +0200, Chris Lalancette wrote:
> What this actually means is that we shouldn't parse the floppy stuff to put it
> in the "disks =" section of the /etc/xen configuration file, since it doesn't
> have meaning there. Instead, floppy disks go at the top-level of a Xen config
> file, like:
Hmm, is your patch so complicated just because you have to support
/etc/xen .py style output on your old Xen versions?
Our version of this patch is just:
diff --git a/src/xml.c b/src/xml.c
--- libvirt-0.4.0/src/xml.c
+++ libvirt-0.4.0/src/xml.c
@@ -1292,8 +1292,20 @@ virDomainParseXMLDiskDesc(virConnectPtr
/* Xend (all versions) put the floppy device config
* under the hvm (image (os)) block
+ *
+ * (image
+ * (hvm
+ * (fda <file>)
+ * )
+ * )
*/
if (hvm && device && !strcmp((const char *) device, "floppy")) {
+ virBufferAdd(buf, "(image ", 7);
+ virBufferAdd(buf, "(hvm ", 5);
+ virBufferVSprintf(buf, "(%s %s)", (const char *) target,
+ (const char *) source);
+ virBufferAdd(buf, ")", 1);
+ virBufferAdd(buf, ")", 1);
goto cleanup;
}
More information about the libvir-list
mailing list