aboutsummaryrefslogtreecommitdiff
path: root/block/qapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/qapi.c')
-rw-r--r--block/qapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qapi.c b/block/qapi.c
index 164dd2b..95b2e2d 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;
}