Chameleon

Chameleon Commit Details

Date:2011-06-13 09:59:04 (12 years 10 months ago)
Author:Kabyl
Commit:1004
Parents: 1003
Message:applied a patch by bcc9 (with modification) to fix a bug in setSMBValue() where bytes and words are always handled as dwords
Changes:
M/trunk/i386/libsaio/smbios.c

File differences

trunk/i386/libsaio/smbios.c
448448
449449
450450
451
452
451453
452454
453455
......
481483
482484
483485
484
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
485505
486
487
488
489
506
490507
508
491509
492510
493511
{
const char *string = 0;
int len;
bool parsed;
int val;
if (numOfSetters <= idx)
return false;
//case kSMBQWord:
if (SMBSetters[idx].keyString)
{
if (getIntForKey(SMBSetters[idx].keyString, (int *)&(value->dword), SMBPlist))
parsed = getIntForKey(SMBSetters[idx].keyString, &val, SMBPlist);
if (!parsed)
if (structPtr->orig->type == kSMBTypeMemoryDevice)// MemoryDevice only
parsed = getSMBValueForKey(structPtr->orig, SMBSetters[idx].keyString, NULL, (returnType *)&val);
if (parsed)
{
switch (SMBSetters[idx].valueType)
{
case kSMBByte:
value->byte = (uint8_t)val;
break;
case kSMBWord:
value->byte = (uint16_t)val;
break;
case kSMBDWord:
default:
value->byte = (uint32_t)val;
break;
}
return true;
else
if (structPtr->orig->type == kSMBTypeMemoryDevice)// MemoryDevice only
if (getSMBValueForKey(structPtr->orig, SMBSetters[idx].keyString, NULL, value))
return true;
}
}
if (SMBSetters[idx].getSMBValue)
if (SMBSetters[idx].getSMBValue(value))
return true;

Archive Download the corresponding diff file

Revision: 1004