[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 2/4] i386/pc: '-drive if=floppy' should imply a b
From: |
Laszlo Ersek |
Subject: |
[Qemu-block] [PATCH v2 2/4] i386/pc: '-drive if=floppy' should imply a board-default FDC |
Date: |
Thu, 28 May 2015 22:04:09 +0200 |
Even if board code decides not to request the creation of the FDC (keyed
off board-level factors, to be determined later), we should create the FDC
nevertheless if the user passes '-drive if=floppy' on the command line.
Otherwise '-drive if=floppy' would break without explicit '-device
isa-fdc' on such boards.
Cc: Markus Armbruster <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Gerd Hoffmann <address@hidden>
Cc: John Snow <address@hidden>
Cc: "Gabriel L. Somlo" <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Kevin Wolf <address@hidden>
Cc: address@hidden
Signed-off-by: Laszlo Ersek <address@hidden>
---
Notes:
v2:
- separate this "magic" out to a standalone patch [Markus, Michael]
hw/i386/pc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a49323d..90fb309 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1490,6 +1490,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
for(i = 0; i < MAX_FD; i++) {
fd[i] = drive_get(IF_FLOPPY, 0, i);
+ create_fdctrl |= !!fd[i];
}
*floppy = create_fdctrl ? fdctrl_init_isa(isa_bus, fd) : NULL;
}
--
1.8.3.1