]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Split/Split.c
There is a limitation on WINDOWS OS for the length of entire file path can’t be large...
[mirror_edk2.git] / BaseTools / Source / C / Split / Split.c
index d5fe738a2cadc20bf0d1cb1a09df945bc3b45c58..e8fea63510ed00213125a8ef33d0ee32568f08b0 100644 (file)
@@ -2,7 +2,7 @@
 \r
   Split a file into two pieces at the request offset.\r
 \r
-Copyright (c)  1999-2008 Intel Corporation. All rights reserved\r
+Copyright (c) 1999 - 2014, 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
@@ -57,8 +57,8 @@ Returns:
 \r
 --*/\r
 {\r
-  printf ("%s v%d.%d -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);\r
-  printf ("Copyright (c) 1999-2007 Intel Corporation. All rights reserved.\n");\r
+  printf ("%s v%d.%d %s -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);\r
+  printf ("Copyright (c) 1999-2014 Intel Corporation. All rights reserved.\n");\r
 }\r
 \r
 void\r
@@ -229,7 +229,6 @@ Returns:
   CHAR8         *CurrentDir = NULL;\r
   UINT64        Index;\r
   CHAR8         CharC;\r
-  BOOLEAN       QuietFlag = TRUE;\r
   UINT64        DebugLevel = 0;\r
   UINT64        VerboseLevel = 0;\r
 \r
@@ -307,7 +306,6 @@ Returns:
     }\r
 \r
     if ((stricmp (argv[0], "-q") == 0) || (stricmp (argv[0], "--quiet") == 0)) {\r
-      QuietFlag = TRUE;\r
       argc --;\r
       argv ++;\r
       continue;\r
@@ -350,7 +348,7 @@ Returns:
     return STATUS_ERROR;\r
   }\r
 \r
-  In = fopen (InputFileName, "rb");\r
+  In = fopen (LongFilePath (InputFileName), "rb");\r
   if (In == NULL) {\r
     // ("Unable to open file \"%s\"\n", InputFileName);\r
     Error (InputFileName, 0, 1, "File open failure", NULL);\r
@@ -402,14 +400,14 @@ Returns:
   chdir(CurrentDir);\r
   free(CurrentDir);\r
 \r
-  Out1 = fopen (OutFileName1, "wb");\r
+  Out1 = fopen (LongFilePath (OutFileName1), "wb");\r
   if (Out1 == NULL) {\r
     // ("Unable to open file \"%s\"\n", OutFileName1);\r
     Error (OutFileName1, 0, 1, "File open failure", NULL);\r
     return STATUS_ERROR;\r
   }\r
 \r
-  Out2 = fopen (OutFileName2, "wb");\r
+  Out2 = fopen (LongFilePath (OutFileName2), "wb");\r
   if (Out2 == NULL) {\r
     // ("Unable to open file \"%s\"\n", OutFileName2);\r
     Error (OutFileName2, 0, 1, "File open failure", NULL);\r