qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
	John Snow <jsnow@redhat.com>
Subject: [Qemu-devel] [PATCH 4/4] block/qapi: Emit tray_open only if there is a tray
Date: Tue, 12 Jan 2016 16:47:54 +0100	[thread overview]
Message-ID: <1452613674-12248-5-git-send-email-mreitz@redhat.com> (raw)
In-Reply-To: <1452613674-12248-1-git-send-email-mreitz@redhat.com>

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 block/qapi.c               | 2 +-
 tests/qemu-iotests/067.out | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/block/qapi.c b/block/qapi.c
index 58d3975..12a0f25 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -299,7 +299,7 @@ static void bdrv_query_info(BlockBackend *blk, BlockInfo **p_info,
     info->locked = blk_dev_is_medium_locked(blk);
     info->removable = blk_dev_has_removable_media(blk);
 
-    if (blk_dev_has_removable_media(blk)) {
+    if (blk_dev_has_tray(blk)) {
         info->has_tray_open = true;
         info->tray_open = blk_dev_is_tray_open(blk);
     }
diff --git a/tests/qemu-iotests/067.out b/tests/qemu-iotests/067.out
index 27ad56f..ae3fccb 100644
--- a/tests/qemu-iotests/067.out
+++ b/tests/qemu-iotests/067.out
@@ -169,7 +169,6 @@ Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,if=none,id=disk
                 "file": "TEST_DIR/t.qcow2",
                 "encryption_key_missing": false
             },
-            "tray_open": false,
             "type": "unknown"
         }
     ]
@@ -289,7 +288,6 @@ Testing:
                 "file": "TEST_DIR/t.qcow2",
                 "encryption_key_missing": false
             },
-            "tray_open": false,
             "type": "unknown"
         }
     ]
@@ -410,7 +408,6 @@ Testing:
                 "file": "TEST_DIR/t.qcow2",
                 "encryption_key_missing": false
             },
-            "tray_open": false,
             "type": "unknown"
         }
     ]
@@ -501,7 +498,6 @@ Testing:
                 "file": "TEST_DIR/t.qcow2",
                 "encryption_key_missing": false
             },
-            "tray_open": false,
             "type": "unknown"
         }
     ]
-- 
2.7.0

  parent reply	other threads:[~2016-01-12 15:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 15:47 [Qemu-devel] [PATCH 0/4] blockdev: Fix 'change' for slot devices Max Reitz
2016-01-12 15:47 ` [Qemu-devel] [PATCH 1/4] block: Add blk_dev_has_tray() Max Reitz
2016-01-15 16:57   ` Eric Blake
2016-01-18 10:23   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2016-01-12 15:47 ` [Qemu-devel] [PATCH 2/4] blockdev: Fix 'change' for slot devices Max Reitz
2016-01-15 17:08   ` Eric Blake
2016-01-18 10:49   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2016-01-12 15:47 ` [Qemu-devel] [PATCH 3/4] Revert "hw/block/fdc: Implement tray status" Max Reitz
2016-01-15 17:11   ` Eric Blake
2016-01-12 15:47 ` Max Reitz [this message]
2016-01-15 17:11   ` [Qemu-devel] [PATCH 4/4] block/qapi: Emit tray_open only if there is a tray Eric Blake
2016-01-18 10:52   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2016-01-15 16:10 ` [Qemu-devel] [PATCH 0/4] blockdev: Fix 'change' for slot devices Peter Maydell
2016-01-15 16:24   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452613674-12248-5-git-send-email-mreitz@redhat.com \
    --to=mreitz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).