VeraCrypt
aboutsummaryrefslogtreecommitdiff
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
parentfceb3623c755f58053fb40f656ca42a1c2c0e896 (diff)
downloadVeraCrypt-DCS-42d7c987c89c294560fef23f440c9a2bd1df65c6.tar.gz
VeraCrypt-DCS-42d7c987c89c294560fef23f440c9a2bd1df65c6.zip
size of sector = 512 (check and info)
-rw-r--r--DcsBoot/DcsBoot.c2
-rw-r--r--DcsInfo/DcsInfo.c17
-rw-r--r--DcsInt/DcsInt.c11
3 files changed, 26 insertions, 4 deletions
diff --git a/DcsBoot/DcsBoot.c b/DcsBoot/DcsBoot.c
index f897a48..7eaf41b 100644
--- a/DcsBoot/DcsBoot.c
+++ b/DcsBoot/DcsBoot.c
@@ -71,7 +71,7 @@ UpdateDriverBmlStart() {
CHAR16* tmp = NULL;
// Driver load selected?
- drvInst = ConfigReadInt("DcsBmlDriver", 1);
+ drvInst = ConfigReadInt("DcsBmlDriver", 0);
if (drvInst) {
res = EfiGetVar(sDcsBmlDriverVar, &gEfiGlobalVariableGuid, &tmp, &len, &attr);
// Driver installed?
diff --git a/DcsInfo/DcsInfo.c b/DcsInfo/DcsInfo.c
index 048640a..70f235e 100644
--- a/DcsInfo/DcsInfo.c
+++ b/DcsInfo/DcsInfo.c
@@ -212,7 +212,22 @@ InfoTcg() {
VOID
InfoBlockDevices() {
- XmlTag(fInfo, "BlockDevices", TRUE, NULL, " count=\"%d\"", gBIOCount, NULL);
+ UINTN i;
+ XmlTag(fInfo, "BlockDevices", FALSE, NULL, " count=\"%d\"", gBIOCount, NULL);
+ FileAsciiPrint(fInfo, "\n");
+ gXmlTabs++;
+ for (i = 0; i < gBIOCount; ++i) {
+ EFI_BLOCK_IO_PROTOCOL *bio;
+ bio = EfiGetBlockIO(gBIOHandles[i]);
+ if (bio != NULL && bio->Media != NULL) {
+ XmlTag(fInfo, "BlockDevice", TRUE, NULL,
+ " index=\"%d\" logical=\"%d\" block_size=\"%d\" revision=\"%llx\" read_only=\"%d\" last_block=\"%lld\"", i,
+ bio->Media->LogicalPartition, bio->Media->BlockSize, bio->Revision,
+ bio->Media->ReadOnly,
+ bio->Media->LastBlock, NULL);
+ }
+ }
+ XmlEndTag(fInfo, "BlockDevices");
}
VOID
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;