]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/GenSec/GenSec.c
BaseTools: Fix typos in comments and variables
[mirror_edk2.git] / BaseTools / Source / C / GenSec / GenSec.c
index 63e8e13e8fc53da1e2146ff842859e6cc2e6d226..d2bf102bb9260c2fe8f282c173f4711f7a3d0384 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
+Creates output file that is a properly formed section per the PI spec.\r
 \r
-Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, 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
@@ -9,14 +10,6 @@ http://opensource.org/licenses/bsd-license.php
 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
 \r
-Module Name:\r
-\r
-  GenSection.c\r
-\r
-Abstract:\r
-\r
-  Creates output file that is a properly formed section per the PI spec.\r
-\r
 **/\r
 \r
 #include <stdio.h>\r
@@ -153,7 +146,7 @@ Returns:
   //\r
   // Copyright declaration\r
   // \r
-  fprintf (stdout, "Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.\n\n");\r
+  fprintf (stdout, "Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.\n\n");\r
 \r
   //\r
   // Details Option\r
@@ -274,16 +267,16 @@ Returns:
   STATUS                    Status;\r
 \r
   if (InputFileNum > 1) {\r
-    Error (NULL, 0, 2000, "Invalid paramter", "more than one input file specified");\r
+    Error (NULL, 0, 2000, "Invalid parameter", "more than one input file specified");\r
     return STATUS_ERROR;\r
   } else if (InputFileNum < 1) {\r
-    Error (NULL, 0, 2000, "Invalid paramter", "no input file specified");\r
+    Error (NULL, 0, 2000, "Invalid parameter", "no input file specified");\r
     return STATUS_ERROR;\r
   }\r
   //\r
   // Open the input file\r
   //\r
-  InFile = fopen (InputFileName[0], "rb");\r
+  InFile = fopen (LongFilePath (InputFileName[0]), "rb");\r
   if (InFile == NULL) {\r
     Error (NULL, 0, 0001, "Error opening file", InputFileName[0]);\r
     return STATUS_ERROR;\r
@@ -303,7 +296,7 @@ Returns:
   // 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(%uM).", InputFileName[0], (unsigned) TotalLength, MAX_SECTION_SIZE>>20);\r
+  //  Error (NULL, 0, 2000, "Invalid parameter", "%s file size (0x%X) exceeds section size limit(%uM).", InputFileName[0], (unsigned) TotalLength, MAX_SECTION_SIZE>>20);\r
   //  goto Done;\r
   //}\r
   HeaderLength = sizeof (EFI_COMMON_SECTION_HEADER);\r
@@ -443,12 +436,12 @@ Returns:
   UINT32                     HeaderSize;\r
 \r
   if (InputFileNum < 1) {\r
-    Error (NULL, 0, 2000, "Invalid paramter", "must specify at least one input file");\r
+    Error (NULL, 0, 2000, "Invalid parameter", "must specify at least one input file");\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
   if (BufferLength == NULL) {\r
-    Error (NULL, 0, 2000, "Invalid paramter", "BufferLength can't be NULL");\r
+    Error (NULL, 0, 2000, "Invalid parameter", "BufferLength can't be NULL");\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -473,7 +466,7 @@ Returns:
     // \r
     // Open file and read contents\r
     //\r
-    InFile = fopen (InputFileName[Index], "rb");\r
+    InFile = fopen (LongFilePath (InputFileName[Index]), "rb");\r
     if (InFile == NULL) {\r
       Error (NULL, 0, 0001, "Error opening file", InputFileName[Index]);\r
       return EFI_ABORTED;\r
@@ -705,7 +698,7 @@ Returns:
     break;\r
 \r
   default:\r
-    Error (NULL, 0, 2000, "Invalid paramter", "unknown compression type");\r
+    Error (NULL, 0, 2000, "Invalid parameter", "unknown compression type");\r
     free (FileBuffer);\r
     return EFI_ABORTED;\r
   }\r
@@ -744,7 +737,7 @@ Returns:
             "the original section size is %d bytes and the compressed section size is %u bytes", (unsigned) InputLength, (unsigned) CompressedLength);\r
 \r
   //if (TotalLength >= MAX_SECTION_SIZE) {\r
-  //  Error (NULL, 0, 2000, "Invalid paramter", "The size of all files exceeds section size limit(%uM).", MAX_SECTION_SIZE>>20);\r
+  //  Error (NULL, 0, 2000, "Invalid parameter", "The size of all files exceeds section size limit(%uM).", MAX_SECTION_SIZE>>20);\r
   //  if (FileBuffer != NULL) {\r
   //    free (FileBuffer);\r
   //  }\r
@@ -1553,7 +1546,7 @@ Returns:
   //\r
   // Write the output file\r
   //\r
-  OutFile = fopen (OutputFileName, "wb");\r
+  OutFile = fopen (LongFilePath (OutputFileName), "wb");\r
   if (OutFile == NULL) {\r
     Error (NULL, 0, 0001, "Error opening file for writing", OutputFileName);\r
     goto Finish;\r