[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 04/50] block/qapi: Emit tray_open only if there is
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PULL v2 04/50] block/qapi: Emit tray_open only if there is a tray |
Date: |
Tue, 2 Feb 2016 18:34:57 +0100 |
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
---
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
- [Qemu-devel] [PULL v2 00/50] Block patches, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 02/50] blockdev: Fix 'change' for slot devices, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 01/50] block: Add blk_dev_has_tray(), Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 04/50] block/qapi: Emit tray_open only if there is a tray,
Max Reitz <=
- [Qemu-devel] [PULL v2 07/50] nbd: client_close on error in nbd_co_client_start, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 06/50] iotests: Limit supported formats for 118, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 03/50] Revert "hw/block/fdc: Implement tray status", Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 05/50] vmdk: Fix converting to streamOptimized, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 09/50] iotests: Change coding style of _filter_nbd in 083, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 08/50] iotests: Rename filter_nbd to _filter_nbd in 083, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 10/50] iotests: Move _filter_nbd into common.filter, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 11/50] iotests: Make _filter_nbd drop log lines, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 12/50] iotests: Make _filter_nbd support more URL types, Max Reitz, 2016/02/02
- [Qemu-devel] [PULL v2 13/50] iotests: Make redirecting qemu's stderr optional, Max Reitz, 2016/02/02