fix a bug in Service.c

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@841 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2006-07-08 15:21:21 +00:00
parent 03e772c322
commit 4c29d43304
1 changed files with 4 additions and 8 deletions

View File

@ -124,7 +124,7 @@ GetWorker (
// It is a pointer type. So get the MaxSize reserved for // It is a pointer type. So get the MaxSize reserved for
// this PCD entry. // this PCD entry.
// //
GetPtrTypeSize (TokenNumber, &GetSize); GetPtrTypeSize (TmpTokenNumber, &GetSize);
} }
CopyMem (VaraiableDefaultBuffer, Data + VariableHead->Offset, GetSize); CopyMem (VaraiableDefaultBuffer, Data + VariableHead->Offset, GetSize);
FreePool (Data); FreePool (Data);
@ -630,7 +630,7 @@ SetWorker (
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
case PCD_TYPE_STRING: case PCD_TYPE_STRING:
if (SetPtrTypeSize (TokenNumber, Size)) { if (SetPtrTypeSize (TmpTokenNumber, Size)) {
CopyMem (&StringTable[*((UINT16 *)InternalData)], Data, *Size); CopyMem (&StringTable[*((UINT16 *)InternalData)], Data, *Size);
return EFI_SUCCESS; return EFI_SUCCESS;
} else { } else {
@ -639,7 +639,7 @@ SetWorker (
case PCD_TYPE_HII: case PCD_TYPE_HII:
if (PtrType) { if (PtrType) {
if (!SetPtrTypeSize (TokenNumber, Size)) { if (!SetPtrTypeSize (TmpTokenNumber, Size)) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
} }
@ -662,13 +662,9 @@ SetWorker (
return Status; return Status;
} }
//
// Bug Bug: Please implement this
//
case PCD_TYPE_DATA: case PCD_TYPE_DATA:
if (PtrType) { if (PtrType) {
if (SetPtrTypeSize (TokenNumber, Size)) { if (SetPtrTypeSize (TmpTokenNumber, Size)) {
CopyMem (InternalData, Data, *Size); CopyMem (InternalData, Data, *Size);
return EFI_SUCCESS; return EFI_SUCCESS;
} else { } else {