diff options
Diffstat (limited to 'vendor/github.com/prometheus/procfs/sysfs/class_infiniband.go')
-rw-r--r-- | vendor/github.com/prometheus/procfs/sysfs/class_infiniband.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/prometheus/procfs/sysfs/class_infiniband.go b/vendor/github.com/prometheus/procfs/sysfs/class_infiniband.go index 0eab1eb..be900fa 100644 --- a/vendor/github.com/prometheus/procfs/sysfs/class_infiniband.go +++ b/vendor/github.com/prometheus/procfs/sysfs/class_infiniband.go | |||
@@ -251,7 +251,7 @@ func parseInfiniBandCounters(portPath string) (*InfiniBandCounters, error) { | |||
251 | name := filepath.Join(path, f.Name()) | 251 | name := filepath.Join(path, f.Name()) |
252 | value, err := util.SysReadFile(name) | 252 | value, err := util.SysReadFile(name) |
253 | if err != nil { | 253 | if err != nil { |
254 | if os.IsNotExist(err) || err.Error() == "operation not supported" || err.Error() == "invalid argument" { | 254 | if os.IsNotExist(err) || os.IsPermission(err) || err.Error() == "operation not supported" || err.Error() == "invalid argument" { |
255 | continue | 255 | continue |
256 | } | 256 | } |
257 | return nil, fmt.Errorf("failed to read file %q: %v", name, err) | 257 | return nil, fmt.Errorf("failed to read file %q: %v", name, err) |
@@ -334,7 +334,7 @@ func parseInfiniBandCounters(portPath string) (*InfiniBandCounters, error) { | |||
334 | name := filepath.Join(path, f.Name()) | 334 | name := filepath.Join(path, f.Name()) |
335 | value, err := util.SysReadFile(name) | 335 | value, err := util.SysReadFile(name) |
336 | if err != nil { | 336 | if err != nil { |
337 | if os.IsNotExist(err) || err.Error() == "operation not supported" || err.Error() == "invalid argument" { | 337 | if os.IsNotExist(err) || os.IsPermission(err) || err.Error() == "operation not supported" || err.Error() == "invalid argument" { |
338 | continue | 338 | continue |
339 | } | 339 | } |
340 | return nil, fmt.Errorf("failed to read file %q: %v", name, err) | 340 | return nil, fmt.Errorf("failed to read file %q: %v", name, err) |