checkasm: improve Linux perf error message

Report the failing system call name, as is convention, rather than just
a rather unhelpful "syscall".
This commit is contained in:
Rémi Denis-Courmont 2023-07-14 20:08:37 +03:00
parent 983af74452
commit f25ad0fe02

View File

@ -667,7 +667,7 @@ static int bench_init_linux(void)
state.sysfd = syscall(__NR_perf_event_open, &attr, 0, -1, -1, 0);
if (state.sysfd == -1) {
perror("syscall");
perror("perf_event_open");
return -1;
}
return 0;