Add support for specifying case-insensitive SMART attribute names in the smartignore option

This commit is contained in:
Andrea Mazzoleni 2026-06-25 22:52:53 +02:00
parent a6aa723b08
commit 82fdb5663d
51 changed files with 624 additions and 231 deletions

View file

@ -2412,6 +2412,10 @@ int smartctl_attribute(OS_FILE* f, const char* file, const char* name, struct sm
for (i = 0; i < INFO_COUNT; ++i)
info[i] = SMART_UNASSIGNED;
pathcpy(smart[SMART_ERROR_PROTOCOL].name, sizeof(smart[SMART_ERROR_PROTOCOL].name), "error_protocol");
pathcpy(smart[SMART_ERROR_MEDIUM].name, sizeof(smart[SMART_ERROR_MEDIUM].name), "error_medium");
pathcpy(smart[SMART_WEAR_LEVEL].name, sizeof(smart[SMART_WEAR_LEVEL].name), "wear_level");
/* read the file */
inside = 0;
while (1) {