Change return value of getGuidInfo from globaldata. Now only guid string is returned.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1195 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2
2006-08-06 08:18:32 +00:00
parent e55d8a3c6b
commit 20c5c53fd7
3 changed files with 24 additions and 26 deletions

View File

@@ -779,8 +779,8 @@ public class GlobalData {
//
// For PCD get tokenSpaceGUid
//
public synchronized static String[] getGuidInfoFromCname(String cName){
String cNameGuid[] = null;
public synchronized static String getGuidInfoFromCname(String cName){
String cNameGuid = null;
String guid = null;
Set set = spdTable.keySet();
Iterator iter = set.iterator();
@@ -793,9 +793,7 @@ public class GlobalData {
Spd spd = (Spd) spdTable.get(iter.next());
guid = spd.getGuidFromCname(cName);
if (guid != null){
cNameGuid = new String[2];
cNameGuid[0] = cName;
cNameGuid[1] = guid;
cNameGuid = guid;
break;
}
}

View File

@@ -161,12 +161,12 @@ public class PlatformPcdPreprocessActionForBuilding extends PlatformPcdPreproces
@param guidCName Guid CName string.
@return String[] Guid information from SPD file.
@return String Guid information from SPD file.
@throws PlatformPcdPreprocessException
Fail to get Guid information from SPD file.
**/
public String[] getGuidInfoFromSpd(String guidCName) throws PlatformPcdPreprocessException {
String[] tokenSpaceStrRet = null;
public String getGuidInfoFromSpd(String guidCName) throws PlatformPcdPreprocessException {
String tokenSpaceStrRet = null;
try {
tokenSpaceStrRet = GlobalData.getGuidInfoFromCname(guidCName);
} catch ( Exception e ) {
@@ -590,7 +590,7 @@ public class PlatformPcdPreprocessActionForBuilding extends PlatformPcdPreproces
String dynamicPrimaryKey = null;
DynamicPcdBuildDefinitions dynamicPcdBuildDefinitions = null;
List<DynamicPcdBuildDefinitions.PcdBuildData> dynamicPcdBuildDataArray = null;
String[] tokenSpaceStrRet = null;
String tokenSpaceStrRet = null;
//
// If FPD document is not be opened, open and initialize it.
@@ -618,7 +618,7 @@ public class PlatformPcdPreprocessActionForBuilding extends PlatformPcdPreproces
dynamicPcdBuildDataArray = dynamicPcdBuildDefinitions.getPcdBuildDataList();
for (index = 0; index < dynamicPcdBuildDataArray.size(); index ++) {
tokenSpaceStrRet = this.getGuidInfoFromSpd(dynamicPcdBuildDataArray.get(index).getTokenSpaceGuidCName());
tokenSpaceStrRet = getGuidInfoFromSpd(dynamicPcdBuildDataArray.get(index).getTokenSpaceGuidCName());
if (tokenSpaceStrRet == null) {
exceptionString = "Fail to get token space guid for token " + dynamicPcdBuildDataArray.get(index).getCName();
@@ -627,7 +627,7 @@ public class PlatformPcdPreprocessActionForBuilding extends PlatformPcdPreproces
}
dynamicPrimaryKey = Token.getPrimaryKeyString(dynamicPcdBuildDataArray.get(index).getCName(),
tokenSpaceStrRet[1]);
tokenSpaceStrRet);
if (dynamicPrimaryKey.equalsIgnoreCase(token.getPrimaryKeyString())) {
return dynamicPcdBuildDataArray.get(index);
}