Sync BaseTools Branch (version r2157) to EDKII main trunk.
BaseTool Branch: https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/branches/Releases/BaseTools_r2100 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11702 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -119,27 +119,36 @@ Returns:
|
|||||||
|
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
CHAR8 StrPtr[40];
|
CHAR8 TemStr[5] = "0000";
|
||||||
CHAR8 *Token;
|
|
||||||
unsigned Major;
|
unsigned Major;
|
||||||
unsigned Minor;
|
unsigned Minor;
|
||||||
|
UINTN Length;
|
||||||
|
|
||||||
Major = 0;
|
Major = 0;
|
||||||
Minor = 0;
|
Minor = 0;
|
||||||
memset (StrPtr, 0, 40);
|
|
||||||
Token = strtok (Str, ".");
|
|
||||||
|
|
||||||
while (Token != NULL) {
|
|
||||||
strcat (StrPtr, Token);
|
|
||||||
Token = strtok (NULL, ".");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (strstr (Str, ".") != NULL) {
|
||||||
sscanf (
|
sscanf (
|
||||||
StrPtr,
|
Str,
|
||||||
"%02d%02d",
|
"%02x.%02x",
|
||||||
&Major,
|
&Major,
|
||||||
&Minor
|
&Minor
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
Length = strlen(Str);
|
||||||
|
if (Length < 4) {
|
||||||
|
strncpy (TemStr + 4 - Length, Str, Length);
|
||||||
|
} else {
|
||||||
|
strncpy (TemStr, Str + Length - 4, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
sscanf (
|
||||||
|
TemStr,
|
||||||
|
"%02x%02x",
|
||||||
|
&Major,
|
||||||
|
&Minor
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
*MajorVer = (UINT8) Major;
|
*MajorVer = (UINT8) Major;
|
||||||
*MinorVer = (UINT8) Minor;
|
*MinorVer = (UINT8) Minor;
|
||||||
|
@ -3630,7 +3630,7 @@ class FdfParser:
|
|||||||
if not self.__GetNextToken():
|
if not self.__GetNextToken():
|
||||||
raise Warning("expected Component version", self.FileName, self.CurrentLineNumber)
|
raise Warning("expected Component version", self.FileName, self.CurrentLineNumber)
|
||||||
|
|
||||||
Pattern = re.compile('-$|[0-9]{0,1}[0-9]{1}\.[0-9]{0,1}[0-9]{1}')
|
Pattern = re.compile('-$|[0-9a-fA-F]{1,2}\.[0-9a-fA-F]{1,2}$', re.DOTALL)
|
||||||
if Pattern.match(self.__Token) == None:
|
if Pattern.match(self.__Token) == None:
|
||||||
raise Warning("Unknown version format '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
|
raise Warning("Unknown version format '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
|
||||||
CompStatementObj.CompVer = self.__Token
|
CompStatementObj.CompVer = self.__Token
|
||||||
|
Reference in New Issue
Block a user