[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 07/27] scsi-disk: Track tray open/close state

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3 07/27] scsi-disk: Track tray open/close state
Date: Wed, 07 Sep 2011 09:05:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 09/06/2011 06:58 PM, Markus Armbruster wrote:
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<address@hidden>
  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;

Reviewed-by: Paolo Bonzini <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]