Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_driver.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 703f07a388..2163d14cea 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -21493,20 +21493,16 @@ qemuDomainGetStatsBlockExportBackendStorage(const char *entryname, virTypedParamListPtr params) { qemuBlockStats *entry; - int ret = -1; - if (!stats || !entryname || !(entry = virHashLookup(stats, entryname))) { - ret = 0; - goto cleanup; - } + if (!stats || !entryname || !(entry = virHashLookup(stats, entryname))) + return 0; - if (entry->write_threshold) - QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "threshold", - entry->write_threshold); + if (entry->write_threshold && + virTypedParamListAddULL(params, entry->write_threshold, + "block.%zu.threshold", recordnr) < 0) + return -1; - ret = 0; - cleanup: - return ret; + return 0; } -- 2.21.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list