diff mbox series

[v2,bpf-next,11/12] bpftool/docs: add description of btf dump C option

Message ID 20190523204222.3998365-12-andriin@fb.com
State Changes Requested
Delegated to: BPF Maintainers
Headers show
Series BTF-to-C converter | expand

Commit Message

Andrii Nakryiko May 23, 2019, 8:42 p.m. UTC
Document optional **c** option for btf dump subcommand.

Cc: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
 tools/bpf/bpftool/Documentation/bpftool-btf.rst | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Quentin Monnet May 24, 2019, 9:14 a.m. UTC | #1
2019-05-23 13:42 UTC-0700 ~ Andrii Nakryiko <andriin@fb.com>
> Document optional **c** option for btf dump subcommand.
> 
> Cc: Quentin Monnet <quentin.monnet@netronome.com>
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
> ---
>  tools/bpf/bpftool/Documentation/bpftool-btf.rst | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/bpf/bpftool/Documentation/bpftool-btf.rst b/tools/bpf/bpftool/Documentation/bpftool-btf.rst
> index 2dbc1413fabd..1aec7dc039e9 100644
> --- a/tools/bpf/bpftool/Documentation/bpftool-btf.rst
> +++ b/tools/bpf/bpftool/Documentation/bpftool-btf.rst
> @@ -19,10 +19,11 @@ SYNOPSIS
>  BTF COMMANDS
>  =============
>  
> -|	**bpftool** **btf dump** *BTF_SRC*
> +|	**bpftool** **btf dump** *BTF_SRC* [**format** *FORMAT*]
>  |	**bpftool** **btf help**
>  |
>  |	*BTF_SRC* := { **id** *BTF_ID* | **prog** *PROG* | **map** *MAP* [{**key** | **value** | **kv** | **all**}] | **file** *FILE* }
> +|       *FORMAT* := { **raw** | **c** }

Nit: This line should use a tab for indent (Do not respin just for that,
though!).

>  |	*MAP* := { **id** *MAP_ID* | **pinned** *FILE* }
>  |	*PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* }
>  
> @@ -49,6 +50,10 @@ DESCRIPTION
>                    .BTF section with well-defined BTF binary format data,
>                    typically produced by clang or pahole.
>  
> +                  **format** option can be used to override default (raw)
> +                  output format. Raw (**raw**) or C-syntax (**c**) output
> +                  formats are supported.
> +

Other files use tabs here as well, but most of the description here
already uses spaces, so ok.

>  	**bpftool btf help**
>  		  Print short help message.
>  
>
Andrii Nakryiko May 24, 2019, 5:25 p.m. UTC | #2
On Fri, May 24, 2019 at 2:14 AM Quentin Monnet
<quentin.monnet@netronome.com> wrote:
>
> 2019-05-23 13:42 UTC-0700 ~ Andrii Nakryiko <andriin@fb.com>
> > Document optional **c** option for btf dump subcommand.
> >
> > Cc: Quentin Monnet <quentin.monnet@netronome.com>
> > Signed-off-by: Andrii Nakryiko <andriin@fb.com>
> > ---
> >  tools/bpf/bpftool/Documentation/bpftool-btf.rst | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/bpf/bpftool/Documentation/bpftool-btf.rst b/tools/bpf/bpftool/Documentation/bpftool-btf.rst
> > index 2dbc1413fabd..1aec7dc039e9 100644
> > --- a/tools/bpf/bpftool/Documentation/bpftool-btf.rst
> > +++ b/tools/bpf/bpftool/Documentation/bpftool-btf.rst
> > @@ -19,10 +19,11 @@ SYNOPSIS
> >  BTF COMMANDS
> >  =============
> >
> > -|    **bpftool** **btf dump** *BTF_SRC*
> > +|    **bpftool** **btf dump** *BTF_SRC* [**format** *FORMAT*]
> >  |    **bpftool** **btf help**
> >  |
> >  |    *BTF_SRC* := { **id** *BTF_ID* | **prog** *PROG* | **map** *MAP* [{**key** | **value** | **kv** | **all**}] | **file** *FILE* }
> > +|       *FORMAT* := { **raw** | **c** }
>
> Nit: This line should use a tab for indent (Do not respin just for that,
> though!).

Oh, I didn't notice that. My vim setup very aggressively refuses to
insert tabs, so I had to literaly copy/paste pieces of tabulations :)
Fixed it.

>
> >  |    *MAP* := { **id** *MAP_ID* | **pinned** *FILE* }
> >  |    *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* }
> >
> > @@ -49,6 +50,10 @@ DESCRIPTION
> >                    .BTF section with well-defined BTF binary format data,
> >                    typically produced by clang or pahole.
> >
> > +                  **format** option can be used to override default (raw)
> > +                  output format. Raw (**raw**) or C-syntax (**c**) output
> > +                  formats are supported.
> > +
>
> Other files use tabs here as well, but most of the description here
> already uses spaces, so ok.

