2022-07-13 14:01:41

by Quentin Monnet

[permalink] [raw]
Subject: Re: [RFC PATCH v2 1/1] bpftool: Align dumped file headers with skeletons.

On 13/07/2022 14:40, Francis Laniel wrote:
> This commit adds the following lines to file generated by dump:
> /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
> /* THIS FILE IS AUTOGENERATED BY BPFTOOL! */
> Hence, the dumped file headers follows that of skeletons.
>
> Signed-off-by: Francis Laniel <[email protected]>
> ---
> tools/bpf/bpftool/btf.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
> index 7e6accb9d9f7..066a0acd0ecd 100644
> --- a/tools/bpf/bpftool/btf.c
> +++ b/tools/bpf/bpftool/btf.c
> @@ -425,6 +425,8 @@ static int dump_btf_c(const struct btf *btf,
> if (err)
> return err;
>
> + printf("/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */\n");
> + printf("/* THIS FILE IS AUTOGENERATED BY BPFTOOL! */\n");
> printf("#ifndef __VMLINUX_H__\n");
> printf("#define __VMLINUX_H__\n");
> printf("\n");

Looks good, simpler than v1, thank you!

Reviewed-by: Quentin Monnet <[email protected]>


2022-07-13 14:55:22

by Francis Laniel

[permalink] [raw]
Subject: Re: [RFC PATCH v2 1/1] bpftool: Align dumped file headers with skeletons.

Le mercredi 13 juillet 2022, 15:57:13 CEST Quentin Monnet a ?crit :
> On 13/07/2022 14:40, Francis Laniel wrote:
> > This commit adds the following lines to file generated by dump:
> > /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
> > /* THIS FILE IS AUTOGENERATED BY BPFTOOL! */
> > Hence, the dumped file headers follows that of skeletons.
> >
> > Signed-off-by: Francis Laniel <[email protected]>
> > ---
> >
> > tools/bpf/bpftool/btf.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c
> > index 7e6accb9d9f7..066a0acd0ecd 100644
> > --- a/tools/bpf/bpftool/btf.c
> > +++ b/tools/bpf/bpftool/btf.c
> > @@ -425,6 +425,8 @@ static int dump_btf_c(const struct btf *btf,
> >
> > if (err)
> >
> > return err;
> >
> > + printf("/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */\n");
> > + printf("/* THIS FILE IS AUTOGENERATED BY BPFTOOL! */\n");
> >
> > printf("#ifndef __VMLINUX_H__\n");
> > printf("#define __VMLINUX_H__\n");
> > printf("\n");
>
> Looks good, simpler than v1, thank you!
>
> Reviewed-by: Quentin Monnet <[email protected]>

Thank you for the review!