Commit 091f46c
authored
class_cooling_device: ignore EINVAL (etc) when reading files. (#783)
Fixes: #746, fixes prometheus/node_exporter#3420
Some cooling devices return errors when attempting to read state files.
When that happens, ignore the error, and skip to the next device rather
than failing to return any devices.
Signed-off-by: Malcolm Rowe <malcolmr@google.com>1 parent 5efaf0a commit 091f46c
File tree
3 files changed
+26
-10
lines changed- sysfs
- testdata
3 files changed
+26
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | | - | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7057 | 7057 | | |
7058 | 7058 | | |
7059 | 7059 | | |
7060 | | - | |
| 7060 | + | |
7061 | 7061 | | |
7062 | | - | |
| 7062 | + | |
7063 | 7063 | | |
7064 | 7064 | | |
7065 | | - | |
| 7065 | + | |
7066 | 7066 | | |
7067 | | - | |
| 7067 | + | |
7068 | 7068 | | |
7069 | 7069 | | |
7070 | | - | |
| 7070 | + | |
| 7071 | + | |
| 7072 | + | |
| 7073 | + | |
| 7074 | + | |
| 7075 | + | |
| 7076 | + | |
| 7077 | + | |
| 7078 | + | |
| 7079 | + | |
| 7080 | + | |
| 7081 | + | |
| 7082 | + | |
| 7083 | + | |
7071 | 7084 | | |
7072 | 7085 | | |
7073 | | - | |
| 7086 | + | |
7074 | 7087 | | |
7075 | 7088 | | |
7076 | 7089 | | |
| |||
0 commit comments