From c6a3d622f1ce43b0a9cef45403bd129b23f3c083 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Tue, 13 Sep 2005 16:34:08 +0000 Subject: Slightly change the xSeries checksumming method to accomodate a strange xSeries 440 VPD record. Also tweak the decoding of the "Default Flash Image File Name" entry. Thanks to Torsten Seemann for providing a test VPD record. --- vpddecode.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'vpddecode.c') diff --git a/vpddecode.c b/vpddecode.c index cafc6ee..06c5118 100644 --- a/vpddecode.c +++ b/vpddecode.c @@ -267,8 +267,8 @@ static int decode(const u8 *p) if(p[5]<0x30) return 0; - /* XSeries have longer records. */ - if(!(p[5]>=0x46 && checksum(p, 0x46)) + /* XSeries have longer records, exact length seems to vary. */ + if(!(p[5]>=0x45 && checksum(p, p[5])) /* Some Netvista seem to work with this. */ && !(checksum(p, 0x30)) /* The Thinkpad/Thinkcentre checksum does *not* include the first @@ -291,7 +291,10 @@ static int decode(const u8 *p) return 1; print_entry("BIOS Release Date", p+0x30, 8); - print_entry("Default Flash Image File Name", p+0x38, 13); + /* This one seems to be a variable length field, it is usually 13 + byte long but was seen 12 byte long on an xSeries 440. */ + print_entry("Default Flash Image File Name", p+0x38, + 0x38+13