diff options
Diffstat (limited to 'src/Core/FatFormatter.cpp')
-rw-r--r-- | src/Core/FatFormatter.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/Core/FatFormatter.cpp b/src/Core/FatFormatter.cpp index fa327837..0d29c33d 100644 --- a/src/Core/FatFormatter.cpp +++ b/src/Core/FatFormatter.cpp @@ -4,11 +4,11 @@ Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #include "Common/Tcdefs.h" @@ -147,11 +147,11 @@ namespace VeraCrypt ft->sectors = (uint16) ft->num_sectors; ft->total_sect = 0; } } - static void PutBoot (fatparams * ft, byte *boot, uint32 volumeId) + static void PutBoot (fatparams * ft, uint8 *boot, uint32 volumeId) { int cnt = 0; boot[cnt++] = 0xeb; /* boot jump */ boot[cnt++] = (ft->size_fat == 32)? 0x58: 0x3c; @@ -242,11 +242,11 @@ namespace VeraCrypt boot[cnt++] = 0xaa; /* boot sig */ } /* FAT32 FSInfo */ - static void PutFSInfo (byte *sector, fatparams *ft) + static void PutFSInfo (uint8 *sector, fatparams *ft) { memset (sector, 0, ft->sector_size); sector[3] = 0x41; /* LeadSig */ sector[2] = 0x61; sector[1] = 0x52; @@ -292,20 +292,20 @@ namespace VeraCrypt /* Write the data area */ sector.Zero(); uint32 volumeId; - RandomNumberGenerator::GetDataFast (BufferPtr ((byte *) &volumeId, sizeof (volumeId))); + RandomNumberGenerator::GetDataFast (BufferPtr ((uint8 *) &volumeId, sizeof (volumeId))); - PutBoot (ft, (byte *) sector, volumeId); + PutBoot (ft, (uint8 *) sector, volumeId); writeSector (sector); ++sectorNumber; /* fat32 boot area */ if (ft->size_fat == 32) { /* fsinfo */ - PutFSInfo((byte *) sector, ft); + PutFSInfo((uint8 *) sector, ft); writeSector (sector); ++sectorNumber; /* reserved */ while (sectorNumber < 6) { @@ -315,14 +315,14 @@ namespace VeraCrypt writeSector (sector); ++sectorNumber; } /* bootsector backup */ sector.Zero(); - PutBoot (ft, (byte *) sector, volumeId); + PutBoot (ft, (uint8 *) sector, volumeId); writeSector (sector); ++sectorNumber; - PutFSInfo((byte *) sector, ft); + PutFSInfo((uint8 *) sector, ft); writeSector (sector); ++sectorNumber; } /* reserved */ while (sectorNumber < (uint32)ft->reserved) @@ -338,33 +338,33 @@ namespace VeraCrypt { sector.Zero(); if (n == 0) { - byte fat_sig[12]; + uint8 fat_sig[12]; if (ft->size_fat == 32) { - fat_sig[0] = (byte) ft->media; + fat_sig[0] = (uint8) ft->media; fat_sig[1] = fat_sig[2] = 0xff; fat_sig[3] = 0x0f; fat_sig[4] = fat_sig[5] = fat_sig[6] = 0xff; fat_sig[7] = 0x0f; fat_sig[8] = fat_sig[9] = fat_sig[10] = 0xff; fat_sig[11] = 0x0f; memcpy (sector, fat_sig, 12); } else if (ft->size_fat == 16) { - fat_sig[0] = (byte) ft->media; + fat_sig[0] = (uint8) ft->media; fat_sig[1] = 0xff; fat_sig[2] = 0xff; fat_sig[3] = 0xff; memcpy (sector, fat_sig, 4); } else if (ft->size_fat == 12) { - fat_sig[0] = (byte) ft->media; + fat_sig[0] = (uint8) ft->media; fat_sig[1] = 0xff; fat_sig[2] = 0xff; fat_sig[3] = 0x00; memcpy (sector, fat_sig, 4); } |