svartalf / rust-battery

Rust crate providing cross-platform information about the notebook batteries.
https://crates.io/crates/battery
Apache License 2.0
354 stars 40 forks source link

No such device error for Linux should be considered as missing file #28

Closed svartalf closed 5 years ago

svartalf commented 5 years ago

Originally reported at https://github.com/svartalf/rust-battop/issues/7

It seems that some drivers are creating the files at sysfs, but attempt to read them fails with the ENODEV error. Same issue can be observed here with a current_now file.

I suppose it would be okay to consider the ENODEV errors as a "missing file" result.