|
From: <xf...@us...> - 2012-05-28 02:56:20
|
Revision: 2527
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2527&view=rev
Author: xfzyr
Date: 2012-05-28 02:56:13 +0000 (Mon, 28 May 2012)
Log Message:
-----------
Corrected the error message when encounterd invalid PCD type and ReadMe file.
Signed-off-by: Yurui Zeng <yur...@in...>
Reviewed-by: Jikui, Su <jik...@in...>
Modified Paths:
--------------
trunk/BaseTools/ReadMe.txt
trunk/BaseTools/Source/Python/Common/DataType.py
trunk/BaseTools/Source/Python/Common/Misc.py
Modified: trunk/BaseTools/ReadMe.txt
===================================================================
--- trunk/BaseTools/ReadMe.txt 2012-05-28 02:36:13 UTC (rev 2526)
+++ trunk/BaseTools/ReadMe.txt 2012-05-28 02:56:13 UTC (rev 2527)
@@ -33,7 +33,7 @@
On Ubuntu, the following command should install all the necessary build
packages to build all the C BaseTools:
- sudo apt-get install build-essentials uuid-dev
+ sudo apt-get install build-essential uuid-dev
=== Python sqlite3 module ===
On Windows, the cx_freeze will not copy the sqlite3.dll to the frozen
Modified: trunk/BaseTools/Source/Python/Common/DataType.py
===================================================================
--- trunk/BaseTools/Source/Python/Common/DataType.py 2012-05-28 02:36:13 UTC (rev 2526)
+++ trunk/BaseTools/Source/Python/Common/DataType.py 2012-05-28 02:56:13 UTC (rev 2527)
@@ -18,6 +18,7 @@
TAB_COMMENT_EDK_END = '*/'
TAB_COMMENT_EDK_SPLIT = '//'
TAB_COMMENT_SPLIT = '#'
+TAB_SPECIAL_COMMENT = '##'
TAB_EQUAL_SPLIT = '='
TAB_VALUE_SPLIT = '|'
TAB_COMMA_SPLIT = ','
@@ -30,6 +31,10 @@
TAB_SLASH = '\\'
TAB_BACK_SLASH = '/'
TAB_LINE_BREAK = '\n'
+TAB_UINT8 = 'UINT8'
+TAB_UINT16 = 'UINT16'
+TAB_UINT32 = 'UINT32'
+TAB_UINT64 = 'UINT64'
TAB_EDK_SOURCE = '$(EDK_SOURCE)'
TAB_EFI_SOURCE = '$(EFI_SOURCE)'
@@ -328,6 +333,25 @@
TAB_INF_PATCH_PCD = 'PatchPcd'
TAB_INF_PCD = 'Pcd'
TAB_INF_PCD_EX = 'PcdEx'
+TAB_INF_USAGE_PRO = 'PRODUCES'
+TAB_INF_USAGE_SOME_PRO = 'SOMETIMES_PRODUCES'
+TAB_INF_USAGE_CON = 'CONSUMES'
+TAB_INF_USAGE_SOME_CON = 'SOMETIMES_CONSUMES'
+TAB_INF_USAGE_NOTIFY = 'NOTIFY'
+TAB_INF_USAGE_TO_START = 'TO_START'
+TAB_INF_USAGE_BY_START = 'BY_START'
+TAB_INF_GUIDTYPE_EVENT = 'Event'
+TAB_INF_GUIDTYPE_FILE = 'File'
+TAB_INF_GUIDTYPE_FV = 'FV'
+TAB_INF_GUIDTYPE_GUID = 'GUID'
+TAB_INF_GUIDTYPE_HII = 'HII'
+TAB_INF_GUIDTYPE_HOB = 'HOB'
+TAB_INF_GUIDTYPE_ST = 'SystemTable'
+TAB_INF_GUIDTYPE_TSG = 'TokenSpaceGuid'
+TAB_INF_GUIDTYPE_VAR = 'Variable'
+TAB_INF_GUIDTYPE_PROTOCOL = 'PROTOCOL'
+TAB_INF_GUIDTYPE_PPI = 'PPI'
+TAB_INF_GUIDTYPE_UNDEFINED = 'UNDEFINED'
#
# Dec Definitions
Modified: trunk/BaseTools/Source/Python/Common/Misc.py
===================================================================
--- trunk/BaseTools/Source/Python/Common/Misc.py 2012-05-28 02:36:13 UTC (rev 2526)
+++ trunk/BaseTools/Source/Python/Common/Misc.py 2012-05-28 02:56:13 UTC (rev 2527)
@@ -1278,13 +1278,14 @@
if Value not in ['TRUE', 'True', 'true', '0x1', '0x01', '1', 'FALSE', 'False', 'false', '0x0', '0x00', '0']:
return False, "Invalid value [%s] of type [%s]; must be one of TRUE, True, true, 0x1, 0x01, 1"\
", FALSE, False, false, 0x0, 0x00, 0" % (Value, Type)
- elif type(Value) == type(""):
+ elif Type in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64]:
try:
Value = long(Value, 0)
except:
return False, "Invalid value [%s] of type [%s];"\
- " must be a hexadecimal, decimal or octal in C language format."\
- % (Value, Type)
+ " must be a hexadecimal, decimal or octal in C language format." % (Value, Type)
+ else:
+ return False, "Invalid type [%s]; must be one of VOID*, BOOLEAN, UINT8, UINT16, UINT32, UINT64." % (Type)
return True, ""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|