]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/GenVtf/GenVtf.c
Sync EDKII BaseTools to BaseTools project r2093.
[mirror_edk2.git] / BaseTools / Source / C / GenVtf / GenVtf.c
index 890cfd98fd371d7451c02ae54e1ac5ae8848af22..428158ebb831aa7463be4e76338b46db2e27c0e9 100644 (file)
@@ -1,13 +1,13 @@
 /**\r
 \r
-Copyright (c)  1999 - 2008, Intel Corporation. All rights reserved\r
-This software and associated documentation (if any) is furnished\r
-under a license and may only be used or copied in accordance\r
-with the terms of the license. Except as permitted by such\r
-license, no part of this software or documentation may be\r
-reproduced, stored in a retrieval system, or transmitted in any\r
-form or by any means without the express written consent of\r
-Intel Corporation.\r
+Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available \r
+under the terms and conditions of the BSD License which accompanies this \r
+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
 \r
 \r
 Module Name:\r
@@ -105,23 +105,22 @@ ConvertVersionInfo (
 /*++\r
 Routine Description:\r
 \r
-  This function converts GUID string to GUID\r
+  This function split version to major version and minor version\r
 \r
 Arguments:\r
 \r
   Str      - String representing in form XX.XX\r
-  MajorVer - The major vertion\r
-  MinorVer - The minor vertion\r
+  MajorVer - The major version\r
+  MinorVer - The minor version\r
 \r
 Returns:\r
 \r
-  EFI_SUCCESS  - The fuction completed successfully.\r
+  EFI_SUCCESS  - The function completed successfully.\r
 \r
 --*/\r
 {\r
   CHAR8  StrPtr[40];\r
   CHAR8  *Token;\r
-  UINTN  Length;\r
   unsigned Major;\r
   unsigned Minor;\r
 \r
@@ -135,10 +134,9 @@ Returns:
     Token = strtok (NULL, ".");\r
   }\r
 \r
-  Length = strlen (StrPtr);\r
   sscanf (\r
     StrPtr,\r
-    "%01x%02x",\r
+    "%02d%02d",\r
     &Major,\r
     &Minor\r
     );\r
@@ -342,7 +340,6 @@ Returns:
         VtfInfo->LocationType = SECOND_VTF;\r
       } else {\r
         VtfInfo->LocationType = NONE;\r
-        Warning(UTILITY_NAME, 0, 0001, "Unknown location for component.", VtfInfo->CompName);\r
       }\r
     } else if (strnicmp (*TokenStr, "COMP_TYPE", 9) == 0) {\r
       TokenStr++;\r
@@ -2408,7 +2405,7 @@ Returns:
   //\r
   // Copyright declaration\r
   //\r
-  fprintf (stdout, "Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\n\n");\r
+  fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");\r
   //\r
   // Details Option\r
   //\r