SecurityPkg: 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>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Helper functions for SecureBoot configuration module.
|
||||
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 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
|
||||
@@ -15,15 +15,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include "SecureBootConfigImpl.h"
|
||||
|
||||
/**
|
||||
Read file content into BufferPtr, the size of the allocate buffer
|
||||
Read file content into BufferPtr, the size of the allocate buffer
|
||||
is *FileSize plus AddtionAllocateSize.
|
||||
|
||||
@param[in] FileHandle The file to be read.
|
||||
@param[in, out] BufferPtr Pointers to the pointer of allocated buffer.
|
||||
@param[out] FileSize Size of input file
|
||||
@param[in] AddtionAllocateSize Addtion size the buffer need to be allocated.
|
||||
@param[in] AddtionAllocateSize Addtion size the buffer need to be allocated.
|
||||
In case the buffer need to contain others besides the file content.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The file was read into the buffer.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@@ -62,7 +62,7 @@ ReadFileContent (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
|
||||
Status = FileHandle->SetPosition (FileHandle, 0);
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_EXIT;
|
||||
@@ -86,7 +86,7 @@ ReadFileContent (
|
||||
}
|
||||
|
||||
ON_EXIT:
|
||||
|
||||
|
||||
*BufferPtr = Buffer;
|
||||
return Status;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ ON_EXIT:
|
||||
Close an open file handle.
|
||||
|
||||
@param[in] FileHandle The file handle to close.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
CloseFile (
|
||||
@@ -103,7 +103,7 @@ CloseFile (
|
||||
)
|
||||
{
|
||||
if (FileHandle != NULL) {
|
||||
FileHandle->Close (FileHandle);
|
||||
FileHandle->Close (FileHandle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ CloseFile (
|
||||
|
||||
@param[in] Integer Pointer to the nonnegative integer to be converted
|
||||
@param[in] IntSizeInWords Length of integer buffer in words
|
||||
@param[out] OctetString Converted octet string of the specified length
|
||||
@param[out] OctetString Converted octet string of the specified length
|
||||
@param[in] OSSizeInBytes Intended length of resulting octet string in bytes
|
||||
|
||||
Returns:
|
||||
@@ -138,17 +138,17 @@ Int2OctStr (
|
||||
Ptr1++, Ptr2--) {
|
||||
*Ptr2 = *Ptr1;
|
||||
}
|
||||
|
||||
|
||||
for (; Ptr1 < (CONST UINT8 *)(Integer + IntSizeInWords) && *Ptr1 == 0; Ptr1++);
|
||||
|
||||
|
||||
if (Ptr1 < (CONST UINT8 *)(Integer + IntSizeInWords)) {
|
||||
return EFI_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
|
||||
if (Ptr2 >= OctetString) {
|
||||
ZeroMem (OctetString, Ptr2 - OctetString + 1);
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ Int2OctStr (
|
||||
@param[in] Guid Pointer to GUID to print.
|
||||
@param[in] Buffer Buffer to print Guid into.
|
||||
@param[in] BufferSize Size of Buffer.
|
||||
|
||||
|
||||
@retval Number of characters printed.
|
||||
|
||||
**/
|
||||
@@ -173,9 +173,9 @@ GuidToString (
|
||||
|
||||
Size = UnicodeSPrint (
|
||||
Buffer,
|
||||
BufferSize,
|
||||
BufferSize,
|
||||
L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
(UINTN)Guid->Data1,
|
||||
(UINTN)Guid->Data1,
|
||||
(UINTN)Guid->Data2,
|
||||
(UINTN)Guid->Data3,
|
||||
(UINTN)Guid->Data4[0],
|
||||
|
Reference in New Issue
Block a user