Re: [PATCH v1] perf: Switch printf("...%s", strerror(errno)) to printf("...%m")
From: Arnaldo Carvalho de Melo
Date: Tue Jan 13 2026 - 16:48:30 EST
On Fri, Jan 09, 2026 at 05:25:10PM -0800, Namhyung Kim wrote:
> On Wed, Nov 19, 2025 at 03:36:21PM -0800, Ian Rogers wrote:
> > strerror has thread safety issues, strerror_r requires stack allocated
> > buffers. Code in perf has already been using the "%m" formatting flag
> > that is a widely support glibc extension to print the current errno's
> > description. Expand the usage of this formatting flag and remove usage
> > of strerror/strerror_r.
> >
> > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
>
> Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Thanks, applied to perf-tools-next,
- Arnaldo