2019-04-16 17:59 UTC+0900 ~ Prashant Bhole <bhole_prashant...@lab.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...@lab.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.mon...@netronome.com>
Thanks!

Reply via email to