[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 04/10] HMP: info block: Print the 'tray-open' key
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [RFC 04/10] HMP: info block: Print the 'tray-open' key |
Date: |
Fri, 3 Jun 2011 16:03:56 -0300 |
It's printed before the "[not inserted]" or the "file" fields, like this:
(qemu) info block
ide0-hd0: removable=0 file=disks/test.img ro=0 drv=qcow2 encrypted=0
ide1-cd0: removable=1 locked=0 tray-open=0 file=/Fedora-14-x86_64-DVD.iso ro=1
drv=raw encrypted=0
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
(qemu)
TODO: Confirm this won't break libvirt.
Signed-off-by: Luiz Capitulino <address@hidden>
---
block.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/block.c b/block.c
index e1b9057..3df5a4f 100644
--- a/block.c
+++ b/block.c
@@ -1698,6 +1698,7 @@ static void bdrv_print_dict(QObject *obj, void *opaque)
if (qdict_get_bool(bs_dict, "removable")) {
monitor_printf(mon, " locked=%d", qdict_get_bool(bs_dict, "locked"));
+ monitor_printf(mon, " tray-open=%d", qdict_get_bool(bs_dict,
"tray-open"));
}
if (qdict_haskey(bs_dict, "inserted")) {
--
1.7.4.4
- [Qemu-devel] [RFC 00/10]: QMP/HMP: Introduce tray handling commands, Luiz Capitulino, 2011/06/03
- [Qemu-devel] [RFC 01/10] block: bdrv_eject(): Add 'force' parameter, Luiz Capitulino, 2011/06/03
- [Qemu-devel] [RFC 02/10] block: Rename bdrv_mon_event(), Luiz Capitulino, 2011/06/03
- [Qemu-devel] [RFC 03/10] QMP: query-block: Add the 'tray-open' key, Luiz Capitulino, 2011/06/03
- [Qemu-devel] [RFC 04/10] HMP: info block: Print the 'tray-open' key,
Luiz Capitulino <=
- [Qemu-devel] [RFC 06/10] QMP: Introduce the blockdev-tray-close command, Luiz Capitulino, 2011/06/03
- [Qemu-devel] [RFC 07/10] QMP: Introduce the blockdev-media-insert command, Luiz Capitulino, 2011/06/03
- [Qemu-devel] [RFC 05/10] QMP: Introduce the blockdev-tray-open command, Luiz Capitulino, 2011/06/03