-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hwmon: refactor & support lookup of all indices #226
base: master
Are you sure you want to change the base?
Conversation
src/hwmon.cpp
Outdated
auto subdir = path + "/" + entries[i]->d_name; | ||
free(entries[i]); | ||
|
||
for (const filesystem::path &subdir : dir_entries<filter_subdirs>(path)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (const filesystem::path &subdir : dir_entries<filter_subdirs>(path)) { | |
for (const auto &subdir : dir_entries<filter_subdirs>(path)) { |
and elsewhere in this PR
src/hwmon.cpp
Outdated
else | ||
found_paths_.push_back(path); | ||
else { | ||
vector<filesystem::path> paths = dir_entries<filter_driver_file>(path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vector<filesystem::path> paths = dir_entries<filter_driver_file>(path); | |
auto paths = dir_entries<filter_driver_file>(path); |
4f2f9a7
to
70e7d05
Compare
This should allow the user to omit the indices: config field if a sensor input is sufficiently specified by other criteria. In this case, thinkfan should pick up all pwm/temp files found for the given sensor. A major caveat being that the number of available temperature inputs won't be known before a sensors has been successfully looked up...
Co-authored-by: zotnhucucbot <thaiphd@gmail.com>
de51009
to
a98b773
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I'm a fan
This should allow the user to omit the indices: config field if a sensor input is sufficiently specified by other criteria. In this case, thinkfan should pick up all pwm/temp files found for the given sensor. A major caveat being that the number of available temperature inputs won't be known before a sensors has been successfully looked up...