pc: Fix floppy drives with if=none
authorKevin Wolf <kwolf@redhat.com>
Thu, 20 Oct 2011 14:37:26 +0000 (16:37 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 21 Oct 2011 15:34:13 +0000 (17:34 +0200)
commit34d4260e1846d69d7241f690534e3dd4b3e6fd5b
treee83d8de7cd4b1eee4a5a10e31e9922a78318adaf
parent8f1efd00c4b2aa2b75fd20b5ee592ed47d33d5a7
pc: Fix floppy drives with if=none

Commit 63ffb564 broke floppy devices specified on the command line like
-drive file=...,if=none,id=floppy -global isa-fdc.driveA=floppy because it
relies on drive_get() which works only with -fda/-drive if=floppy.

This patch resembles what we're already doing for IDE, i.e. remember the floppy
device that was created and use that to extract the BlockDriverStates where
needed.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
hw/fdc.c
hw/fdc.h
hw/pc.c
hw/pc.h
hw/pc_piix.c