Yeah, thanks for pointing out, fixed everything to tabs + 2 spaces, as
in other files (unclear why we have extra 2 spaces, but not going to
change that).

>
> >       **bpftool btf help**
> >                 Print short help message.
> >
> >
>
Quentin Monnet May 24, 2019, 7:42 p.m. UTC | #3
2019-05-24 10:25 UTC-0700 ~ Andrii Nakryiko <andrii.nakryiko@gmail.com>
> On Fri, May 24, 2019 at 2:14 AM Quentin Monnet
> <quentin.monnet@netronome.com> wrote:
>>
>> 2019-05-23 13:42 UTC-0700 ~ Andrii Nakryiko <andriin@fb.com>
>>> Document optional **c** option for btf dump subcommand.
>>>
>>> Cc: Quentin Monnet <quentin.monnet@netronome.com>
>>> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
>>> ---
>>>  tools/bpf/bpftool/Documentation/bpftool-btf.rst | 7 ++++++-
>>>  1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tools/bpf/bpftool/Documentation/bpftool-btf.rst b/tools/bpf/bpftool/Documentation/bpftool-btf.rst
>>> index 2dbc1413fabd..1aec7dc039e9 100644
>>> --- a/tools/bpf/bpftool/Documentation/bpftool-btf.rst
>>> +++ b/tools/bpf/bpftool/Documentation/bpftool-btf.rst
>>> @@ -19,10 +19,11 @@ SYNOPSIS
>>>  BTF COMMANDS
>>>  =============
>>>
>>> -|    **bpftool** **btf dump** *BTF_SRC*
>>> +|    **bpftool** **btf dump** *BTF_SRC* [**format** *FORMAT*]
>>>  |    **bpftool** **btf help**
>>>  |
>>>  |    *BTF_SRC* := { **id** *BTF_ID* | **prog** *PROG* | **map** *MAP* [{**key** | **value** | **kv** | **all**}] | **file** *FILE* }
>>> +|       *FORMAT* := { **raw** | **c** }
>>
>> Nit: This line should use a tab for indent (Do not respin just for that,
>> though!).
> 
> Oh, I didn't notice that. My vim setup very aggressively refuses to
> insert tabs, so I had to literaly copy/paste pieces of tabulations :)
> Fixed it.

I can relate :). On my (vim) setup, I can usually hit Ctrl+V then <Tab>
to insert tabulations in that case.

> 
>>
>>>  |    *MAP* := { **id** *MAP_ID* | **pinned** *FILE* }
>>>  |    *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* }
>>>
>>> @@ -49,6 +50,10 @@ DESCRIPTION
>>>                    .BTF section with well-defined BTF binary format data,
>>>                    typically produced by clang or pahole.
>>>
>>> +                  **format** option can be used to override default (raw)
>>> +                  output format. Raw (**raw**) or C-syntax (**c**) output
>>> +                  formats are supported.
>>> +
>>
>> Other files use tabs here as well, but most of the description here
>> already uses spaces, so ok.
> 
> Yeah, thanks for pointing out, fixed everything to tabs + 2 spaces, as
> in other files (unclear why we have extra 2 spaces, but not going to
> change that).

Thanks!

> 
>>
>>>       **bpftool btf help**
>>>                 Print short help message.
>>>
>>>
>>
diff mbox series

Patch

diff --git a/tools/bpf/bpftool/Documentation/bpftool-btf.rst b/tools/bpf/bpftool/Documentation/bpftool-btf.rst
index 2dbc1413fabd..1aec7dc039e9 100644
--- a/tools/bpf/bpftool/Documentation/bpftool-btf.rst
+++ b/tools/bpf/bpftool/Documentation/bpftool-btf.rst
@@ -19,10 +19,11 @@  SYNOPSIS
 BTF COMMANDS
 =============
 
-|	**bpftool** **btf dump** *BTF_SRC*
+|	**bpftool** **btf dump** *BTF_SRC* [**format** *FORMAT*]
 |	**bpftool** **btf help**
 |
 |	*BTF_SRC* := { **id** *BTF_ID* | **prog** *PROG* | **map** *MAP* [{**key** | **value** | **kv** | **all**}] | **file** *FILE* }
+|       *FORMAT* := { **raw** | **c** }
 |	*MAP* := { **id** *MAP_ID* | **pinned** *FILE* }
 |	*PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* }
 
@@ -49,6 +50,10 @@  DESCRIPTION
                   .BTF section with well-defined BTF binary format data,
                   typically produced by clang or pahole.
 
+                  **format** option can be used to override default (raw)
+                  output format. Raw (**raw**) or C-syntax (**c**) output
+                  formats are supported.
+
 	**bpftool btf help**
 		  Print short help message.