summaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2014-05-22 13:28:45 +0200
committerKevin Wolf <kwolf@redhat.com>2014-12-10 10:31:09 +0100
commit9e193c5a652faff719d7186e27f680e3888925a6 (patch)
treea1e25e3f0078e5d407440252e6dd26c744c87455 /hmp.c
parent729962f6db43bf262a446f5e13d900ffb3c54a88 (diff)
downloadqemu-9e193c5a652faff719d7186e27f680e3888925a6.zip
block/qapi: Add cache information to query-block
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index 94b27df086..05c3730227 100644
--- a/hmp.c
+++ b/hmp.c
@@ -294,6 +294,7 @@ void hmp_info_block(Monitor *mon, const QDict *qdict)
{
BlockInfoList *block_list, *info;
ImageInfo *image_info;
+ BlockDeviceInfo *inserted;
const char *device = qdict_get_try_str(qdict, "device");
bool verbose = qdict_get_try_bool(qdict, "verbose", 0);
@@ -335,6 +336,13 @@ void hmp_info_block(Monitor *mon, const QDict *qdict)
continue;
}
+ inserted = info->value->inserted;
+
+ monitor_printf(mon, " Cache mode: %s%s%s\n",
+ inserted->cache->writeback ? "writeback" : "writethrough",
+ inserted->cache->direct ? ", direct" : "",
+ inserted->cache->no_flush ? ", ignore flushes" : "");
+
if (info->value->inserted->has_backing_file) {
monitor_printf(mon,
" Backing file: %s "