1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Windows: reduce size of MBR bootloader by removing unused functions in each build type.

This commit is contained in:
Mounir IDRASSI
2017-07-21 15:21:13 +02:00
parent 0fb2befe3a
commit ff871511af
8 changed files with 36 additions and 77 deletions

View File

@@ -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)
{

View File

@@ -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)
{