projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
179cf85
)
config: fix OB1, describe config errors
author
Evgeny Naumov
<evgeny.a.naumov@gmail.com>
Mon, 10 Sep 2018 16:54:43 +0000
(12:54 -0400)
committer
Evgeny Naumov
<evgeny.a.naumov@gmail.com>
Mon, 10 Sep 2018 16:54:43 +0000
(12:54 -0400)
src/gpu_nvml.c
patch
|
blob
|
history
diff --git
a/src/gpu_nvml.c
b/src/gpu_nvml.c
index
ab4390b
..
b34d80d
100644
(file)
--- a/
src/gpu_nvml.c
+++ b/
src/gpu_nvml.c
@@
-48,9
+48,11
@@
static int nvml_config(const char *key, const char *value) {
if (strcasecmp(key, config_keys[0]) == 0) {
device_ix = strtoul(value, &eptr, 10);
if (eptr == value) {
+ ERROR("Failed to parse GPUIndex value \"%s\"", value);
return -1;
}
- if (device_ix > 64) {
+ if (device_ix >= 64) {
+ ERROR("At most 64 GPUs (0 <= GPUIndex < 64) are supported!");
return -2;
}
conf_match_mask |= (1 << device_ix);
@@
-58,6
+60,7
@@
static int nvml_config(const char *key, const char *value) {
if
IS_TRUE(value) { conf_mask_is_exclude = 1; }
} else {
+ ERROR("Unrecognized config option %s", key);
return -10;
}