tools: bpftool: Include common options from separate file
authorQuentin Monnet <quentin@isovalent.com>
Wed, 9 Sep 2020 16:24:59 +0000 (17:24 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 10 Sep 2020 18:16:46 +0000 (11:16 -0700)
commitf28ef96d7b04a76575a020a9da4f92358abe68c6
treecab44cc5075ad0a04ff13d0d8f80426918661ac3
parent82b8cf0acc7bfe7b247e5ddc4417f6146d74c0b8
tools: bpftool: Include common options from separate file

Nearly all man pages for bpftool have the same common set of option
flags (--help, --version, --json, --pretty, --debug). The description is
duplicated across all the pages, which is more difficult to maintain if
the description of an option changes. It may also be confusing to sort
out what options are not "common" and should not be copied when creating
new manual pages.

Let's move the description for those common options to a separate file,
which is included with a RST directive when generating the man pages.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200909162500.17010-3-quentin@isovalent.com
14 files changed:
tools/bpf/bpftool/Documentation/Makefile
tools/bpf/bpftool/Documentation/bpftool-btf.rst
tools/bpf/bpftool/Documentation/bpftool-cgroup.rst
tools/bpf/bpftool/Documentation/bpftool-feature.rst
tools/bpf/bpftool/Documentation/bpftool-gen.rst
tools/bpf/bpftool/Documentation/bpftool-iter.rst
tools/bpf/bpftool/Documentation/bpftool-link.rst
tools/bpf/bpftool/Documentation/bpftool-map.rst
tools/bpf/bpftool/Documentation/bpftool-net.rst
tools/bpf/bpftool/Documentation/bpftool-perf.rst
tools/bpf/bpftool/Documentation/bpftool-prog.rst
tools/bpf/bpftool/Documentation/bpftool-struct_ops.rst
tools/bpf/bpftool/Documentation/bpftool.rst
tools/bpf/bpftool/Documentation/common_options.rst [new file with mode: 0644]