--- truecrypt/boot/windows/bootdiskio.h 2018/04/24 16:52:02 1.1.1.2 +++ truecrypt/boot/windows/bootdiskio.h 2018/04/24 17:09:43 1.1.1.9 @@ -1,9 +1,9 @@ /* - Copyright (c) 2008 TrueCrypt Foundation. All rights reserved. + Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. - Governed by the TrueCrypt License 2.4 the full text of which is contained - in the file License.txt included in TrueCrypt binary and source code - distribution packages. + Governed by the TrueCrypt License 3.0 the full text of which is contained in + the file License.txt included in TrueCrypt binary and source code distribution + packages. */ #ifndef TC_HEADER_Boot_BootDiskIo @@ -93,12 +93,15 @@ void ReleaseSectorBuffer (); #endif void ChsToLba (const DriveGeometry &geometry, const ChsAddress &chs, uint64 &lba); -BiosResult GetActivePartition (byte drive, Partition &partition, size_t &partitionCount, bool silent); +bool GetActivePartition (byte drive); BiosResult GetDriveGeometry (byte drive, DriveGeometry &geometry, bool silent = false); -BiosResult GetDrivePartitions (byte drive, Partition *partitionArray, size_t partitionArrayCapacity, size_t &partitionCount, bool activeOnly = false, bool silent = false); +BiosResult GetDrivePartitions (byte drive, Partition *partitionArray, size_t partitionArrayCapacity, size_t &partitionCount, bool activeOnly = false, Partition *findPartitionFollowingThis = nullptr, bool silent = false); +bool IsLbaSupported (byte drive); void LbaToChs (const DriveGeometry &geometry, const uint64 &lba, ChsAddress &chs); void Print (const ChsAddress &chs); void PrintDiskError (BiosResult error, bool write, byte drive, const uint64 *sector, const ChsAddress *chs = nullptr); +void PrintSectorCountInMB (const uint64 §orCount); +BiosResult ReadWriteMBR (bool write, byte drive, bool silent = false); BiosResult ReadSectors (uint16 bufferSegment, uint16 bufferOffset, byte drive, const uint64 §or, uint16 sectorCount, bool silent = false); BiosResult ReadSectors (byte *buffer, byte drive, const uint64 §or, uint16 sectorCount, bool silent = false); BiosResult ReadSectors (byte *buffer, byte drive, const ChsAddress &chs, byte sectorCount, bool silent = false);