]> 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 9b81eeb76291807f1ecbc0299a8e68f804db6b91..e8fea63510ed00213125a8ef33d0ee32568f08b0 100644 (file)
@@ -2,7 +2,7 @@
 \r
   Split a file into two pieces at the request offset.\r
 \r
-Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>\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
@@ -26,7 +26,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "ParseInf.h"\r
 #include "CommonLib.h"\r
 #include "EfiUtilityMsgs.h"\r
-\r
 //\r
 // Utility Name\r
 //\r
@@ -59,7 +58,7 @@ Returns:
 --*/\r
 {\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-2010 Intel Corporation. All rights reserved.\n");\r
+  printf ("Copyright (c) 1999-2014 Intel Corporation. All rights reserved.\n");\r
 }\r
 \r
 void\r
@@ -230,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
@@ -308,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
@@ -351,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
@@ -403,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