Bug in dmi_get_year (causing apic not getting enabled)
Hi,
dmi_get_year extracts the year with:
simple_strtoul(s, NULL, 0);
for biosdates in 2008 and 2009 this will return 0 because 8 and 9 are no valid octal digits. This will e.g. result in the apic not getting enabled. Changing this to
simple_strtoul(s, NULL, 10);
should fix the problem.
regards, Matthias Pfaller
Signature · 5 lines
Matthias Pfaller Software Entwicklung marco Systemanalyse und Entwicklung GmbH Tel +49 8131 5161 41 Hans-Böckler-Str. 2, D 85221 Dachau Fax +49 8131 5161 66 http://www.marco.de/ Email [email protected] Geschäftsführer Martin Reuter HRB 171775 Amtsgericht München
Quoted 6 lines · Matthias Pfaller
Hi,
dmi_get_yearextracts the year with:simple_strtoul(s, NULL, 0);
Quoted 7 lines
for biosdates in 2008 and 2009 this will return 0 because 8 and 9 are no valid octal digits. This will e.g. result in the apic not getting enabled. Changing this to
simple_strtoul(s, NULL, 10);should fix the problem.
Only if there is a leading 0....
Eric
Quoted 12 lines · Eric W. Biederman
Quoted 10 lines · Matthias Pfaller
Hi,
dmi_get_yearextracts the year with:simple_strtoul(s, NULL, 0);for biosdates in 2008 and 2009 this will return 0 because 8 and 9 are no valid octal digits. This will e.g. result in the apic not getting enabled. Changing this to
Quoted 5 lines
Quoted 3 lines
simple_strtoul(s, NULL, 10);should fix the problem.
Only if there is a leading 0....
Yes, 4-digit year is required as of smbios 2.3 (1998). There are broken BIOSes out there though. So there is no need to guess base if we know it. I sent a fix for this yesterday. Any objections?