diff mbox

[25/55] ide/atapi: Switch from BlockDriverState's locked to own tray_locked

Message ID 1311179069-27882-26-git-send-email-armbru@redhat.com
State New
Headers show

Commit Message

Markus Armbruster July 20, 2011, 4:23 p.m. UTC
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/ide/atapi.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Christoph Hellwig July 26, 2011, 12:14 p.m. UTC | #1
On Wed, Jul 20, 2011 at 06:23:59PM +0200, Markus Armbruster wrote:
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  hw/ide/atapi.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox

Patch

diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 8634e6b..237657f 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -777,8 +777,9 @@  static void cmd_mode_sense(IDEState *s, uint8_t *buf)
             buf[12] = 0x71;
             buf[13] = 3 << 5;
             buf[14] = (1 << 0) | (1 << 3) | (1 << 5);
-            if (bdrv_is_locked(s->bs))
+            if (s->tray_locked) {
                 buf[6] |= 1 << 1;
+            }
             buf[15] = 0x00;
             cpu_to_ube16(&buf[16], 706);
             buf[18] = 0;