--- truecrypt/boot/windows/bootconfig.cpp 2018/04/24 16:49:04 1.1.1.1 +++ truecrypt/boot/windows/bootconfig.cpp 2018/04/24 16:55:18 1.1.1.2 @@ -1,7 +1,7 @@ /* Copyright (c) 2008 TrueCrypt Foundation. All rights reserved. - Governed by the TrueCrypt License 2.4 the full text of which is contained + Governed by the TrueCrypt License 2.5 the full text of which is contained in the file License.txt included in TrueCrypt binary and source code distribution packages. */ @@ -13,7 +13,31 @@ byte BootSectorFlags; byte BootLoaderDrive; byte BootDrive; bool BootDriveGeometryValid = false; +bool PreventHiddenSystemBoot = false; + DriveGeometry BootDriveGeometry; CRYPTO_INFO *BootCryptoInfo; Partition EncryptedVirtualPartition; + +Partition ActivePartition; +Partition PartitionFollowingActive; +uint64 HiddenVolumeStartUnitNo; +uint64 HiddenVolumeStartSector; + + +BiosResult UpdateBootSectorConfiguration (byte drive) +{ + AcquireSectorBuffer(); + + BiosResult result = ReadWriteMBR (false, drive); + if (result != BiosResultSuccess) + goto ret; + + SectorBuffer[TC_BOOT_SECTOR_CONFIG_OFFSET] = BootSectorFlags; + result = ReadWriteMBR (true, drive); + +ret: + ReleaseSectorBuffer(); + return result; +}