[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEf4BzZuw57ywTOe8Yjar11r_A=XZLJjxx1mCJwG0y2PHhf6pg@mail.gmail.com>
Date: Fri, 23 Sep 2022 14:30:53 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Wang Yufen <wangyufen@...wei.com>
Cc: andrii@...nel.org, ast@...nel.org, daniel@...earbox.net,
martin.lau@...ux.dev, song@...nel.org, yhs@...com,
john.fastabend@...il.com, kpsingh@...nel.org, sdf@...gle.com,
haoluo@...gle.com, jolsa@...nel.org, paul.walmsley@...ive.com,
palmer@...belt.com, aou@...s.berkeley.edu, davem@...emloft.net,
kuba@...nel.org, hawk@...nel.org, nathan@...nel.org,
ndesaulniers@...gle.com, trix@...hat.com, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [bpf-next v4] libbpf: Add pathname_concat() helper
On Wed, Sep 21, 2022 at 11:08 PM Wang Yufen <wangyufen@...wei.com> wrote:
>
> Move snprintf and len check to common helper pathname_concat() to make the
> code simpler.
>
> Signed-off-by: Wang Yufen <wangyufen@...wei.com>
> ---
> tools/lib/bpf/libbpf.c | 76 +++++++++++++++++++-------------------------------
> 1 file changed, 29 insertions(+), 47 deletions(-)
>
You went a bit overboard with libbpf_err(). We need it only in
directly user-facing functions. I've fixed it up while applying. Also
moved buf and buffer size to be first two arguments to match
snprintf() order of arguments a bit closer. Applied to bpf-next,
thanks.
> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index 2ca30cc..2d8b195 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -2096,19 +2096,30 @@ static bool get_map_field_int(const char *map_name, const struct btf *btf,
> return true;
> }
[...]
Powered by blists - more mailing lists