From: sstrehla Date: Tue, 21 Jul 2020 08:03:26 +0000 (+0200) Subject: Fixed typo in collectd.conf.pod X-Git-Tag: collectd-5.12.0~25^2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=946a07e5c4e49a20fc8053c5630efc47e1bc24c0;p=thirdparty%2Fcollectd.git Fixed typo in collectd.conf.pod Replaced strncasecmp with strcasecmp in smart.c --- diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 2c8a79ef9..af0b14fed 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -8669,7 +8669,7 @@ time and bad sectors. Also, all SMART attributes are collected along with the normalized current value, the worst value, the threshold and a human readable value. The plugin can also collect SMART attributes for NVMe disks (present in accordance with NVMe 1.4 spec) and Additional -SMART Attributes form Intel® NVMe disks. +SMART Attributes from Intel® NVMe disks. Using the following two options you can ignore some disks or configure the collection only of specific disks. diff --git a/src/smart.c b/src/smart.c index e251d5286..d2028caaa 100644 --- a/src/smart.c +++ b/src/smart.c @@ -78,17 +78,17 @@ static int smart_config(const char *key, const char *value) { if (ignorelist == NULL) return 1; - if (strncasecmp("Disk", key, 5) == 0) { + if (strcasecmp("Disk", key) == 0) { ignorelist_add(ignorelist, value); - } else if (strncasecmp("IgnoreSelected", key, 15) == 0) { + } else if (strcasecmp("IgnoreSelected", key) == 0) { invert_ignorelist = 1; if (IS_TRUE(value)) invert_ignorelist = 0; ignorelist_set_invert(ignorelist, invert_ignorelist); - } else if (strncasecmp("IgnoreSleepMode", key, 16) == 0) { + } else if (strcasecmp("IgnoreSleepMode", key) == 0) { if (IS_TRUE(value)) ignore_sleep_mode = 1; - } else if (strncasecmp("UseSerial", key, 10) == 0) { + } else if (strcasecmp("UseSerial", key) == 0) { if (IS_TRUE(value)) use_serial = 1; } else {