summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-06 08:18:32 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-06 08:18:32 +0000
commit20c5c53fd7ec8b8395f15ad11a8cb337b7e39ea9 (patch)
tree9599e76db3366af3fa5e7f02f4691ab471db8cd0 /Tools
parente55d8a3c6b8bdf3a228ae4d9f8afbdecdd36444b (diff)
downloadedk2-platforms-20c5c53fd7ec8b8395f15ad11a8cb337b7e39ea9.tar.xz
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
Diffstat (limited to 'Tools')
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java8
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/pcd/action/PlatformPcdPreprocessActionForBuilding.java12
-rw-r--r--Tools/Source/PcdTools/org/tianocore/pcd/action/PlatformPcdPreprocessAction.java30
3 files changed, 24 insertions, 26 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
index d078002bfe..d83114aefb 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
@@ -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;
}
}
diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/PlatformPcdPreprocessActionForBuilding.java b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/PlatformPcdPreprocessActionForBuilding.java
index 7dd90886b9..69be07f89a 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/PlatformPcdPreprocessActionForBuilding.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/PlatformPcdPreprocessActionForBuilding.java
@@ -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);
}
diff --git a/Tools/Source/PcdTools/org/tianocore/pcd/action/PlatformPcdPreprocessAction.java b/Tools/Source/PcdTools/org/tianocore/pcd/action/PlatformPcdPreprocessAction.java
index ac346d69c2..f2d52475ae 100644
--- a/Tools/Source/PcdTools/org/tianocore/pcd/action/PlatformPcdPreprocessAction.java
+++ b/Tools/Source/PcdTools/org/tianocore/pcd/action/PlatformPcdPreprocessAction.java
@@ -96,11 +96,11 @@ public abstract class PlatformPcdPreprocessAction {
@param guidCName the CName of GUID
- @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 abstract String[] getGuidInfoFromSpd(String guidCName)
+ public abstract String getGuidInfoFromSpd(String guidCName)
throws PlatformPcdPreprocessException;
/**
@@ -188,7 +188,7 @@ public abstract class PlatformPcdPreprocessAction {
String moduleName = null;
String datum = null;
int maxDatumSize = 0;
- String[] tokenSpaceStrRet = null;
+ String tokenSpaceStrRet = null;
//
// ----------------------------------------------
@@ -239,7 +239,7 @@ public abstract class PlatformPcdPreprocessAction {
continue;
}
- primaryKey = Token.getPrimaryKeyString(pcdBuildData.getCName(), tokenSpaceStrRet[1]);
+ primaryKey = Token.getPrimaryKeyString(pcdBuildData.getCName(), tokenSpaceStrRet);
pcdType = Token.getPcdTypeFromString(pcdBuildData.getItemType().toString());
datumType = Token.getdatumTypeFromString(pcdBuildData.getDatumType().toString());
tokenNumber = Long.decode(pcdBuildData.getToken().toString());
@@ -408,7 +408,7 @@ public abstract class PlatformPcdPreprocessAction {
// If the token is not in database, create a new token instance and add
// a usage instance into this token in database.
//
- tokenSpaceStrRet = this.getGuidInfoFromSpd(pcdBuildData.getTokenSpaceGuidCName());
+ tokenSpaceStrRet = getGuidInfoFromSpd(pcdBuildData.getTokenSpaceGuidCName());
if (tokenSpaceStrRet == null) {
putError("Fail to get Token space guid for token" + token.cName +
@@ -420,7 +420,7 @@ public abstract class PlatformPcdPreprocessAction {
continue;
}
- token = new Token(pcdBuildData.getCName(), tokenSpaceStrRet[1]);
+ token = new Token(pcdBuildData.getCName(), tokenSpaceStrRet);
token.datumType = datumType;
token.tokenNumber = tokenNumber;
@@ -512,7 +512,7 @@ public abstract class PlatformPcdPreprocessAction {
boolean hasSkuId0 = false;
long tokenNumber = 0;
String hiiDefaultValue = null;
- String[] variableGuidString = null;
+ String variableGuidString = null;
List<DynamicPcdBuildDefinitions.PcdBuildData.SkuInfo> skuInfoList = null;
DynamicPcdBuildDefinitions.PcdBuildData dynamicInfo = null;
@@ -687,7 +687,7 @@ public abstract class PlatformPcdPreprocessAction {
}
skuInstance.value.setHiiData(varNameList,
- translateSchemaStringToUUID(variableGuidString[1]),
+ translateSchemaStringToUUID(variableGuidString),
skuInfoList.get(index).getVariableOffset(),
skuInfoList.get(index).getHiiDefaultValue().toString());
token.skuData.add(skuInstance);
@@ -738,8 +738,8 @@ public abstract class PlatformPcdPreprocessAction {
String temp;
String exceptionString;
String hiiDefaultValue;
- String tokenSpaceStrRet[];
- String variableGuidString[];
+ String tokenSpaceStrRet;
+ String variableGuidString;
dynamicPcdBuildDataArray = getAllDynamicPcdInfoFromFpd();
if (dynamicPcdBuildDataArray == null) {
@@ -748,7 +748,7 @@ public abstract class PlatformPcdPreprocessAction {
for (index2 = 0; index2 < dynamicPcdBuildDataArray.size(); index2++) {
pcdBuildData = dynamicPcdBuildDataArray.get(index2);
- tokenSpaceStrRet = this.getGuidInfoFromSpd(pcdBuildData.getTokenSpaceGuidCName());
+ tokenSpaceStrRet = getGuidInfoFromSpd(pcdBuildData.getTokenSpaceGuidCName());
if (tokenSpaceStrRet == null) {
putError("Fail to get Token space guid for token" + pcdBuildData.getCName());
@@ -756,7 +756,7 @@ public abstract class PlatformPcdPreprocessAction {
}
primaryKey = Token.getPrimaryKeyString(pcdBuildData.getCName(),
- tokenSpaceStrRet[1]);
+ tokenSpaceStrRet);
if (pcdDbManager.isTokenInDatabase(primaryKey)) {
continue;
@@ -772,7 +772,7 @@ public abstract class PlatformPcdPreprocessAction {
//
// Create new token for unreference dynamic PCD token
//
- token = new Token(pcdBuildData.getCName(), tokenSpaceStrRet[1]);
+ token = new Token(pcdBuildData.getCName(), tokenSpaceStrRet);
token.datumSize = pcdBuildData.getMaxDatumSize();
@@ -886,7 +886,7 @@ public abstract class PlatformPcdPreprocessAction {
//
// Get variable guid string according to the name of guid which will be mapped into a GUID in SPD file.
//
- variableGuidString = this.getGuidInfoFromSpd(skuInfoList.get(index).getVariableGuid().toString());
+ variableGuidString = getGuidInfoFromSpd(skuInfoList.get(index).getVariableGuid().toString());
if (variableGuidString == null) {
exceptionString = String.format("In FPD file, for dynamic PCD %s, the variable guid %s can be found in all SPD file!",
token.cName,
@@ -904,7 +904,7 @@ public abstract class PlatformPcdPreprocessAction {
}
skuInstance.value.setHiiData(varNameList,
- translateSchemaStringToUUID(variableGuidString[1]),
+ translateSchemaStringToUUID(variableGuidString),
skuInfoList.get(index).getVariableOffset(),
skuInfoList.get(index).getHiiDefaultValue().toString());
token.skuData.add(skuInstance);