Creates output file that is a properly formed section per the PI spec.\r
\r
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
#ifndef __GNUC__\r
//\r
Buffer = (UINT8 *) malloc ((size_t) TotalLength);\r
if (Buffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Done;\r
}\r
CommonSect = (EFI_COMMON_SECTION_HEADER *) Buffer;\r
if (Status == EFI_BUFFER_TOO_SMALL) {\r
FileBuffer = (UINT8 *) malloc (InputLength);\r
if (FileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
return EFI_OUT_OF_RESOURCES;\r
}\r
//\r
\r
FileBuffer = (UINT8 *) malloc (InputLength + Offset);\r
if (FileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
return EFI_OUT_OF_RESOURCES;\r
}\r
//\r
// InputLength != 0, but FileBuffer == NULL means out of resources.\r
//\r
if (FileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\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", (int) LogLevel);\r
+ Error (NULL, 0, 1003, "Invalid option value", "Debug Level range is 0~9, current input level is %d", (int) LogLevel);\r
goto Finish;\r
}\r
SetPrintLevel (LogLevel);\r
if ((InputFileNum == 0) && (InputFileName == NULL)) {\r
InputFileName = (CHAR8 **) malloc (MAXIMUM_INPUT_FILE_NUM * sizeof (CHAR8 *));\r
if (InputFileName == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
memset (InputFileName, 0, (MAXIMUM_INPUT_FILE_NUM * sizeof (CHAR8 *)));\r
);\r
\r
if (InputFileName == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
memset (&(InputFileName[InputFileNum]), 0, (MAXIMUM_INPUT_FILE_NUM * sizeof (CHAR8 *)));\r
DummyFileBuffer = (UINT8 *) malloc (DummyFileSize);\r
if (DummyFileBuffer == NULL) {\r
fclose(DummyFile);\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
\r
DebugMsg (NULL, 0, 9, "Dummy files", "the dummy file name is %s and the size is %u bytes", DummyFileName, (unsigned) DummyFileSize);\r
\r
if (InputFileName == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
InFile = fopen(LongFilePath(InputFileName[0]), "rb");\r
InFileBuffer = (UINT8 *) malloc (InFileSize);\r
if (InFileBuffer == NULL) {\r
fclose(InFile);\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
\r
Index += (strlen (StringBuffer) * 2) + 2;\r
OutFileBuffer = (UINT8 *) malloc (Index);\r
if (OutFileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
VersionSect = (EFI_VERSION_SECTION *) OutFileBuffer;\r
Index += (strlen (StringBuffer) * 2) + 2;\r
OutFileBuffer = (UINT8 *) malloc (Index);\r
if (OutFileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
UiSect = (EFI_USER_INTERFACE_SECTION *) OutFileBuffer;\r
if (Status == EFI_BUFFER_TOO_SMALL) {\r
OutFileBuffer = (UINT8 *) malloc (InputLength);\r
if (OutFileBuffer == NULL) {\r
- Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated");\r
+ Error (NULL, 0, 4001, "Resource", "memory cannot be allocated");\r
goto Finish;\r
}\r
//\r