]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/GenVtf/GenVtf.c
Sync basetools' source and binary files with r1707 of the basetools project.
[mirror_edk2.git] / BaseTools / Source / C / GenVtf / GenVtf.c
index e633b7ccf83a0d61d6d5fee4525c6b95ec9b0a95..eafbcbf0023df9d7fd435445529d5239d0a89110 100644 (file)
@@ -122,8 +122,8 @@ Returns:
   CHAR8  StrPtr[40];\r
   CHAR8  *Token;\r
   UINTN  Length;\r
   CHAR8  StrPtr[40];\r
   CHAR8  *Token;\r
   UINTN  Length;\r
-  UINT32 Major;\r
-  UINT32 Minor;\r
+  unsigned Major;\r
+  unsigned Minor;\r
 \r
   Major = 0;\r
   Minor = 0;\r
 \r
   Major = 0;\r
   Minor = 0;\r
@@ -278,7 +278,7 @@ InitializeComps (
 \r
 Routine Description:\r
 \r
 \r
 Routine Description:\r
 \r
-  This function intializes the relevant global variable which is being\r
+  This function initializes the relevant global variable which is being\r
   used to store the information retrieved from INF file.  This also initializes\r
   the VTF symbol file.\r
 \r
   used to store the information retrieved from INF file.  This also initializes\r
   the VTF symbol file.\r
 \r
@@ -316,7 +316,7 @@ ParseAndUpdateComponents (
 \r
 Routine Description:\r
 \r
 \r
 Routine Description:\r
 \r
-  This function intializes the relevant global variable which is being\r
+  This function initializes the relevant global variable which is being\r
   used to store the information retrieved from INF file.\r
 \r
 Arguments:\r
   used to store the information retrieved from INF file.\r
 \r
 Arguments:\r
@@ -347,7 +347,7 @@ Returns:
     } else if (strnicmp (*TokenStr, "COMP_TYPE", 9) == 0) {\r
       TokenStr++;\r
       if (AsciiStringToUint64 (*TokenStr, FALSE, &StringValue) != EFI_SUCCESS) {\r
     } else if (strnicmp (*TokenStr, "COMP_TYPE", 9) == 0) {\r
       TokenStr++;\r
       if (AsciiStringToUint64 (*TokenStr, FALSE, &StringValue) != EFI_SUCCESS) {\r
-        Error (NULL, 0, 5001, "Cannot get: \"0x%x\".", *TokenStr);\r
+        Error (NULL, 0, 5001, "Cannot get: \"0x%s\".", *TokenStr);\r
         return ;\r
       }\r
 \r
         return ;\r
       }\r
 \r
@@ -1970,7 +1970,7 @@ Returns:
 \r
   Fv1BaseAddress        = StartAddress1;\r
   Fv1EndAddress         = Fv1BaseAddress + Size1;\r
 \r
   Fv1BaseAddress        = StartAddress1;\r
   Fv1EndAddress         = Fv1BaseAddress + Size1;\r
-  if (Fv1EndAddress != 0x100000000 || Size1 < 0x100000) {\r
+  if (Fv1EndAddress != 0x100000000ULL || Size1 < 0x100000) {\r
     Error (NULL, 0, 2000, "Invalid parameter", "Error BaseAddress and Size parameters!");\r
     if (Size1 < 0x100000) {\r
       Error (NULL, 0, 2000, "Invalid parameter", "The FwVolumeSize must be larger than 1M!");\r
     Error (NULL, 0, 2000, "Invalid parameter", "Error BaseAddress and Size parameters!");\r
     if (Size1 < 0x100000) {\r
       Error (NULL, 0, 2000, "Invalid parameter", "The FwVolumeSize must be larger than 1M!");\r
@@ -2281,11 +2281,7 @@ Returns:
       //\r
       TokenAddress += BaseAddress &~IPF_CACHE_BIT;\r
 \r
       //\r
       TokenAddress += BaseAddress &~IPF_CACHE_BIT;\r
 \r
-#ifdef __GNUC__\r
-      fprintf (DestFile, "%s | %016lX | %s | %s%s\n", Type, TokenAddress, Section, BaseToken, Token);\r
-#else\r
-       fprintf (DestFile, "%s | %016I64X | %s | %s%s\n", Type, TokenAddress, Section, BaseToken, Token);\r
-#endif\r
+      fprintf (DestFile, "%s | %016llX | %s | %s%s\n", Type, (unsigned long long) TokenAddress, Section, BaseToken, Token);\r
     }\r
   }\r
 \r
     }\r
   }\r
 \r
@@ -2689,7 +2685,7 @@ Returns:
       break;\r
 \r
     case EFI_ABORTED:\r
       break;\r
 \r
     case EFI_ABORTED:\r
-      Error (NULL, 0, 3000, "Invaild", "Error detected while creating the file image.");\r
+      Error (NULL, 0, 3000, "Invalid", "Error detected while creating the file image.");\r
       break;\r
 \r
     case EFI_OUT_OF_RESOURCES:\r
       break;\r
 \r
     case EFI_OUT_OF_RESOURCES:\r
@@ -2697,11 +2693,11 @@ Returns:
       break;\r
 \r
     case EFI_VOLUME_CORRUPTED:\r
       break;\r
 \r
     case EFI_VOLUME_CORRUPTED:\r
-      Error (NULL, 0, 3000, "Invaild", "No base address was specified.");\r
+      Error (NULL, 0, 3000, "Invalid", "No base address was specified.");\r
       break;\r
 \r
     default:\r
       break;\r
 \r
     default:\r
-      Error (NULL, 0, 3000, "Invaild", "GenVtfImage function returned unknown status %x.",Status );\r
+      Error (NULL, 0, 3000, "Invalid", "GenVtfImage function returned unknown status %x.", (int) Status );\r
       break;\r
     }\r
   }\r
       break;\r
     }\r
   }\r