summaryrefslogtreecommitdiffstats
path: root/src/dmidecodemodule.c
diff options
context:
space:
mode:
authornima <nima@abc39116-655e-4be6-ad55-d661dc543056>2008-12-22 13:37:43 +0000
committernima <nima@abc39116-655e-4be6-ad55-d661dc543056>2008-12-22 13:37:43 +0000
commit25f310ab03c3010d89b0cafa989aeab94bcda58f (patch)
treeccd1b5462a13030e1d85c6162fce96959dab2bc0 /src/dmidecodemodule.c
parent915ed13f64903adda36446657d19e6bae02e3be2 (diff)
downloadpython-dmidecode-25f310ab03c3010d89b0cafa989aeab94bcda58f.tar.gz
python-dmidecode-25f310ab03c3010d89b0cafa989aeab94bcda58f.tar.xz
python-dmidecode-25f310ab03c3010d89b0cafa989aeab94bcda58f.zip
Cleaned up the fix for type(127).
Added the second type of stuffed bios (upstream). Integrated dmidecode the binary into the test case for a more objective result. git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@163 abc39116-655e-4be6-ad55-d661dc543056
Diffstat (limited to 'src/dmidecodemodule.c')
-rw-r--r--src/dmidecodemodule.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dmidecodemodule.c b/src/dmidecodemodule.c
index ef19ee5..345b151 100644
--- a/src/dmidecodemodule.c
+++ b/src/dmidecodemodule.c
@@ -161,8 +161,10 @@ static PyObject* dmidecode_get(PyObject *self, const char* section) {
if((buf=mem_chunk(0xF0000, 0x10000, opt.devmem))!=NULL) {
for(fp=0; fp<=0xFFF0; fp+=16) {
if(memcmp(buf+fp, "_SM_", 4)==0 && fp<=0xFFE0) {
- if(smbios_decode(buf+fp, opt.devmem, pydata)) found++;
- fp+=16;
+ if(smbios_decode(buf+fp, opt.devmem, pydata)) {
+ found++;
+ fp+=16;
+ }
} else if(memcmp(buf+fp, "_DMI_", 5)==0) {
if(legacy_decode(buf+fp, opt.devmem, pydata)) found++;
}