asusd: cleanup platform notifs, prevent more duplications

This commit is contained in:
Luke D. Jones
2023-07-01 12:30:51 +12:00
parent 83455a5ba3
commit 2a8ca0a39a
3 changed files with 14 additions and 15 deletions

View File

@@ -23,7 +23,7 @@ macro_rules! watch_attr {
path.push($attr_name);
if let Some(path) = path.to_str() {
let inotify = inotify::Inotify::init()?;
inotify.watches().add(path, inotify::WatchMask::CLOSE_WRITE | inotify::WatchMask::MODIFY)
inotify.watches().add(path, inotify::WatchMask::MODIFY)
.map_err(|e| {
if e.kind() == std::io::ErrorKind::NotFound {
PlatformError::AttrNotFound(format!("{}", $attr_name))