mirror of https://github.com/acidanthera/audk.git
After change token space guid from guid value to Guid's CName, change code to support that.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@707 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
f072578654
commit
548ce97a81
|
@ -769,12 +769,17 @@ public class GlobalData {
|
|||
Set set = spdTable.keySet();
|
||||
Iterator iter = set.iterator();
|
||||
|
||||
if (iter == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
while (iter.hasNext()){
|
||||
Spd spd = (Spd) spdTable.get(iter.next());
|
||||
guid = spd.getGuidFromCname(cName);
|
||||
if (guid != null){
|
||||
cNameGuid[0] = new String(cName);
|
||||
cNameGuid[1] = new String(guid);
|
||||
cNameGuid = new String[2];
|
||||
cNameGuid[0] = cName;
|
||||
cNameGuid[1] = guid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2081,7 +2081,7 @@ public class CollectPCDAction {
|
|||
String moduleName = null;
|
||||
String datum = null;
|
||||
int maxDatumSize = 0;
|
||||
String tokenSpaceGuidString = null;
|
||||
String[] tokenSpaceStrRet = null;
|
||||
|
||||
//
|
||||
// ----------------------------------------------
|
||||
|
@ -2145,11 +2145,20 @@ public class CollectPCDAction {
|
|||
// ----------------------------------------------------------------------
|
||||
//
|
||||
for (pcdIndex = 0; pcdIndex < pcdBuildDataArray.size(); pcdIndex ++) {
|
||||
//tokenSpaceGuidString = GlobalData.getGuidInfoFromCname(pcdBuildData.getTokenSpaceGuidCName())[1];
|
||||
tokenSpaceGuidString = null;
|
||||
pcdBuildData = pcdBuildDataArray.get(pcdIndex);
|
||||
|
||||
try {
|
||||
tokenSpaceStrRet = GlobalData.getGuidInfoFromCname(pcdBuildData.getTokenSpaceGuidCName());
|
||||
} catch ( Exception e ) {
|
||||
throw new EntityException ("Faile get Guid for token " + pcdBuildData.getCName() + ":" + e.getMessage());
|
||||
}
|
||||
|
||||
if (tokenSpaceStrRet == null) {
|
||||
throw new EntityException ("Fail to get Token space guid for token" + pcdBuildData.getCName());
|
||||
}
|
||||
|
||||
primaryKey = Token.getPrimaryKeyString(pcdBuildData.getCName(),
|
||||
translateSchemaStringToUUID(tokenSpaceGuidString));
|
||||
translateSchemaStringToUUID(tokenSpaceStrRet[1]));
|
||||
pcdType = Token.getpcdTypeFromString(pcdBuildData.getItemType().toString());
|
||||
datumType = Token.getdatumTypeFromString(pcdBuildData.getDatumType().toString());
|
||||
tokenNumber = Long.decode(pcdBuildData.getToken().toString());
|
||||
|
@ -2278,10 +2287,18 @@ public class CollectPCDAction {
|
|||
// If the token is not in database, create a new token instance and add
|
||||
// a usage instance into this token in database.
|
||||
//
|
||||
//String tokenSpaceString = GlobalData.getGuidInfoFromCname(pcdBuildData.getTokenSpaceGuidCName())[1];
|
||||
String tokenSpaceString = null;
|
||||
try {
|
||||
tokenSpaceStrRet = GlobalData.getGuidInfoFromCname(pcdBuildData.getTokenSpaceGuidCName());
|
||||
} catch (Exception e) {
|
||||
throw new EntityException("Fail to get token space guid for token " + token.cName);
|
||||
}
|
||||
|
||||
if (tokenSpaceStrRet == null) {
|
||||
throw new EntityException("Fail to get token space guid for token " + token.cName);
|
||||
}
|
||||
|
||||
token = new Token(pcdBuildData.getCName(),
|
||||
translateSchemaStringToUUID(tokenSpaceString));
|
||||
translateSchemaStringToUUID(tokenSpaceStrRet[1]));
|
||||
|
||||
token.datumType = datumType;
|
||||
token.tokenNumber = tokenNumber;
|
||||
|
@ -2674,6 +2691,7 @@ public class CollectPCDAction {
|
|||
String dynamicPrimaryKey = null;
|
||||
DynamicPcdBuildDefinitions dynamicPcdBuildDefinitions = null;
|
||||
List<DynamicPcdBuildDefinitions.PcdBuildData> dynamicPcdBuildDataArray = null;
|
||||
String[] tokenSpaceStrRet = null;
|
||||
|
||||
//
|
||||
// If FPD document is not be opened, open and initialize it.
|
||||
|
@ -2701,8 +2719,18 @@ public class CollectPCDAction {
|
|||
for (index = 0; index < dynamicPcdBuildDataArray.size(); index ++) {
|
||||
//String tokenSpaceGuidString = GlobalData.getGuidInfoFromCname(dynamicPcdBuildDataArray.get(index).getTokenSpaceGuidCName())[1];
|
||||
String tokenSpaceGuidString = null;
|
||||
try {
|
||||
tokenSpaceStrRet = GlobalData.getGuidInfoFromCname(dynamicPcdBuildDataArray.get(index).getTokenSpaceGuidCName());
|
||||
} catch (Exception e) {
|
||||
throw new EntityException ("Fail to get token space guid for token " + dynamicPcdBuildDataArray.get(index).getCName());
|
||||
}
|
||||
|
||||
if (tokenSpaceStrRet == null) {
|
||||
throw new EntityException ("Fail to get token space guid for token " + dynamicPcdBuildDataArray.get(index).getCName());
|
||||
}
|
||||
|
||||
dynamicPrimaryKey = Token.getPrimaryKeyString(dynamicPcdBuildDataArray.get(index).getCName(),
|
||||
translateSchemaStringToUUID(tokenSpaceGuidString));
|
||||
translateSchemaStringToUUID(tokenSpaceStrRet[1]));
|
||||
if (dynamicPrimaryKey.equalsIgnoreCase(token.getPrimaryKeyString())) {
|
||||
return dynamicPcdBuildDataArray.get(index);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue