From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Alberto Garcia <berto@igalia.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
John Snow <jsnow@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] [PATCH v3 4/4] block/qapi: Emit tray_open only if there is a tray
Date: Fri, 22 Jan 2016 23:50:50 +0100 [thread overview]
Message-ID: <1453503050-20187-5-git-send-email-mreitz@redhat.com> (raw)
In-Reply-To: <1453503050-20187-1-git-send-email-mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
---
block/qapi.c | 2 +-
qapi/block-core.json | 4 ++--
tests/qemu-iotests/067.out | 4 ----
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/block/qapi.c b/block/qapi.c
index a49c118..bbe0c9d 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -300,7 +300,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/qapi/block-core.json b/qapi/block-core.json
index 40239bf..628a41d 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -382,8 +382,8 @@
# @locked: True if the guest has locked this device from having its media
# removed
#
-# @tray_open: #optional True if the device has a tray and it is open
-# (only present if removable is true)
+# @tray_open: #optional True if the device's tray is open
+# (only present if it has a tray)
#
# @dirty-bitmaps: #optional dirty bitmaps information (only present if the
# driver has one or more dirty bitmaps) (Since 2.0)
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
next prev parent reply other threads:[~2016-01-22 22:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-22 22:50 [Qemu-devel] [PATCH v3 0/4] blockdev: Fix 'change' for slot devices Max Reitz
2016-01-22 22:50 ` [Qemu-devel] [PATCH v3 1/4] block: Add blk_dev_has_tray() Max Reitz
2016-01-22 22:50 ` [Qemu-devel] [PATCH v3 2/4] blockdev: Fix 'change' for slot devices Max Reitz
2016-01-25 9:35 ` Alberto Garcia
2016-01-22 22:50 ` [Qemu-devel] [PATCH v3 3/4] Revert "hw/block/fdc: Implement tray status" Max Reitz
2016-01-22 22:50 ` Max Reitz [this message]
2016-01-25 11:25 ` [Qemu-devel] [PATCH v3 0/4] blockdev: Fix 'change' for slot devices Kevin Wolf
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=1453503050-20187-5-git-send-email-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=berto@igalia.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--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).