VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Boot
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-21 15:21:13 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-22 00:30:19 +0200
commitff871511af79fd8fb7a09d3ed42220830e6ddcd6 (patch)
tree100728bb821d4fe1b7622eedd1174920302459e8 /src/Boot
parent0fb2befe3ab57696d5b4c9de6fee344bfd520bf6 (diff)
downloadVeraCrypt-ff871511af79fd8fb7a09d3ed42220830e6ddcd6.tar.gz
VeraCrypt-ff871511af79fd8fb7a09d3ed42220830e6ddcd6.zip
Windows: reduce size of MBR bootloader by removing unused functions in each build type.
Diffstat (limited to 'src/Boot')
-rw-r--r--src/Boot/Windows/BootConsoleIo.cpp6
-rw-r--r--src/Boot/Windows/BootDiskIo.cpp6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/Boot/Windows/BootConsoleIo.cpp b/src/Boot/Windows/BootConsoleIo.cpp
index 6a5a1595..b03098f0 100644
--- a/src/Boot/Windows/BootConsoleIo.cpp
+++ b/src/Boot/Windows/BootConsoleIo.cpp
@@ -19,17 +19,19 @@
static int ScreenOutputDisabled = 0;
+#if defined(TC_TRACE_INT13) || !defined(TC_WINDOWS_BOOT_RESCUE_DISK_MODE)
void DisableScreenOutput ()
{
++ScreenOutputDisabled;
}
+#endif
-
+#ifdef TC_TRACE_INT13
void EnableScreenOutput ()
{
--ScreenOutputDisabled;
}
-
+#endif
void PrintChar (char c)
{
diff --git a/src/Boot/Windows/BootDiskIo.cpp b/src/Boot/Windows/BootDiskIo.cpp
index a36b2b7c..ea808dd4 100644
--- a/src/Boot/Windows/BootDiskIo.cpp
+++ b/src/Boot/Windows/BootDiskIo.cpp
@@ -157,6 +157,7 @@ BiosResult ReadWriteSectors (bool write, uint16 bufferSegment, uint16 bufferOffs
return result;
}
+#ifdef TC_WINDOWS_BOOT_RESCUE_DISK_MODE
BiosResult ReadWriteSectors (bool write, byte *buffer, byte drive, const ChsAddress &chs, byte sectorCount, bool silent)
{
@@ -165,18 +166,19 @@ BiosResult ReadWriteSectors (bool write, byte *buffer, byte drive, const ChsAddr
return ReadWriteSectors (write, codeSeg, (uint16) buffer, drive, chs, sectorCount, silent);
}
-
BiosResult ReadSectors (byte *buffer, byte drive, const ChsAddress &chs, byte sectorCount, bool silent)
{
return ReadWriteSectors (false, buffer, drive, chs, sectorCount, silent);
}
-
+#if 0
BiosResult WriteSectors (byte *buffer, byte drive, const ChsAddress &chs, byte sectorCount, bool silent)
{
return ReadWriteSectors (true, buffer, drive, chs, sectorCount, silent);
}
+#endif
+#endif
static BiosResult ReadWriteSectors (bool write, BiosLbaPacket &dapPacket, byte drive, const uint64 &sector, uint16 sectorCount, bool silent)
{