BaseTools: Clean up source files

1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
Liming Gao
2018-07-05 17:40:04 +08:00
parent 39456d00f3
commit f7496d7173
289 changed files with 10647 additions and 10647 deletions

View File

@@ -1,7 +1,7 @@
/** @file
Converts a pe32+ image to an FW, Te image type, or other specific image.
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -169,7 +169,7 @@ Returns:
//
// Copyright declaration
//
fprintf (stdout, "Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.\n\n");
fprintf (stdout, "Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\n\n");
//
// Details Option
@@ -242,7 +242,7 @@ Returns:
If it is combined with other action options, the later\n\
input action option will override the previous one.\n");
fprintf (stdout, " -a NUM, --align NUM NUM is one HEX or DEC format alignment value.\n\
This option is only used together with -j option.\n");
This option is only used together with -j option.\n");
fprintf (stdout, " -p NUM, --pad NUM NUM is one HEX or DEC format padding value.\n\
This option is only used together with -j option.\n");
fprintf (stdout, " --keepexceptiontable Don't clear exception table.\n\
@@ -490,7 +490,7 @@ SetHiiResourceHeader (
}
//
// Now it ought to be resource Data and update its OffsetToData value
// Now it ought to be resource Data and update its OffsetToData value
//
if (!ResourceDirectoryEntry->u2.s.DataIsDirectory) {
ResourceDataEntry = (EFI_IMAGE_RESOURCE_DATA_ENTRY *) (HiiBinData + ResourceDirectoryEntry->u2.OffsetToData);
@@ -501,7 +501,7 @@ SetHiiResourceHeader (
}
ResourceDirectoryEntry++;
}
return;
}
@@ -530,7 +530,7 @@ GetPeCoffHeader (
return NULL;
}
}
return PeHdr;
}
@@ -555,7 +555,7 @@ PeCoffConvertImageToXip (
if (PeHdr == NULL) {
return;
}
if (PeHdr->Pe32.OptionalHeader.SectionAlignment != PeHdr->Pe32.OptionalHeader.FileAlignment) {
//
// The only reason to expand zero fill sections is to make them compatible with XIP images.
@@ -672,7 +672,7 @@ PeCoffConvertImageToXip (
UINT8 *
CreateHiiResouceSectionHeader (
UINT32 *pSectionHeaderSize,
UINT32 *pSectionHeaderSize,
UINT32 HiiDataSize
)
/*++
@@ -705,8 +705,8 @@ Returns:
// Calculate the total size for the resource header (include Type, Name and Language)
// then allocate memory for the resource header.
//
HiiSectionHeaderSize = 3 * (sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY))
+ 3 * (sizeof (UINT16) + 3 * sizeof (CHAR16))
HiiSectionHeaderSize = 3 * (sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY))
+ 3 * (sizeof (UINT16) + 3 * sizeof (CHAR16))
+ sizeof (EFI_IMAGE_RESOURCE_DATA_ENTRY);
HiiSectionHeader = malloc (HiiSectionHeaderSize);
if (HiiSectionHeader == NULL) {
@@ -717,7 +717,7 @@ Returns:
HiiSectionOffset = 0;
//
// Create Type entry
// Create Type entry
//
ResourceDirectory = (EFI_IMAGE_RESOURCE_DIRECTORY *) (HiiSectionHeader + HiiSectionOffset);
HiiSectionOffset += sizeof (EFI_IMAGE_RESOURCE_DIRECTORY);
@@ -877,7 +877,7 @@ Returns:
if (ImageContext.RelocationsStripped) {
Error (NULL, 0, 3000, "Invalid", "The input PeImage %s has no relocation to be fixed up", FileName);
return Status;
return Status;
}
//
@@ -890,8 +890,8 @@ Returns:
//
SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (
(UINTN) ImgHdr +
sizeof (UINT32) +
sizeof (EFI_IMAGE_FILE_HEADER) +
sizeof (UINT32) +
sizeof (EFI_IMAGE_FILE_HEADER) +
ImgHdr->Pe32.FileHeader.SizeOfOptionalHeader
);
@@ -957,7 +957,7 @@ Returns:
if (ImageContext.RelocationsStripped) {
Error (NULL, 0, 3000, "Invalid", "The input PeImage %s has no relocation to be fixed up", FileName);
return Status;
return Status;
}
//
@@ -996,15 +996,15 @@ Returns:
//
SectionHeader = (EFI_IMAGE_SECTION_HEADER *) (
(UINTN) ImgHdr +
sizeof (UINT32) +
sizeof (EFI_IMAGE_FILE_HEADER) +
sizeof (UINT32) +
sizeof (EFI_IMAGE_FILE_HEADER) +
ImgHdr->Pe32.FileHeader.SizeOfOptionalHeader
);
for (Index = 0; Index < ImgHdr->Pe32.FileHeader.NumberOfSections; Index ++, SectionHeader ++) {
CopyMem (
FileBuffer + SectionHeader->PointerToRawData,
(VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),
FileBuffer + SectionHeader->PointerToRawData,
(VOID*) (UINTN) (ImageContext.ImageAddress + SectionHeader->VirtualAddress),
SectionHeader->SizeOfRawData
);
}
@@ -2186,7 +2186,7 @@ Returns:
goto Finish;
}
}
if (NegativeAddr) {
//
// Set Base Address to a negative value.
@@ -2534,7 +2534,7 @@ Returns:
(TEImageHeader.DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress == 0) && \
(TEImageHeader.DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC].Size == 0)) {
//
// PeImage can be loaded into memory, but it has no relocation section.
// PeImage can be loaded into memory, but it has no relocation section.
// Fix TeImage Header to set VA of relocation data directory to not zero, the size is still zero.
//
if (Optional32 != NULL) {
@@ -2716,7 +2716,7 @@ Finish:
}
}
}
if (InputFileBuffer != NULL) {
free (InputFileBuffer);
}
@@ -2735,7 +2735,7 @@ Finish:
ReportFileName = (CHAR8 *) malloc (FileLen + 1);
if (ReportFileName != NULL) {
strcpy (ReportFileName, OutImageName);
strcpy (ReportFileName + (FileLen - 4), ".txt");
strcpy (ReportFileName + (FileLen - 4), ".txt");
ReportFile = fopen (LongFilePath (ReportFileName), "w+");
if (ReportFile != NULL) {
fprintf (ReportFile, "MODULE_SIZE = %u\n", (unsigned) mImageSize);
@@ -2789,7 +2789,7 @@ Returns:
EFI_IMAGE_SECTION_HEADER *SectionHeader;
EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *DebugEntry;
EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY *RsdsEntry;
UINT32 *NewTimeStamp;
UINT32 *NewTimeStamp;
//
// Init variable.
@@ -2968,7 +2968,7 @@ Returns:
EFI_IMAGE_OPTIONAL_HEADER64 *Optional64Hdr;
EFI_IMAGE_SECTION_HEADER *SectionHeader;
UINT32 *NewTimeStamp;
//
// Init variable.
//