]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
When UseSerial is enabled, allow configured ignored disk names to be copied to the...
authorstevegilbert23 <stevegilbert23@gmail.com>
Wed, 5 Feb 2025 22:23:37 +0000 (17:23 -0500)
committerGitHub <noreply@github.com>
Wed, 5 Feb 2025 22:23:37 +0000 (17:23 -0500)
src/smart.c

index 62d896e4c56bdff408b83670fe321fcc5fec9e4b..a1a0ed12cc3675b60c293997e25486d1b048ba94 100644 (file)
@@ -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);
       }
     }