summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorKate Hsuan <hpa@redhat.com>2026-07-10 20:51:22 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-07-21 15:29:02 +0200
commit6587dd87595cfae6bf1304cd0cd1df2274424e42 (patch)
tree9e268bcd7377e99076eb677c1b672b4f955e6118 /tools/perf/scripts/python
parent1590cf0329716306e948a8fc29f1d3ee87d3989f (diff)
ACPI: battery: Sanitise model_number by dropping unprintable characters
The battery Embedded Controller (EC) may return the model name with trailing unprintable or non-ASCII characters. For example, on some systems: $ cat /sys/class/power_supply/BAT0/model_name LNV-5B10W51864�� If a non-ASCII or an unprintable character is found, it will be replaced with '\0' to ensure the model_number is a valid string. If left intact, the malformed string prevents udev rules and hwdb working correctly. Link: https://gitlab.freedesktop.org/upower/upower/-/work_items/345 Signed-off-by: Kate Hsuan <hpa@redhat.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> [ rjw: Subject tweak ] Link: https://patch.msgid.link/20260710125122.1621877-1-hpa@redhat.com 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