[libvirt] [PATCH] vz: change printing format specifier for network statistics

Maxim Nestratov mnestratov at virtuozzo.com
Tue Jan 31 14:15:38 UTC 2017


31-Jan-17 15:24, Nikolay Shirokovskiy пишет:

>
> On 31.01.2017 14:01, Maxim Nestratov wrote:
>> 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 at virtuozzo.com>
>> ---
>>   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;                                               \
>>
> ACK

Pushed.

Thanks,
Maxim




More information about the libvir-list mailing list