diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-07-19 15:22:53 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-07-23 15:40:27 +0200 |
| commit | de8e50af88d9467d9d6cfb9f3eabfd7a3257c5f9 (patch) | |
| tree | a2a63745645ca8380a74ff4ef49b7a6f742f443c /tools/perf/scripts/python | |
| parent | 1590cf0329716306e948a8fc29f1d3ee87d3989f (diff) | |
thermal: sysfs: Use sysfs_emit_at() in trans_table_show()
Replace snprintf() with sysfs_emit_at() in trans_table_show().
sysfs_emit_at() is preferred for formatting sysfs output because it
provides safer bounds checking.
Convert multiple PAGE_SIZE length checks to check the number of bytes
actually copied by sysfs_emit_at(), thus avoiding manual buffer size
accounting.
Consistently return -EFBIG when the transition table output exceeds the
sysfs buffer, including the header row.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260719132251.31936-3-thorsten.blum@linux.dev
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
