]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/BootSectImage/bootsectimage.c
BaseTools-Source: Update displayed version information
[mirror_edk2.git] / BaseTools / Source / C / BootSectImage / bootsectimage.c
index 0d0a3cbf77e946a69a768fc6571c36daf126b6ce..453a463f26d4698ab19d09885b38273480b7c013 100644 (file)
@@ -4,7 +4,7 @@ Abstract:
   Patch the BPB information in boot sector image file.\r
   Patch the MBR code in MBR image file.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
 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
@@ -33,8 +33,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // Utility version information\r
 //\r
-#define UTILITY_MAJOR_VERSION 0\r
-#define UTILITY_MINOR_VERSION 1\r
+#define UTILITY_MAJOR_VERSION 1
+#define UTILITY_MINOR_VERSION 0
 \r
 void\r
 Version (\r
@@ -56,8 +56,7 @@ Returns:
 \r
 --*/\r
 {\r
-  printf ("%s v%d.%d - Utility to break a file into two pieces at the specified offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);\r
-  printf ("Copyright (c) 1999-2010 Intel Corporation. All rights reserved.\n");\r
+  printf ("%s Version %d.%d Build %s\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
 }\r
 \r
 void\r
@@ -80,6 +79,9 @@ Returns:
 --*/\r
 {\r
   Version();\r
+  printf ("Copyright (c) 1999-2016 Intel Corporation. All rights reserved.\n");
+  printf ("\n  The BootSectImage tool prints information or patch destination file by source\n");
+  printf ("  file for BIOS Parameter Block (BPB) or Master Boot Record (MBR).\n");
   printf ("\nUsage: \n\\r
    BootSectImage\n\\r
      [-f, --force force patch even if the FAT type of SrcImage and DstImage mismatch]\n\\r
@@ -116,7 +118,7 @@ Return:
   FILE *FileHandle;\r
   int  result;\r
 \r
-  FileHandle = fopen (FileName, "r+b");\r
+  FileHandle = fopen (LongFilePath (FileName), "r+b");\r
   if (FileHandle == NULL) {\r
     DebugMsg (NULL, 0, DEBUG_ERROR, NULL, "Open file: %s", FileName);\r
     return 0;\r
@@ -154,7 +156,7 @@ Return:
   FILE *FileHandle;\r
   int  result;\r
 \r
-  FileHandle = fopen (FileName, "rb");\r
+  FileHandle = fopen (LongFilePath (FileName), "rb");\r
   if (FileHandle == NULL) {\r
     DebugMsg (NULL, 0, DEBUG_ERROR, NULL, "ERROR: E0001: Error opening file: %s", FileName);\r
     return 0;\r
@@ -889,6 +891,9 @@ main (
       ProcessMbr = TRUE;\r
     } else if (strcmp (*argv, "-v") == 0 || strcmp (*argv, "--verbose") == 0) {\r
       Verbose    = TRUE;\r
+    } else if (strcmp (*argv, "--version") == 0) {\r
+      Version();\r
+      return 0;\r
     } else if ((stricmp (*argv, "-d") == 0) || (stricmp (*argv, "--debug") == 0)) {\r
       argc--; argv++;\r
       if (argc < 1) {\r