From: stevegilbert23 Date: Wed, 5 Feb 2025 22:23:37 +0000 (-0500) Subject: When UseSerial is enabled, allow configured ignored disk names to be copied to the... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=63e454030901c19436e0d64b03c72879ae88079b;p=thirdparty%2Fcollectd.git When UseSerial is enabled, allow configured ignored disk names to be copied to the serial ignore list for devices without serials. --- diff --git a/src/smart.c b/src/smart.c index 62d896e4c..a1a0ed12c 100644 --- a/src/smart.c +++ b/src/smart.c @@ -150,7 +150,10 @@ static int create_ignorelist_by_serial(ignorelist_t *il) { if (name[0] == '/') name++; - if (ignorelist_match(ignorelist, name) == 0 && serial != NULL) { + if (ignorelist_match(ignorelist, name) == 0) { + // Allow ignored devices with no serial to carry over to serial ignore list + if (!serial) + serial = name; ignorelist_add(ignorelist_by_serial, serial); } }