VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/Library/CommonLib
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-09-23 18:33:04 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-09-23 20:01:32 +0200
commit4566f95fd9f70530866457beb545a794cc80e1d0 (patch)
tree9ded8c8613ea1c9c7db3b981ab0b3c8c7e4aa439 /Library/CommonLib
parent5135d1a3579104b4c69994135c424c5a524c11f9 (diff)
downloadVeraCrypt-DCS-4566f95fd9f70530866457beb545a794cc80e1d0.tar.gz
VeraCrypt-DCS-4566f95fd9f70530866457beb545a794cc80e1d0.zip
make the rescue disk boot machine directly from disk if "VeraCrypt" folder is missing. This make it easy to create a bootable disk for VeraCrypt from the rescue disk by just removing or renaming its "VeraCrypt" folder.VeraCrypt_1.24
Diffstat (limited to 'Library/CommonLib')
-rw-r--r--Library/CommonLib/EfiFile.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/Library/CommonLib/EfiFile.c b/Library/CommonLib/EfiFile.c
index 8a9d6d7..4ea164e 100644
--- a/Library/CommonLib/EfiFile.c
+++ b/Library/CommonLib/EfiFile.c
@@ -58,6 +58,22 @@ DirectoryCreate(
}
EFI_STATUS
+DirectoryExists(
+ IN EFI_FILE* root,
+ IN CHAR16* name
+ )
+{
+ EFI_FILE* file;
+ EFI_STATUS res;
+ if (!name) { return EFI_INVALID_PARAMETER; }
+
+ res = FileOpen(root, name, &file, EFI_FILE_MODE_READ, EFI_FILE_DIRECTORY);
+ if (EFI_ERROR(res)) return res;
+ FileClose(file);
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
FileOpenRoot(
IN EFI_HANDLE rootHandle,
OUT EFI_FILE** rootFile)