]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: handle floppy disk bus when parsing command line argv
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 9 Nov 2015 13:26:09 +0000 (13:26 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 10 Nov 2015 10:38:01 +0000 (10:38 +0000)
The QEMU argv -> virDomainDef conversion code was not handling
-drive arguments using the floppy bus. This caused them to be
added as hard disks instead.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/qemu/qemu_command.c

index 5749cd953de028cefb94187b236a161692da2de1..c159f31ae7cf800017efc3df3b8b140badd1ecb2 100644 (file)
@@ -12022,6 +12022,9 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
                 }
             } else if (STREQ(values[i], "scsi")) {
                 def->bus = VIR_DOMAIN_DISK_BUS_SCSI;
+            } else if (STREQ(values[i], "floppy")) {
+                def->bus = VIR_DOMAIN_DISK_BUS_FDC;
+                def->device = VIR_DOMAIN_DISK_DEVICE_FLOPPY;
             } else if (STREQ(values[i], "virtio")) {
                 def->bus = VIR_DOMAIN_DISK_BUS_VIRTIO;
             } else if (STREQ(values[i], "xen")) {
@@ -12191,6 +12194,8 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
         ignore_value(VIR_STRDUP(def->dst, "vda"));
     } else if (def->bus == VIR_DOMAIN_DISK_BUS_XEN) {
         ignore_value(VIR_STRDUP(def->dst, "xvda"));
+    } else if (def->bus == VIR_DOMAIN_DISK_BUS_FDC) {
+        ignore_value(VIR_STRDUP(def->dst, "fda"));
     } else {
         ignore_value(VIR_STRDUP(def->dst, "hda"));
     }