VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/Include/Library/CommonLib.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/Library/CommonLib.h')
-rw-r--r--Include/Library/CommonLib.h35
1 files changed, 32 insertions, 3 deletions
diff --git a/Include/Library/CommonLib.h b/Include/Library/CommonLib.h
index 9a15afd..2cf10d3 100644
--- a/Include/Library/CommonLib.h
+++ b/Include/Library/CommonLib.h
@@ -25,6 +25,16 @@ https://opensource.org/licenses/LGPL-3.0
#include <Uefi/UefiGpt.h>
//////////////////////////////////////////////////////////////////////////
+// Custom error codes
+//////////////////////////////////////////////////////////////////////////
+
+#define EFI_DCS_SHUTDOWN_REQUESTED ENCODE_ERROR(0xDC50001)
+#define EFI_DCS_REBOOT_REQUESTED ENCODE_ERROR(0xDC50002)
+#define EFI_DCS_HALT_REQUESTED ENCODE_ERROR(0xDC50003)
+#define EFI_DCS_USER_CANCELED ENCODE_ERROR(0xDC50004)
+#define EFI_DCS_POSTEXEC_REQUESTED ENCODE_ERROR(0xDC50005)
+
+//////////////////////////////////////////////////////////////////////////
// Check error
//////////////////////////////////////////////////////////////////////////
extern UINTN gCELine;
@@ -72,6 +82,13 @@ PrepareMemory(
IN UINTN len,
OUT VOID** mem
);
+
+EFI_STATUS
+MemoryHasPattern (
+ CONST VOID* buffer,
+ UINTN bufferLen,
+ CONST VOID* pattern,
+ UINTN patternLen);
//////////////////////////////////////////////////////////////////////////
// handles
@@ -412,7 +429,7 @@ AsciiHexToByte(
);
BOOLEAN
-AsciiStrToGuid(
+DcsAsciiStrToGuid(
OUT EFI_GUID *guid,
IN CHAR8 *str
);
@@ -425,7 +442,7 @@ AsciiHexToBytes(
);
BOOLEAN
-StrHexToBytes(
+DcsStrHexToBytes(
OUT UINT8 *b,
IN UINTN *bytesLen,
IN CHAR16 *str
@@ -643,6 +660,18 @@ EFI_STATUS
InitFS();
EFI_STATUS
+DirectoryCreate(
+ IN EFI_FILE* root,
+ IN CHAR16* name
+ );
+
+EFI_STATUS
+DirectoryExists(
+ IN EFI_FILE* root,
+ IN CHAR16* name
+ );
+
+EFI_STATUS
FileOpenRoot(
IN EFI_HANDLE rootHandle,
OUT EFI_FILE** rootFile);
@@ -677,7 +706,7 @@ EFI_STATUS
FileWrite(
IN EFI_FILE* f,
IN VOID* data,
- IN OUT UINTN* bytes,
+ IN OUT UINTN bytes,
IN OUT UINT64* position);
UINTN