From 20f10899a0018ffce790496cc87b4d51e68716f9 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sat, 20 Oct 2007 12:59:16 +0000 Subject: Fix crash, SCSI detection on newer kernels. --- hardinfo2/arch/linux/common/storage.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'hardinfo2/arch') diff --git a/hardinfo2/arch/linux/common/storage.h b/hardinfo2/arch/linux/common/storage.h index cd3c3249..71c206cd 100644 --- a/hardinfo2/arch/linux/common/storage.h +++ b/hardinfo2/arch/linux/common/storage.h @@ -79,9 +79,13 @@ __scan_scsi_devices(void) model = g_strdup_printf("%s %s", vendor, model + 7); } else if (!strncmp(buf, "Type: ", 8)) { - char *p = strstr(buf, "ANSI SCSI revi"); + char *p; gchar *type = NULL, *icon = NULL; + if (!(p = strstr(buf, "ANSI SCSI revision"))) { + p = strstr(buf, "ANSI SCSI revision"); + } + if (p != NULL) { while (*(--p) == ' '); *(++p) = 0; -- cgit v1.2.3