Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149934016
D26692.id77922.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
526 B
Referenced Files
None
Subscribers
None
D26692.id77922.diff
View Options
Index: usr.bin/backlight/backlight.c
===================================================================
--- usr.bin/backlight/backlight.c
+++ usr.bin/backlight/backlight.c
@@ -144,6 +144,9 @@
action = BACKLIGHT_SET_BRIGHTNESS;
if (argc == 1) {
+ /* ignore a trailing % for user friendlyness */
+ if (argv[0][strlen(argv[0]) - 1] == '%')
+ argv[0][strlen(argv[0]) - 1] = '\0';
percent = strtonum(argv[0], 0, 100, &percent_error);
if (percent_error)
errx(1, "Cannot parse brightness level %s: %s",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 29, 5:24 AM (11 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30511983
Default Alt Text
D26692.id77922.diff (526 B)
Attached To
Mode
D26692: backlight: Accept % in the input for user friendlyness
Attached
Detach File
Event Timeline
Log In to Comment