block: Don't call bdrv_eject() if the tray state didn't change
authorLuiz Capitulino <lcapitulino@redhat.com>
Fri, 17 Feb 2012 13:05:21 +0000 (11:05 -0200)
committerLuiz Capitulino <lcapitulino@redhat.com>
Wed, 22 Feb 2012 19:23:21 +0000 (17:23 -0200)
commitd88b1819dd6c6ba4b2270c98bf52ce67a315066d
treeb5afd9cd7c853c7d75ab0dc76c8273c823007e33
parentf36f394952bd6703ca3ad8d649b41a9edd02db0c
block: Don't call bdrv_eject() if the tray state didn't change

It's not needed. Besides we can then assume that bdrv_eject() is
only called when there's a tray state change, which is useful to
the DEVICE_TRAY_MOVED event (going to be added in a future
commit).

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
hw/ide/atapi.c
hw/scsi-disk.c