From: Quentin Monnet <qmo@kernel.org>
To: liujing <liujing@cmss.chinamobile.com>
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, eddyz87@gmail.com, song@kernel.org,
yonghong.song@linux.dev, john.fastabend@gmail.com,
kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com,
jolsa@kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org,
liujing <liujing_yewu@cmss.chinamobile.com>
Subject: Re: [PATCH] bpftool: Fix wrong format output
Date: Thu, 21 Nov 2024 11:42:06 +0000 [thread overview]
Message-ID: <80690ecf-2d21-460c-b031-8133ca571e7c@kernel.org> (raw)
In-Reply-To: <20241121084731.3570-1-liujing@cmss.chinamobile.com>
2024-11-21 16:47 UTC+0800 ~ liujing <liujing@cmss.chinamobile.com>
> From: liujing <liujing_yewu@cmss.chinamobile.com>
>
> %d in format string requires 'int' but the argument type
> of pf is 'unsigned int'.
>
> Signed-off-by: liujing <liujing@cmss.chinamobile.com>
>
> diff --git a/tools/bpf/bpftool/link.c b/tools/bpf/bpftool/link.c
> index 5cd503b763d7..5bc442d93456 100644
> --- a/tools/bpf/bpftool/link.c
> +++ b/tools/bpf/bpftool/link.c
> @@ -699,7 +699,7 @@ void netfilter_dump_plain(const struct bpf_link_info *info)
> if (pfname)
> printf("\n\t%s", pfname);
> else
> - printf("\n\tpf: %d", pf);
> + printf("\n\tpf: %u", pf);
>
> if (hookname)
> printf(" %s", hookname);
Thanks, but while at it can you also fix the format specifier for the
other two prints of "lines" in the function (via "p_err()"), please?
Quentin
next prev parent reply other threads:[~2024-11-21 11:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 8:47 liujing
2024-11-21 11:41 ` Quentin Monnet
2024-11-21 11:42 ` Quentin Monnet [this message]
2024-11-21 11:45 ` Quentin Monnet
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=80690ecf-2d21-460c-b031-8133ca571e7c@kernel.org \
--to=qmo@kernel.org \
--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=linux-kernel@vger.kernel.org \
--cc=liujing@cmss.chinamobile.com \
--cc=liujing_yewu@cmss.chinamobile.com \
--cc=martin.lau@linux.dev \
--cc=sdf@fomichev.me \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®