]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Common/CommonLib.h
BaseTools/GenFv: Add check to ensure the file handle status is correct
[mirror_edk2.git] / BaseTools / Source / C / Common / CommonLib.h
index 0610b21ed08278a401fa34411f810f6796c3417a..2041b89e2d0bc93577880431e82e92ce32db7d4e 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
+Common library assistance routines.\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, 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
@@ -9,14 +10,6 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  CommonLib.h\r
-\r
-Abstract:\r
-\r
-  Common library assistance routines.\r
-\r
 **/\r
 \r
 #ifndef _EFI_COMMON_LIB_H\r
@@ -25,6 +18,13 @@ Abstract:
 #include <Common/UefiBaseTypes.h>\r
 #include <Common/BuildVersion.h>\r
 #define PRINTED_GUID_BUFFER_SIZE  37  // including null-termination\r
+\r
+#define MAX_LONG_FILE_PATH 500\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
 //\r
 // Function declarations\r
 //\r
@@ -145,6 +145,27 @@ PrintGuidToBuffer (
   )\r
 ;\r
 \r
+CHAR8 *\r
+LongFilePath (\r
+ IN CHAR8 *FileName\r
+);\r
+/*++\r
+\r
+Routine Description:\r
+  Convert FileName to the long file path, which can support larger than 260 length. \r
+\r
+Arguments:\r
+  FileName         - FileName. \r
+\r
+Returns:\r
+  LongFilePath      A pointer to the converted long file path.\r
+  \r
+--*/\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
 #define ASSERT(x) assert(x)\r
 \r
 #ifdef __GNUC__\r