MdeModulePkg Pcd: Check the input SkuId in SetSku()

then GetSku() could return the currently active SkuId.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17173 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Star Zeng
2015-04-14 08:54:11 +00:00
committed by lzeng14
parent a4d42c22d2
commit 85d0b97d8d
4 changed files with 67 additions and 28 deletions

View File

@@ -2,7 +2,7 @@
The driver internal functions are implmented here.
They build Pei PCD database, and provide access service to PCD database.
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -112,6 +112,13 @@ GetPcdName (
CHAR8 *PcdName;
CHAR8 *Name;
//
// Return NULL when PCD name table is absent.
//
if (Database->PcdNameTableOffset == 0) {
return NULL;
}
//
// TokenNumber Zero is reserved as PCD_INVALID_TOKEN_NUMBER.
// We have to decrement TokenNumber by 1 to make it usable