From: Evgeny Naumov Date: Mon, 10 Sep 2018 16:54:43 +0000 (-0400) Subject: config: fix OB1, describe config errors X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=888928d046889625d873b4b3137242c382a9741d;p=collectd.git config: fix OB1, describe config errors --- diff --git a/src/gpu_nvml.c b/src/gpu_nvml.c index ab4390b8..b34d80d3 100644 --- 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; }