diff options
author | Mattias Andrée <maandree@kth.se> | 2021-03-25 10:14:17 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-03-25 10:14:17 +0100 |
commit | 2b074564916dddcde22542dcb4b47ae224ae9730 (patch) | |
tree | 006c955a40fff4a6e61109e953e52ea851faa61d /adjbacklight.c | |
parent | Remove video group membership check and use file permissions and ownership instead (diff) | |
download | adjbacklight-2b074564916dddcde22542dcb4b47ae224ae9730.tar.gz adjbacklight-2b074564916dddcde22542dcb4b47ae224ae9730.tar.bz2 adjbacklight-2b074564916dddcde22542dcb4b47ae224ae9730.tar.xz |
Use the first backlight device instead of acpi_video
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'adjbacklight.c')
-rw-r--r-- | adjbacklight.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/adjbacklight.c b/adjbacklight.c index 80dd4a5..d79d11b 100644 --- a/adjbacklight.c +++ b/adjbacklight.c @@ -335,11 +335,11 @@ update(int argc, char *argv[], int all, int get, char *set, int set_prefix, doub } else { if ((dir = opendir(BACKLIGHT_DIR))) { while ((ent = readdir(dir))) { - if (all || strstr(ent->d_name, "acpi_video") == ent->d_name) { - if (*ent->d_name && *ent->d_name != '.') { - handle_device(ent->d_name, get, !!set, set_value, set_prefix == '+', set_suffix); - any = 1; - } + if (*ent->d_name && *ent->d_name != '.') { + handle_device(ent->d_name, get, !!set, set_value, set_prefix == '+', set_suffix); + any = 1; + if (!all) + break; } } closedir(dir); |