mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
perf ui scripts: Switch FILENAME_MAX to NAME_MAX
FILENAME_MAX is the same as PATH_MAX (4kb) in glibc rather than NAME_MAX's 255. Switch to using NAME_MAX and ensure the '\0' is accounted for in the path's buffer size. Signed-off-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250717150855.1032526-3-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
82aac55337
commit
008b75759e
|
|
@ -94,7 +94,7 @@ static int check_ev_match(int dir_fd, const char *scriptname, struct perf_sessio
|
|||
FILE *fp;
|
||||
|
||||
{
|
||||
char filename[FILENAME_MAX + 5];
|
||||
char filename[NAME_MAX + 5];
|
||||
int fd;
|
||||
|
||||
scnprintf(filename, sizeof(filename), "bin/%s-record", scriptname);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user