]> git.proxmox.com Git - qemu.git/commit
spitz tosa: Simplify "drive is suitable for microdrive" test
authorMarkus Armbruster <armbru@redhat.com>
Wed, 3 Aug 2011 13:08:13 +0000 (15:08 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 6 Sep 2011 09:24:07 +0000 (11:24 +0200)
commit124386cc756f6a7975562d652d0e98a379292138
tree304ef3c6284d42ec4486cdbb4b4373ce54b2cfaa
parentf9e8fda4796c0e8aebfc1e7ddf9bed6865adab02
spitz tosa: Simplify "drive is suitable for microdrive" test

We try the drive defined with -drive if=ide,index=0 (or equivalent
sugar).  We use it only if (dinfo && bdrv_is_inserted(dinfo->bdrv) &&
!bdrv_is_removable(dinfo->bdrv)).  This is a convoluted way to test
for "drive media can't be removed".

The only way to create such a drive with -drive if=ide is media=cdrom.
And that sets dinfo->media_cd, so just test that.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/spitz.c
hw/tosa.c