diff options
author | Markus Armbruster <armbru@redhat.com> | 2011-09-06 18:58:40 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-09-12 15:17:20 +0200 |
commit | ece0d5e9a736df174509751980ca0613a778f8b4 (patch) | |
tree | ca12ac6e975aff8b363be379c3be8a2d01bb6200 /hw/scsi-disk.c | |
parent | bfd52647adc17ec05b708e2a061f85707cbe4dcc (diff) | |
download | hqemu-ece0d5e9a736df174509751980ca0613a778f8b4.zip hqemu-ece0d5e9a736df174509751980ca0613a778f8b4.tar.gz |
scsi-disk: Track tray open/close state
We already track it in BlockDriverState since commit 4be9762a. As
discussed in that commit's message, we should track it in the device
device models instead, because it's device state.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r-- | hw/scsi-disk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index c8ad2e7..f18ddd7 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -72,6 +72,7 @@ struct SCSIDiskState QEMUBH *bh; char *version; char *serial; + bool tray_open; }; static int scsi_handle_rw_error(SCSIDiskReq *r, int error, int type); @@ -823,6 +824,7 @@ static void scsi_disk_emulate_start_stop(SCSIDiskReq *r) if (s->qdev.type == TYPE_ROM && loej) { bdrv_eject(s->bs, !start); + s->tray_open = !start; } } |