EFI_SECTION_USER_INTERFACE, EFI_SECTION_VERSION,\n\\r
EFI_SECTION_FIRMWARE_VOLUME_IMAGE, EFI_SECTION_RAW,\n\\r
EFI_SECTION_FREEFORM_SUBTYPE_GUID,\n\\r
- EFI_SECTION_PEI_DEPEX. if -s option is not given, \n\\r
+ EFI_SECTION_PEI_DEPEX, EFI_SECTION_SMM_DEPEX.\n\\r
+ if -s option is not given, \n\\r
EFI_SECTION_ALL is default section type.\n");\r
fprintf (stdout, " -c [Type], --compress [Type]\n\\r
Compress method type can be PI_NONE or PI_STD.\n\\r
fseek (InFile, 0, SEEK_END);\r
InputFileLength = ftell (InFile);\r
fseek (InFile, 0, SEEK_SET);\r
- DebugMsg (NULL, 0, 9, "Input file", "File name is %s and File size is %d bytes", InputFileName[0], InputFileLength);\r
+ DebugMsg (NULL, 0, 9, "Input file", "File name is %s and File size is %u bytes", InputFileName[0], (unsigned) InputFileLength);\r
TotalLength = sizeof (EFI_COMMON_SECTION_HEADER) + InputFileLength;\r
//\r
// Size must fit in 3 bytes\r
//\r
if (TotalLength >= MAX_SECTION_SIZE) {\r
- Error (NULL, 0, 2000, "Invalid paramter", "%s file size (0x%X) exceeds section size limit(%dM).", InputFileName[0], TotalLength, MAX_SECTION_SIZE>>20);\r
+ Error (NULL, 0, 2000, "Invalid paramter", "%s file size (0x%X) exceeds section size limit(%uM).", InputFileName[0], (unsigned) TotalLength, MAX_SECTION_SIZE>>20);\r
goto Done;\r
}\r
- VerboseMsg ("the size of the created section file is %d bytes", TotalLength);\r
+ VerboseMsg ("the size of the created section file is %u bytes", (unsigned) TotalLength);\r
//\r
// Fill in the fields in the local section header structure\r
//\r
fseek (InFile, 0, SEEK_END);\r
FileSize = ftell (InFile);\r
fseek (InFile, 0, SEEK_SET);\r
- DebugMsg (NULL, 0, 9, "Input files", "the input file name is %s and the size is %d bytes", InputFileName[Index], FileSize); \r
+ DebugMsg (NULL, 0, 9, "Input files", "the input file name is %s and the size is %u bytes", InputFileName[Index], (unsigned) FileSize); \r
//\r
// Now read the contents of the file into the buffer\r
// Buffer must be enough to contain the file content.\r
}\r
\r
DebugMsg (NULL, 0, 9, "comprss file size", \r
- "the original section size is %d bytes and the compressed section size is %d bytes", InputLength, CompressedLength);\r
+ "the original section size is %d bytes and the compressed section size is %u bytes", (unsigned) InputLength, (unsigned) CompressedLength);\r
TotalLength = CompressedLength + sizeof (EFI_COMPRESSION_SECTION);\r
if (TotalLength >= MAX_SECTION_SIZE) {\r
- Error (NULL, 0, 2000, "Invalid paramter", "The size of all files exceeds section size limit(%dM).", MAX_SECTION_SIZE>>20);\r
+ Error (NULL, 0, 2000, "Invalid paramter", "The size of all files exceeds section size limit(%uM).", MAX_SECTION_SIZE>>20);\r
if (FileBuffer != NULL) {\r
free (FileBuffer);\r
}\r
}\r
return STATUS_ERROR;\r
}\r
- VerboseMsg ("the size of the created section file is %d bytes", TotalLength);\r
+ VerboseMsg ("the size of the created section file is %u bytes", (unsigned) TotalLength);\r
\r
//\r
// Add the section header for the compressed data\r
\r
TotalLength = InputLength + sizeof (CRC32_SECTION_HEADER);\r
if (TotalLength >= MAX_SECTION_SIZE) {\r
- Error (NULL, 0, 2000, "Invalid paramter", "The size of all files exceeds section size limit(%dM).", MAX_SECTION_SIZE>>20);\r
+ Error (NULL, 0, 2000, "Invalid paramter", "The size of all files exceeds section size limit(%uM).", MAX_SECTION_SIZE>>20);\r
free (FileBuffer);\r
return STATUS_ERROR;\r
}\r
Crc32GuidSect->GuidSectionHeader.Attributes = EFI_GUIDED_SECTION_AUTH_STATUS_VALID;\r
Crc32GuidSect->GuidSectionHeader.DataOffset = sizeof (CRC32_SECTION_HEADER);\r
Crc32GuidSect->CRC32Checksum = Crc32Checksum;\r
- DebugMsg (NULL, 0, 9, "Guided section", "Data offset is %d", Crc32GuidSect->GuidSectionHeader.DataOffset);\r
+ DebugMsg (NULL, 0, 9, "Guided section", "Data offset is %u", Crc32GuidSect->GuidSectionHeader.DataOffset);\r
\r
} else {\r
TotalLength = InputLength + sizeof (EFI_GUID_DEFINED_SECTION);\r
if (TotalLength >= MAX_SECTION_SIZE) {\r
- Error (NULL, 0, 2000, "Invalid paramter", "The size of all files exceeds section size limit(%dM).", MAX_SECTION_SIZE>>20);\r
+ Error (NULL, 0, 2000, "Invalid paramter", "The size of all files exceeds section size limit(%uM).", MAX_SECTION_SIZE>>20);\r
free (FileBuffer);\r
return STATUS_ERROR;\r
}\r
VendorGuidSect->CommonHeader.Size[2] = (UINT8) ((TotalLength & 0xff0000) >> 16);\r
memcpy (&(VendorGuidSect->SectionDefinitionGuid), VendorGuid, sizeof (EFI_GUID));\r
VendorGuidSect->Attributes = DataAttribute;\r
- VendorGuidSect->DataOffset = sizeof (EFI_GUID_DEFINED_SECTION) + DataHeaderSize;\r
- DebugMsg (NULL, 0, 9, "Guided section", "Data offset is %d", VendorGuidSect->DataOffset);\r
+ VendorGuidSect->DataOffset = (UINT16) (sizeof (EFI_GUID_DEFINED_SECTION) + DataHeaderSize);\r
+ DebugMsg (NULL, 0, 9, "Guided section", "Data offset is %u", VendorGuidSect->DataOffset);\r
}\r
- VerboseMsg ("the size of the created section file is %d bytes", TotalLength);\r
+ VerboseMsg ("the size of the created section file is %u bytes", (unsigned) TotalLength);\r
\r
//\r
// Set OutFileBuffer \r
CHAR8 *CompressionName;\r
CHAR8 *StringBuffer;\r
EFI_GUID VendorGuid = mZeroGuid;\r
- INT32 VersionNumber;\r
+ int VersionNumber;\r
UINT8 SectType;\r
UINT8 SectCompSubType;\r
UINT16 SectGuidAttribute; \r
goto Finish;\r
}\r
if (LogLevel > 9) {\r
- Error (NULL, 0, 1003, "Invalid option value", "Debug Level range is 0~9, currnt input level is %d", LogLevel);\r
+ Error (NULL, 0, 1003, "Invalid option value", "Debug Level range is 0~9, currnt input level is %d", (int) LogLevel);\r
goto Finish;\r
}\r
SetPrintLevel (LogLevel);\r
SectGuidAttribute = 0;\r
}\r
VerboseMsg ("Vendor Guid is %08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", \r
- VendorGuid.Data1,\r
+ (unsigned) VendorGuid.Data1,\r
VendorGuid.Data2,\r
VendorGuid.Data3,\r
VendorGuid.Data4[0],\r
VerboseMsg ("Guid Attribute is %s", mGUIDedSectionAttribue[EFI_GUIDED_SECTION_AUTH_STATUS_VALID]);\r
}\r
if (SectGuidHeaderLength != 0) {\r
- VerboseMsg ("Guid Data Header size is 0x%x", SectGuidHeaderLength);\r
+ VerboseMsg ("Guid Data Header size is 0x%llx", (unsigned long long) SectGuidHeaderLength);\r
}\r
} else if (stricmp (SectionName, mSectionTypeName[EFI_SECTION_PE32]) == 0) {\r
SectType = EFI_SECTION_PE32;\r
SectType = EFI_SECTION_TE;\r
} else if (stricmp (SectionName, mSectionTypeName[EFI_SECTION_DXE_DEPEX]) == 0) {\r
SectType = EFI_SECTION_DXE_DEPEX;\r
+ } else if (stricmp (SectionName, mSectionTypeName[EFI_SECTION_SMM_DEPEX]) == 0) {\r
+ SectType = EFI_SECTION_SMM_DEPEX;\r
} else if (stricmp (SectionName, mSectionTypeName[EFI_SECTION_VERSION]) == 0) {\r
SectType = EFI_SECTION_VERSION;\r
if (VersionNumber < 0 || VersionNumber > 9999) {\r
// Check whether there is output file\r
//\r
for (Index = 0; Index < InputFileNum; Index ++) {\r
- VerboseMsg ("the %dth input file name is %s", Index, InputFileName[Index]);\r
+ VerboseMsg ("the %uth input file name is %s", (unsigned) Index, InputFileName[Index]);\r
}\r
if (OutputFileName == NULL) {\r
Error (NULL, 0, 1001, "Missing options", "Output file");\r
VersionSect->CommonHeader.Size[2] = (UINT8) ((Index & 0xff0000) >> 16);\r
VersionSect->BuildNumber = (UINT16) VersionNumber;\r
Ascii2UnicodeString (StringBuffer, VersionSect->VersionString);\r
- VerboseMsg ("the size of the created section file is %d bytes", Index);\r
+ VerboseMsg ("the size of the created section file is %u bytes", (unsigned) Index);\r
break;\r
\r
case EFI_SECTION_USER_INTERFACE:\r
UiSect->CommonHeader.Size[1] = (UINT8) ((Index & 0xff00) >> 8);\r
UiSect->CommonHeader.Size[2] = (UINT8) ((Index & 0xff0000) >> 16);\r
Ascii2UnicodeString (StringBuffer, UiSect->FileNameString);\r
- VerboseMsg ("the size of the created section file is %d bytes", Index);\r
+ VerboseMsg ("the size of the created section file is %u bytes", (unsigned) Index);\r
break;\r
\r
case EFI_SECTION_ALL:\r
&InputLength\r
);\r
}\r
- VerboseMsg ("the size of the created section file is %d bytes", InputLength);\r
+ VerboseMsg ("the size of the created section file is %u bytes", (unsigned) InputLength);\r
break;\r
default:\r
//\r
}\r
\r
if (Status != EFI_SUCCESS || OutFileBuffer == NULL) {\r
- Error (NULL, 0, 2000, "Status is not successful", "Status value is 0x%X", (UINTN) Status);\r
+ Error (NULL, 0, 2000, "Status is not successful", "Status value is 0x%X", (int) Status);\r
goto Finish;\r
}\r
\r