Return the entire input string if cannot extract device name

This commit is contained in:
Ben Zhang 2024-11-27 23:43:17 -08:00
parent fdfec20273
commit 5257762954

View file

@ -63,7 +63,9 @@ func extractDiskName(input string) string {
return strings.Join(name, "_")
}
return ""
// If the regex doesn't match, return the entire input string
return input
}
// NewSMARTctl is smartctl constructor