Skip to content

Commit

Permalink
Fix W510 model recognization
Browse files Browse the repository at this point in the history
fixed #3
  • Loading branch information
dixyes committed Jul 9, 2024
1 parent 301dbda commit 67c6d1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tablesfix.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,10 @@ int main(int argc, char **argv) {
printf("System Manufacturer: %s\n", dmi_string(smbios_table, ((SMBIOS_TABLE_TYPE1 *) smbios_table)->Manufacturer));
p_str = dmi_string(smbios_table, ((SMBIOS_TABLE_TYPE1 *) smbios_table)->ProductName);
printf("System Product Name: %s\n", p_str);
if (p_str && !memcmp(p_str, "W510", 4)) {
if (p_str && (
memmem(p_str, strlen(p_str), "W510", 4) ||
memmem(p_str, strlen(p_str), "PGU-WBY0", 8)
)) {
is_w510 = 1;
}
}
Expand Down

0 comments on commit 67c6d1f

Please sign in to comment.