]> Git Repo - qemu.git/commitdiff
block/qapi: Emit tray_open only if there is a tray
authorMax Reitz <[email protected]>
Fri, 29 Jan 2016 19:49:13 +0000 (20:49 +0100)
committerMax Reitz <[email protected]>
Tue, 2 Feb 2016 16:47:06 +0000 (17:47 +0100)
Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Message-id: 1454096953[email protected]

block/qapi.c
qapi/block-core.json
tests/qemu-iotests/067.out

index a49c118ba0ded643e60b5dcea974001d656570f6..bbe0c9dddb071408363b3b76f472926a3040d128 100644 (file)
@@ -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);
     }
index 40239bfcf9fd26d29f22f6e5d5e4f940a08c037b..628a41dfcafb4d8ac8156bfc70b1a61920c4d023 100644 (file)
 # @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)
index 27ad56fe2faed6b94742fe8e900280ba576541bd..ae3fccb15fbee9bb25f636b48d3e01b16006f435 100644 (file)
@@ -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"
         }
     ]
This page took 0.031326 seconds and 4 git commands to generate.