Skip to content

Commit

Permalink
Gracefully handle missing brightness_hw_changed
Browse files Browse the repository at this point in the history
  • Loading branch information
sjmonson authored and jackpot51 committed Apr 24, 2024
1 parent 6bbe1c2 commit 51cf922
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hid_backlight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ pub fn daemon() {
let mut inotify = Inotify::init().unwrap();
let mut watches = inotify.watches();
watches.add(&brightness_file, WatchMask::MODIFY).unwrap();
watches.add(&brightness_hw_changed_file, WatchMask::MODIFY).unwrap();
if let Err(e) = watches.add(&brightness_hw_changed_file, WatchMask::MODIFY) {
log::warn!("hid_backlight: failed to watch hardware changed file: {}", e);
}
if let Err(e) = watches.add(&color_file, WatchMask::MODIFY) {
log::warn!("hid_backlight: failed to watch keyboard color: {}", e);
}
Expand Down

0 comments on commit 51cf922

Please sign in to comment.