summaryrefslogtreecommitdiff
path: root/arch/linux/common/storage.h
diff options
context:
space:
mode:
authorSimon Quigley <tsimonq2@ubuntu.com>2017-06-19 14:38:44 -0500
committerSimon Quigley <tsimonq2@ubuntu.com>2017-06-19 14:38:44 -0500
commitee6c3f9b4cf08a276c971dee66e1acdb32b3dff9 (patch)
treef7dc3f671114fd867204dca23871eaf2fa4ccc4a /arch/linux/common/storage.h
parent7aeb5ac87c6105bd8fcc9b1fd12e37ba1550f587 (diff)
Import Upstream version 0.4.2.3
Diffstat (limited to 'arch/linux/common/storage.h')
-rw-r--r--arch/linux/common/storage.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/linux/common/storage.h b/arch/linux/common/storage.h
index 6700984b..71c206cd 100644
--- a/arch/linux/common/storage.h
+++ b/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;
@@ -335,7 +339,7 @@ __scan_ide_devices(void)
g_hash_table_insert(moreinfo, devid, strhash);
g_free(model);
- model = "";
+ model = g_strdup("");
} else
g_free(device);