]> xenbits.xensource.com Git - qemu-xen-3.3-testing.git/commitdiff
Always treat floppy images as raw xen-3.3.1-rc2
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 10 Dec 2008 15:30:49 +0000 (15:30 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 10 Dec 2008 15:38:11 +0000 (15:38 +0000)
The fix for the image format guessing vulnerability breaks raw floppy
images.  In our environment it is difficult to apply the same
configuration change as envisaged upstream, so instead we arrange to
always treat a floppy image as raw.

Two-line patch supplied by James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
(cherry picked from commit f2ce5c35f60bb606bd3ddb55c361bb8a9aad5c5c)

vl.c

diff --git a/vl.c b/vl.c
index 2f567410aae94fa7a4f158e432ebfdc891ac0745..57b88f31cb6b39751c9b823fcde5cc3cd7ec0cd7 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -5401,6 +5401,8 @@ static int drive_init(struct drive_opt *arg, int snapshot,
            approximation.  */
     case IF_FLOPPY:
         bdrv_set_type_hint(bdrv, BDRV_TYPE_FLOPPY);
+        if (!drv)
+            drv = &bdrv_raw;
         break;
     case IF_PFLASH:
     case IF_MTD: