[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210316095921.175fac07@hermes.local>
Date: Tue, 16 Mar 2021 09:59:21 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Petr Machata <petrm@...dia.com>
Cc: <netdev@...r.kernel.org>, <dsahern@...il.com>,
Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH iproute2-next v3 2/6] json_print: Add print_tv()
On Tue, 16 Mar 2021 11:20:12 +0100
Petr Machata <petrm@...dia.com> wrote:
> Add a helper to dump a timeval. Print by first converting to double and
> then dispatching to print_color_float().
>
> Signed-off-by: Petr Machata <petrm@...dia.com>
> ---
> include/json_print.h | 1 +
> lib/json_print.c | 13 +++++++++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/include/json_print.h b/include/json_print.h
> index 6fcf9fd910ec..63eee3823fe4 100644
> --- a/include/json_print.h
> +++ b/include/json_print.h
> @@ -81,6 +81,7 @@ _PRINT_FUNC(0xhex, unsigned long long)
> _PRINT_FUNC(luint, unsigned long)
> _PRINT_FUNC(lluint, unsigned long long)
> _PRINT_FUNC(float, double)
> +_PRINT_FUNC(tv, struct timeval *)
This
Make it const please?
Powered by blists - more mailing lists