]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/VolInfo/VolInfo.c
Sync BaseTool trunk (version r2423) into EDKII BaseTools. The change mainly includes:
[mirror_edk2.git] / BaseTools / Source / C / VolInfo / VolInfo.c
index fc3dd113ac989464b93992eddc8d289c1ddb36dd..7d127e16915b453f1954a4106ea13bec41315a21 100644 (file)
@@ -1,7 +1,7 @@
 /** @file
 
-Copyright (c) 1999 - 2008, Intel Corporation
-All rights reserved. This program and the accompanying materials
+Copyright (c) 1999 - 2011, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
 which accompanies this distribution.  The full text of the license may be found at
 http://opensource.org/licenses/bsd-license.php
@@ -123,7 +123,8 @@ PrintFileInfo (
 static
 EFI_STATUS
 PrintFvInfo (
-  IN VOID                         *Fv
+  IN VOID                         *Fv,
+  IN BOOLEAN                      IsChildFv
   );
 
 static
@@ -171,10 +172,11 @@ Returns:
   //
   // Print utility header
   //
-  printf ("%s Tiano Firmware Volume FFS image info.  Version %d.%d, %s\n",
+  printf ("%s Tiano Firmware Volume FFS image info.  Version %d.%d %s, %s\n",
     UTILITY_NAME,
     UTILITY_MAJOR_VERSION,
     UTILITY_MINOR_VERSION,
+    __BUILD_VERSION,
     __DATE__
     );
 
@@ -291,7 +293,7 @@ Returns:
 
   LoadGuidedSectionToolsTxt (argv[0]);
 
-  PrintFvInfo (FvImage);
+  PrintFvInfo (FvImage, FALSE);
 
   //
   // Clean up
@@ -305,7 +307,8 @@ Returns:
 static
 EFI_STATUS
 PrintFvInfo (
-  IN VOID                         *Fv
+  IN VOID                         *Fv,
+  IN BOOLEAN                      IsChildFv
   )
 /*++
 
@@ -316,6 +319,7 @@ Routine Description:
 Arguments:
 
   Fv            - Firmware Volume to print information about
+  IsChildFv     - Flag specifies whether the input FV is a child FV.
 
 Returns:
 
@@ -375,7 +379,11 @@ Returns:
     }
   }
 
-  printf ("There are a total of %d files in this FV\n", (int) NumberOfFiles);
+  if (IsChildFv) {
+    printf ("There are a total of %d files in the child FV\n", (int) NumberOfFiles);
+  } else {
+    printf ("There are a total of %d files in this FV\n", (int) NumberOfFiles);
+  }
 
   return EFI_SUCCESS;
 }
@@ -837,8 +845,8 @@ Returns:
     printf ("        EFI_FVB2_ALIGNMENT_256K\n");
   }
 
-  if (VolumeHeader.Attributes & EFI_FVB2_ALIGNMNET_512K) {
-    printf ("        EFI_FVB2_ALIGNMNET_512K\n");
+  if (VolumeHeader.Attributes & EFI_FVB2_ALIGNMENT_512K) {
+    printf ("        EFI_FVB2_ALIGNMENT_512K\n");
   }
 
   if (VolumeHeader.Attributes & EFI_FVB2_ALIGNMENT_1M) {
@@ -1275,7 +1283,7 @@ Returns:
       break;
 
     case EFI_SECTION_FIRMWARE_VOLUME_IMAGE:
-      Status = PrintFvInfo (((EFI_FIRMWARE_VOLUME_IMAGE_SECTION*)Ptr) + 1);
+      Status = PrintFvInfo (((EFI_FIRMWARE_VOLUME_IMAGE_SECTION*)Ptr) + 1, TRUE);
       if (EFI_ERROR (Status)) {
         Error (NULL, 0, 0003, "printing of FV section contents failed", NULL);
         return EFI_SECTION_ERROR;
@@ -1801,7 +1809,7 @@ Returns:
   //
   // Copyright declaration
   // 
-  fprintf (stdout, "Copyright (c) 2007, Intel Corporation. All rights reserved.\n\n");
+  fprintf (stdout, "Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.\n\n");
 
   //
   // Details Option