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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@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;                                               \
> 

ACK

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux