From 17597167349672611dbe97736a06f215879b2016 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Thu, 18 Dec 2025 15:40:04 +0100 Subject: [PATCH] Fix importing of vendor/model from smartctl --- cmdline/support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmdline/support.c b/cmdline/support.c index e5cfe9a1..f0fc5633 100644 --- a/cmdline/support.c +++ b/cmdline/support.c @@ -1660,8 +1660,8 @@ int smartctl_attribute(FILE* f, const char* file, const char* name, uint64_t* sm } } } - } else if (sscanf(s, "Device Model: %63s %63s", vendor, model) == 2) { - } else if (sscanf(s, "Device Model: %63s", model) == 1) { + } else if (sscanf(s, "Model Family: %63[^\n]", vendor) == 1) { + } else if (sscanf(s, "Device Model: %63[^\n]", model) == 1) { /* SCSI */ } else if (sscanf(s, "Serial number: %63s", serial) == 1) { /* note "n" of "number" lower case */ } else if (sscanf(s, "Elements in grown defect list: %" SCNu64, &smart[SMART_REALLOCATED_SECTOR_COUNT]) == 1) {