Re: [libvirt] [PATCH]: Add floppy support to xm_internal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
     }
 

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]