From: Alejandro Colomar <alx@kernel.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
Quentin Monnet <quentin@isovalent.com>,
Alejandro Colomar <alx.manpages@gmail.com>,
Michael Hofmann <mhofmann@redhat.com>
Subject: Re: [PATCH bpf] bpf_doc: use silent mode when exec make cmd
Date: Fri, 15 Mar 2024 12:21:46 +0100 [thread overview]
Message-ID: <ZfQvSmag_v7VaOAB@debian> (raw)
In-Reply-To: <20240315023443.2364442-1-liuhangbin@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1832 bytes --]
Hi!
On Fri, Mar 15, 2024 at 10:34:43AM +0800, Hangbin Liu wrote:
> When getting kernel version via make, the result may be polluted by other
> output, like directory change info. e.g.
> $ export MAKEFLAGS="-w"
> $ make kernelversion
> make: Entering directory '/home/net'
> 6.8.0
> make: Leaving directory '/home/net'
>
> This will distort the reStructuredText output and make latter rst2man
> failed like:
> bpf-helpers.rst:20: (WARNING/2) Field list ends without a blank line; unexpected unindent.
>
> Using silent mode would help. e.g.
> $ make -s --no-print-directory kernelversion
Acked-by: Alejandro Colomar <alx@kernel.org>
Thanks!
Alex
> 6.8.0
>
> Fixes: fd0a38f9c37d ("scripts/bpf: Set version attribute for bpf-helpers(7) man page")
> Signed-off-by: Michael Hofmann <mhofmann@redhat.com>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
> scripts/bpf_doc.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/bpf_doc.py b/scripts/bpf_doc.py
> index 4606944984ee..c55878bddfdd 100755
> --- a/scripts/bpf_doc.py
> +++ b/scripts/bpf_doc.py
> @@ -414,8 +414,8 @@ class PrinterRST(Printer):
> version = version.stdout.decode().rstrip()
> except:
> try:
> - version = subprocess.run(['make', 'kernelversion'], cwd=linuxRoot,
> - capture_output=True, check=True)
> + version = subprocess.run(['make', '-s', '--no-print-directory', 'kernelversion'],
> + cwd=linuxRoot, capture_output=True, check=True)
> version = version.stdout.decode().rstrip()
> except:
> return 'Linux'
> --
> 2.43.0
>
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-03-15 11:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-15 2:34 [PATCH bpf] bpf_doc: use silent mode when exec make cmd Hangbin Liu
2024-03-15 10:31 ` Quentin Monnet
2024-03-15 11:21 ` Alejandro Colomar [this message]
2024-03-15 13:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZfQvSmag_v7VaOAB@debian \
--to=alx@kernel.org \
--cc=alx.manpages@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=liuhangbin@gmail.com \
--cc=martin.lau@linux.dev \
--cc=mhofmann@redhat.com \
--cc=quentin@isovalent.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.