{
char *cur, *eol = NULL;
+ if ((cur = strstr(base, "BIOS Information")) == NULL)
+ return base;
+
+ base = cur;
if ((cur = strstr(base, "Vendor: ")) != NULL) {
cur += 8;
eol = strchr(cur, '\n');
goto no_memory;
}
- return eol ? eol + 1 : NULL;
+ return base + strlen("BIOS Information");
no_memory:
return NULL;
{
char *cur, *eol = NULL;
- if ((base = strstr(base, "System Information")) == NULL)
- return 0;
+ if ((cur = strstr(base, "System Information")) == NULL)
+ return base;
+ base = cur;
if ((cur = strstr(base, "Manufacturer: ")) != NULL) {
cur += 14;
eol = strchr(cur, '\n');
goto no_memory;
}
- return eol ? eol + 1 : NULL;
+ return base + strlen("System Information");
no_memory:
return NULL;
goto no_memory;
}
- if (!eol)
- break;
- base = eol + 1;
+ base += strlen("Processor Information");
}
return base;
}
next:
- if (!eol)
- break;
- base = eol + 1;
+ base += strlen("Memory Device");
}
return base;