vz: change printing format specifier for network statistics

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@virtuozzo.com>
This commit is contained in:
Maxim Nestratov 2016-11-29 21:07:38 +03:00
parent 4ebb75c364
commit 99fb668ede

View File

@ -4517,7 +4517,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; \