[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <62f4e7e1-80a0-b77e-a404-b796445af7dd@netronome.com>
Date: Tue, 16 Apr 2019 10:22:07 +0100
From: Quentin Monnet <quentin.monnet@...ronome.com>
To: Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>
Cc: Jakub Kicinski <jakub.kicinski@...ronome.com>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Andrii Nakryiko <andriin@...com>,
prashantbhole.linux@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next 1/2] tools/bpftool: re-organize newline printing
for map listing
2019-04-16 17:59 UTC+0900 ~ Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>
> Let's move the final newline printing in show_map_close_plain() at
> the end of the function because it looks correct and consistent with
> prog.c. Also let's do related changes for the line which prints
> pinned file name.
>
> Signed-off-by: Prashant Bhole <bhole_prashant_q7@....ntt.co.jp>
> ---
> tools/bpf/bpftool/map.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
> index e96903078991..cda0f27fa895 100644
> --- a/tools/bpf/bpftool/map.c
> +++ b/tools/bpf/bpftool/map.c
> @@ -604,15 +604,16 @@ static int show_map_close_plain(int fd, struct bpf_map_info *info)
> }
> close(fd);
>
> - printf("\n");
> if (!hash_empty(map_table.table)) {
> struct pinned_obj *obj;
>
> hash_for_each_possible(map_table.table, obj, hash, info->id) {
> if (obj->id == info->id)
> - printf("\tpinned %s\n", obj->path);
> + printf("\n\tpinned %s", obj->path);
> }
> }
> +
> + printf("\n");
> return 0;
> }
>
>
Reviewed-by: Quentin Monnet <quentin.monnet@...ronome.com>
Thanks!
Powered by blists - more mailing lists