]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/GenFv/GenFv.c
Sync BaseTool trunk (version r2610) into EDKII BaseTools.
[mirror_edk2.git] / BaseTools / Source / C / GenFv / GenFv.c
index fa86d009da28a831eb52d1b6a1ad8d8973aae617..8f837d2695f593ebaebd0dcc7184ee6e81704a74 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2013, 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
@@ -42,6 +42,7 @@ Abstract:
 #define UTILITY_MINOR_VERSION 1\r
 \r
 EFI_GUID  mEfiFirmwareFileSystem2Guid = EFI_FIRMWARE_FILE_SYSTEM2_GUID;\r
+EFI_GUID  mEfiFirmwareFileSystem3Guid = EFI_FIRMWARE_FILE_SYSTEM3_GUID;\r
 \r
 STATIC\r
 VOID \r
@@ -96,7 +97,7 @@ Returns:
   //\r
   // Copyright declaration\r
   // \r
-  fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");\r
+  fprintf (stdout, "Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.\n\n");\r
 \r
   //\r
   // Details Option\r
@@ -143,6 +144,8 @@ Returns:
                         Its format is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n");\r
   fprintf (stdout, "  --capflag CapFlag     Capsule Reset Flag can be PersistAcrossReset,\n\\r
                         or PopulateSystemTable or InitiateReset or not set\n");\r
+  fprintf (stdout, "  --capoemflag CapOEMFlag\n\\r
+                        Capsule OEM Flag is an integer between 0x0000 and 0xffff\n");\r
   fprintf (stdout, "  --capheadsize HeadSize\n\\r
                         HeadSize is one HEX or DEC format value\n\\r
                         HeadSize is required by Capsule Image.\n");                        \r
@@ -439,6 +442,22 @@ Returns:
       continue; \r
     }\r
 \r
+    if (stricmp (argv[0], "--capoemflag") == 0) {\r
+      if (argv[1] == NULL) {\r
+        Error (NULL, 0, 1003, "Invalid option value", "Capsule OEM flag can't be null");\r
+      }\r
+      Status = AsciiStringToUint64(argv[1], FALSE, &TempNumber);\r
+      if (EFI_ERROR (Status) || TempNumber > 0xffff) {\r
+        Error (NULL, 0, 1003, "Invalid option value", "Capsule OEM flag value must be integer value between 0x0000 and 0xffff");\r
+        return STATUS_ERROR;\r
+      }\r
+      mCapDataInfo.Flags |= TempNumber;\r
+      DebugMsg( NULL, 0, 9, "Capsule OEM Flags", argv[1]);\r
+      argc -= 2;\r
+      argv += 2;\r
+      continue;\r
+    }\r
+\r
     if (stricmp (argv[0], "--capguid") == 0) {\r
       //\r
       // Get the Capsule Guid\r