This is necessary to be able to get statistics for venet0 or "host-routed" adapter, which has -1 index and thus, its statistics is shown as "net.nic4294967295". Signed-off-by: Maxim Nestratov <mnestratov@xxxxxxxxxxxxx> --- src/vz/vz_sdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index f63b9a3..d5688e1 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -4388,7 +4388,7 @@ prlsdkGetNetStats(PRL_HANDLE sdkstats, PRL_HANDLE sdkdom, const char *path, prlsdkCheckRetGoto(pret, cleanup); #define PRLSDK_GET_NET_COUNTER(VAL, NAME) \ - if (virAsprintf(&name, "net.nic%d.%s", net_index, NAME) < 0) \ + if (virAsprintf(&name, "net.nic%u.%s", net_index, NAME) < 0) \ goto cleanup; \ if (prlsdkExtractStatsParam(sdkstats, name, &stats->VAL) < 0) \ goto cleanup; \ -- 2.4.11 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list