mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
ac/gpu_info: don't read uninitialized dev_filename
This fixes radeonsi-run-tests.py not being able to read AMD_DEBUG=info.
Fixes: 8777894d3e - amd: remove radeon_info::dev_filename
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39145>
This commit is contained in:
parent
86b74563a0
commit
b340588119
1 changed files with 2 additions and 2 deletions
|
|
@ -1712,9 +1712,9 @@ void ac_print_gpu_info(FILE *f, const struct radeon_info *info, int fd)
|
|||
fprintf(f, " marketing_name = %s\n", info->marketing_name);
|
||||
|
||||
char proc_fd[32];
|
||||
char dev_filename[32];
|
||||
char dev_filename[32] = {0};
|
||||
snprintf(proc_fd, sizeof(proc_fd), "/proc/self/fd/%u", fd);
|
||||
if (readlink(proc_fd, dev_filename, sizeof(dev_filename)) != -1)
|
||||
if (readlink(proc_fd, dev_filename, sizeof(dev_filename) - 1) != -1)
|
||||
fprintf(f, " dev_filename = %s\n", dev_filename);
|
||||
|
||||
fprintf(f, " num_se = %i\n", info->num_se);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue