mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
monitor: add support for boolean statistics
The next version of Linux will introduce boolean statistics, which can only have 0 or 1 values. Support them in the schema and in the HMP command. Suggested-by: Amneesh Singh <natto@weirdnatto.in> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@ -2337,6 +2337,8 @@ static void print_stats_results(Monitor *mon, StatsTarget target,
|
||||
|
||||
if (stats_value->type == QTYPE_QNUM) {
|
||||
monitor_printf(mon, ": %" PRId64 "\n", stats_value->u.scalar);
|
||||
} else if (stats_value->type == QTYPE_QBOOL) {
|
||||
monitor_printf(mon, ": %s\n", stats_value->u.boolean ? "yes" : "no");
|
||||
} else if (stats_value->type == QTYPE_QLIST) {
|
||||
uint64List *list;
|
||||
int i;
|
||||
|
Reference in New Issue
Block a user