mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
qemu: monitor: Fix incrementing of 'nstats' in qemuMonitorJSONBlockStatsCollectData
commit 8d9ca6cdb3
refactored qemuMonitorJSONBlockStatsCollectData so
that the number of stats is passed back via a pointer. The commit failed
to fix the macro which increments the number of stats to increment the
actual pointee.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
ce3c6ef684
commit
78f47a6395
@ -2299,7 +2299,7 @@ qemuMonitorJSONBlockStatsCollectData(virJSONValuePtr dev,
|
|||||||
|
|
||||||
#define QEMU_MONITOR_BLOCK_STAT_GET(NAME, VAR, MANDATORY) \
|
#define QEMU_MONITOR_BLOCK_STAT_GET(NAME, VAR, MANDATORY) \
|
||||||
if (MANDATORY || virJSONValueObjectHasKey(stats, NAME)) { \
|
if (MANDATORY || virJSONValueObjectHasKey(stats, NAME)) { \
|
||||||
nstats++; \
|
(*nstats)++; \
|
||||||
if (virJSONValueObjectGetNumberLong(stats, NAME, &VAR) < 0) { \
|
if (virJSONValueObjectGetNumberLong(stats, NAME, &VAR) < 0) { \
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, \
|
virReportError(VIR_ERR_INTERNAL_ERROR, \
|
||||||
_("cannot read %s statistic"), NAME); \
|
_("cannot read %s statistic"), NAME); \
|
||||||
|
Loading…
Reference in New Issue
Block a user