diff options
author | Kevin Wolf | 2017-07-11 14:00:57 +0200 |
---|---|---|
committer | Kevin Wolf | 2017-07-18 15:14:36 +0200 |
commit | ec18b0a93a0b8f6f9a72bf2461dc7a0930391bfa (patch) | |
tree | e1e5e0ea07313f13ff463c04d222abffa2493d4f /block | |
parent | block/qapi: Use blk_all_next() for query-block (diff) | |
download | qemu-ec18b0a93a0b8f6f9a72bf2461dc7a0930391bfa.tar.gz qemu-ec18b0a93a0b8f6f9a72bf2461dc7a0930391bfa.tar.xz qemu-ec18b0a93a0b8f6f9a72bf2461dc7a0930391bfa.zip |
block: List anonymous device BBs in query-block
Instead of listing only monitor-owned BlockBackends in query-block, also
add those anonymous BlockBackends that are owned by a qdev device and as
such under the control of the user.
This allows using query-block to inspect BlockBackends for the modern
configuration syntax with -blockdev and -device.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/qapi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qapi.c b/block/qapi.c index 164dd2b9a9..95b2e2daa5 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -475,7 +475,7 @@ BlockInfoList *qmp_query_block(Error **errp) for (blk = blk_all_next(NULL); blk; blk = blk_all_next(blk)) { BlockInfoList *info; - if (!*blk_name(blk)) { + if (!*blk_name(blk) && !blk_get_attached_dev(blk)) { continue; } |