Skip to content
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

additional error handling when reading files in /sys/class #215

Conversation

pgier
Copy link
Collaborator

@pgier pgier commented Sep 11, 2019

Some regular files in /sys/class are not readable on certain
systems, so just ignore them.

Related to #213 which checks that directory entries are regular files and not symlinks. However, there is the additional problem that some files in /sys/class/ (e.g. /sys/class/net/enp0s31f6/phys_port_id) are not readable even though they are regular files. Before the recent refactoring, these read errors were ignored. This change makes these errors ignored again.

Some regular files in /sys/class are not readable on certain
systems, so just ignore them.

Signed-off-by: Paul Gier <pgier@redhat.com>
@pgier
Copy link
Collaborator Author

pgier commented Sep 11, 2019

See also prometheus/node_exporter#1465

@pgier pgier merged commit 499c855 into prometheus:master Sep 15, 2019
bobrik pushed a commit to bobrik/procfs that referenced this pull request Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant