hwmon: refactor & support lookup of all indices#226
Open
vmatare wants to merge 6 commits into
Open
Conversation
wonbinbk
reviewed
Feb 15, 2024
| 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.
Suggested change
| for (const filesystem::path &subdir : dir_entries<filter_subdirs>(path)) { | |
| for (const auto &subdir : dir_entries<filter_subdirs>(path)) { |
and elsewhere in this PR
wonbinbk
reviewed
Feb 15, 2024
wonbinbk
reviewed
Feb 15, 2024
| else | ||
| found_paths_.push_back(path); | ||
| else { | ||
| vector<filesystem::path> paths = dir_entries<filter_driver_file>(path); |
There was a problem hiding this comment.
Suggested change
| vector<filesystem::path> paths = dir_entries<filter_driver_file>(path); | |
| auto paths = dir_entries<filter_driver_file>(path); |
wonbinbk
reviewed
Feb 15, 2024
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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...