#undef QEMU_ADD_NET_PARAM
/* refresh information by opening images on the disk */
-static int
+static void
qemuDomainGetStatsOneBlockFallback(virQEMUDriverConfig *cfg,
virDomainObj *dom,
virTypedParamList *params,
virStorageSource *src,
size_t block_idx)
{
- if (virStorageSourceIsEmpty(src))
- return 0;
-
- if (virStorageSourceIsFD(src))
- return 0;
+ if (virStorageSourceIsEmpty(src) ||
+ virStorageSourceIsFD(src))
+ return;
if (qemuStorageLimitsRefresh(cfg, dom, src, true) <= 0) {
virResetLastError();
- return 0;
+ return;
}
if (src->allocation)
if (src->physical)
virTypedParamListAddULLong(params, src->physical, "block.%zu.physical", block_idx);
-
- return 0;
}
/* the VM is offline so we have to go and load the stast from the disk by
* ourselves */
if (!virDomainObjIsActive(dom)) {
- return qemuDomainGetStatsOneBlockFallback(cfg, dom, params,
- src, block_idx);
+ qemuDomainGetStatsOneBlockFallback(cfg, dom, params, src, block_idx);
+ return 0;
}
/* In case where qemu didn't provide the stats we stop here rather than