CHAR8 *Value;\r
UINT8 *Buffer;\r
CHAR8 *End;\r
- UINT8 Byte;\r
\r
Index = LookupPcdIndex (SkuName, DefaultValueName, TokenSpaceGuidName, TokenName);\r
if (Index < 0) {\r
break;\r
case PcdDataTypePointer:\r
Value = &PcdList[Index].Value[1];\r
- printf ("Value = %s\n", PcdList[Index].Value);\r
- for (*Size = 0, Byte = (UINT8) strtoul(Value, &End, 16); Value != End; Byte = (UINT8) strtoul(Value, &End, 16), *Size = *Size + 1) {\r
- printf("%x\n", Byte);\r
+ for (*Size = 0, strtoul(Value, &End, 16); Value != End; strtoul(Value, &End, 16), *Size = *Size + 1) {\r
Value = End + 1;\r
}\r
- Buffer = malloc(*Size);\r
+ Buffer = malloc(*Size + 1);\r
if (Buffer == NULL) {\r
*Size = 0;\r
return NULL;\r
PcdList[Index].Value = malloc(Size * 5 + 3);\r
PcdList[Index].Value[0] = '{';\r
for (ValueIndex = 0; ValueIndex < Size; ValueIndex++) {\r
- printf("Value[%d] = %02x\n", ValueIndex, Value[ValueIndex]);\r
sprintf(&PcdList[Index].Value[1 + ValueIndex * 5], "0x%02x,", Value[ValueIndex]);\r
}\r
PcdList[Index].Value[1 + Size * 5 - 1] = '}';\r
}\r
\r
//\r
- // Check Input paramters\r
+ // Check Input parameters\r
//\r
if (*InputFileName == NULL) {\r
fprintf (stderr, "Missing option. Input files is not specified\n");\r
exit (EXIT_FAILURE);\r
- } else {\r
- printf ("Input file name is %s\n", *InputFileName);\r
}\r
\r
if (*OutputFileName == NULL) {\r
fprintf (stderr, "Missing option. Output file is not specified\n");\r
exit (EXIT_FAILURE);\r
- } else {\r
- printf ("Output file name is %s\n", *OutputFileName);\r
}\r
}\r
\r
UINT8 *FileBuffer;\r
UINT32 FileSize;\r
\r
- printf ("PCD tool start.\n");\r
InputFileName = NULL;\r
OutputFileName = NULL;\r
\r
//\r
WriteOutputFile (OutputFileName);\r
\r
- printf ("PCD tool done.\n");\r
-\r
exit (EXIT_SUCCESS);\r
}\r