Max Reitz f1f5706657 block: Inquire tray state before tray-moved events
blk_dev_change_media_cb() is called for all potential tray movements;
however, it is possible to request closing the tray but nothing actually
happening (on a floppy disk drive without a medium).

Thus, the actual tray status should be inquired before sending a
tray-moved event (and an event should be sent whenever the status
changed).

Checking @load is now superfluous; it was necessary because it was
possible to change a medium without having explicitly opened the tray
and closed it again (or it might have been possible, at least). This is
no longer possible, though.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-11 16:22:47 +01:00
..
2015-10-16 15:34:29 +02:00
2015-10-16 15:34:29 +02:00
2015-10-16 15:34:29 +02:00
2015-11-02 08:30:27 +01:00
2015-04-28 15:36:09 +02:00
2015-10-23 18:18:23 +02:00
2015-10-16 15:34:30 +02:00
2015-10-16 15:34:29 +02:00
2015-07-14 17:15:23 +02:00
2014-08-15 15:07:14 +02:00
2015-10-16 15:34:29 +02:00
2015-11-02 08:30:27 +01:00
2015-10-16 15:34:29 +02:00
2015-10-16 15:34:30 +02:00