mirror of https://github.com/acidanthera/audk.git
Provide default value for PCD in platform if user does not specify anything for it.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1956 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e799f87fe6
commit
adf6ff605f
|
@ -1345,7 +1345,7 @@ public class FpdFileContents {
|
|||
fpdPcd.setDatumType(PcdDataTypes.Enum.forString(dataType));
|
||||
fpdPcd.setItemType(PcdItemTypes.Enum.forString(itemType));
|
||||
|
||||
if (defaultVal != null){
|
||||
if (defaultVal != null && defaultVal.length() > 0){
|
||||
fpdPcd.setValue(defaultVal);
|
||||
}
|
||||
else {
|
||||
|
@ -1356,7 +1356,7 @@ public class FpdFileContents {
|
|||
fpdPcd.setValue("FALSE");
|
||||
}
|
||||
if (dataType.equals("VOID*")) {
|
||||
fpdPcd.setValue("");
|
||||
fpdPcd.setValue("L\"\"");
|
||||
}
|
||||
}
|
||||
//
|
||||
|
|
|
@ -856,6 +856,7 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||
Vector<String> vExceptions = new Vector<String>();
|
||||
if (pcdSync(vExceptions)) {
|
||||
JOptionPane.showMessageDialog(frame, "PCD in this platform are synchronized with those in MSA files.");
|
||||
docConsole.setSaved(false);
|
||||
}
|
||||
if (vExceptions.size() > 0) {
|
||||
String errorMsg = "";
|
||||
|
|
|
@ -1786,8 +1786,21 @@ private JButton getJButtonUpdatePcd() {
|
|||
String cName = model.getValueAt(row, 0)+"";
|
||||
String tsGuid = model.getValueAt(row, 1)+"";
|
||||
String oldItemType = model.getValueAt(row, 2)+"";
|
||||
String dataType = model.getValueAt(row, 5)+"";
|
||||
String newItemType = jComboBoxItemType.getSelectedItem()+"";
|
||||
String newValue = jTextFieldPcdDefault.isVisible()? jTextFieldPcdDefault.getText():jComboBoxFeatureFlagValue.getSelectedItem()+"";
|
||||
if (newValue.length() == 0){
|
||||
|
||||
if (dataType.equals("UINT8") || dataType.equals("UINT16") || dataType.equals("UINT32") || dataType.equals("UINT64")) {
|
||||
newValue = "0";
|
||||
}
|
||||
if (dataType.equals("BOOLEAN")){
|
||||
newValue = "FALSE";
|
||||
}
|
||||
if (dataType.equals("VOID*")) {
|
||||
newValue = "L\"\"";
|
||||
}
|
||||
}
|
||||
|
||||
String[] pcdInfo = {"", "", ""};
|
||||
Vector<String> validPcdTypes = new Vector<String>();
|
||||
|
|
Loading…
Reference in New Issue