VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/DcsInt
diff options
context:
space:
mode:
authorkavsrf <kavsrf@gmail.com>2017-09-03 09:23:17 +0300
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-12-09 11:26:48 +0100
commit42d7c987c89c294560fef23f440c9a2bd1df65c6 (patch)
tree60464dc1274d563e7e5e613a0cf00957fe88e8d5 /DcsInt
parentfceb3623c755f58053fb40f656ca42a1c2c0e896 (diff)
downloadVeraCrypt-DCS-42d7c987c89c294560fef23f440c9a2bd1df65c6.tar.gz
VeraCrypt-DCS-42d7c987c89c294560fef23f440c9a2bd1df65c6.zip
size of sector = 512 (check and info)
Diffstat (limited to 'DcsInt')
-rw-r--r--DcsInt/DcsInt.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/DcsInt/DcsInt.c b/DcsInt/DcsInt.c
index 3dad27e..f7c3965 100644
--- a/DcsInt/DcsInt.c
+++ b/DcsInt/DcsInt.c
@@ -494,13 +494,20 @@ SecRegionLoadDefault(EFI_HANDLE partHandle)
// get BlockIo protocol
bio = EfiGetBlockIO(SecRegionHandle);
if (bio == NULL) {
- ERR_PRINT(L"Block io not supported\n,");
+ ERR_PRINT(L"Block I/O not supported\n");
return EFI_NOT_FOUND;
}
+ if (bio->Media != NULL) {
+ if (bio->Media->BlockSize != 512) {
+ ERR_PRINT(L"Block size is %d. (not supported)\n", bio->Media->BlockSize);
+ return EFI_INVALID_PARAMETER;
+ }
+ }
+
SecRegionData = MEM_ALLOC(512);
if (SecRegionData == NULL) {
- ERR_PRINT(L"No memory\n,");
+ ERR_PRINT(L"No memory\n");
return EFI_BUFFER_TOO_SMALL;
}
SecRegionSize = 512;