diff options
Diffstat (limited to 'monitor')
-rw-r--r-- | monitor/qmp-cmds.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index e49ab345d7..7314cd813d 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -472,12 +472,17 @@ static bool invoke_stats_cb(StatsCallbacks *entry, Error **errp) { strList *targets = NULL; + strList *names = NULL; ERRP_GUARD(); if (request) { if (request->provider != entry->provider) { return true; } + if (request->has_names && !request->names) { + return true; + } + names = request->has_names ? request->names : NULL; } switch (filter->target) { @@ -496,7 +501,7 @@ static bool invoke_stats_cb(StatsCallbacks *entry, abort(); } - entry->stats_cb(stats_results, filter->target, targets, errp); + entry->stats_cb(stats_results, filter->target, names, targets, errp); if (*errp) { qapi_free_StatsResultList(*stats_results); *stats_results = NULL; |