Summary: | [regression] keyboard backlight is not exported as per commit 793642bfb | ||
---|---|---|---|
Product: | upower | Reporter: | Marco Trevisan (Treviño) <mail> |
Component: | general | Assignee: | Marco Trevisan (Treviño) <mail> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | medium | CC: | mail, martin.pitt |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | UpKbdBacklight: don't check the *end value when using g_ascii_strtoll |
Description
Marco Trevisan (Treviño)
2016-05-25 15:41:40 UTC
Created attachment 124085 [details] [review] UpKbdBacklight: don't check the *end value when using g_ascii_strtoll g_ascii_strtoll would set end to match buf when a parsing error occurred, so there's no reason to also check what this is pointing to Thanks, applied. I had assumed that you tested the previous patch on a system that actually has a keyboard backlight (I don't).
> end == buf is already enough to check that the parsing went ok (as per g_ascii_strtoll docs).
ITYM s/ok/not ok/. What does this stumble on, I take it it is the newline? I. e. it's trying to parse '2\n' and *end == '\n'?
(In reply to Martin Pitt from comment #2) > Thanks, applied. I had assumed that you tested the previous patch on a > system that actually has a keyboard backlight (I don't). Oh, well actually I did... But maybe it happened for some reason that I forgot to fully test the case after adding this *end check you suggested. Maybe I just didn't run the right binary, sorry about that. > > end == buf is already enough to check that the parsing went ok (as per g_ascii_strtoll docs). > > ITYM s/ok/not ok/. Yeah... or s/that/whether/ > What does this stumble on, I take it it is the newline? > I. e. it's trying to parse '2\n' and *end == '\n'? Yep, *end is 10, and thus '\n'. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.