OSDN Git Service

tools: bpftool: show frozen status for maps
authorQuentin Monnet <quentin.monnet@netronome.com>
Wed, 21 Aug 2019 08:52:18 +0000 (09:52 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 21 Aug 2019 19:17:27 +0000 (21:17 +0200)
commitc354ff2ef233a694d657b03a499c3c3fddbec599
tree00de959e3a9746bbbcefb838af102f62501a801e
parent1f8919b170318e7e13e303eedac363d44057995f
tools: bpftool: show frozen status for maps

When listing maps, read their "frozen" status from procfs, and tell if
maps are frozen.

As commit log for map freezing command mentions that the feature might
be extended with flags (e.g. for write-only instead of read-only) in the
future, use an integer and not a boolean for JSON output.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/map.c