diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-10-20 12:59:16 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-10-20 12:59:16 +0000 |
commit | 20f10899a0018ffce790496cc87b4d51e68716f9 (patch) | |
tree | 8b64dc941b7df569f0f7a245ed8bbc54d3f88b3a /hardinfo2/arch | |
parent | d5160894773f5be501469fd3bba06211000ca798 (diff) |
Fix crash, SCSI detection on newer kernels.
Diffstat (limited to 'hardinfo2/arch')
-rw-r--r-- | hardinfo2/arch/linux/common/storage.h | 6 |
1 files changed, 5 insertions, 1 deletions
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; |