|
|
1.1.1.9 root 1: /*
1.1.1.11 root 2: Legal Notice: Some portions of the source code contained in this file were
3: derived from the source code of Encryption for the Masses 2.02a, which is
4: Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License
5: Agreement for Encryption for the Masses'. Modifications and additions to
1.1.1.16! root 6: the original source code (contained in this file) and all other portions
! 7: of this file are Copyright (c) 2003-2009 TrueCrypt Developers Association
! 8: and are governed by the TrueCrypt License 2.8 the full text of which is
! 9: contained in the file License.txt included in TrueCrypt binary and source
! 10: code distribution packages. */
1.1 root 11:
12: typedef struct fatparams_t
13: {
14: char volume_name[11];
1.1.1.3 root 15: unsigned int num_sectors; /* total number of sectors */
1.1 root 16: int cluster_count; /* number of clusters */
17: int size_root_dir; /* size of the root directory in bytes */
18: int size_fat; /* size of FAT */
19: int fats;
20: int media;
21: int cluster_size;
22: int fat_length;
1.1.1.15 root 23: uint16 dir_entries;
24: uint16 sector_size;
1.1 root 25: int hidden;
1.1.1.6 root 26: __int16 reserved;
1.1.1.15 root 27: uint16 sectors;
1.1.1.6 root 28: unsigned int total_sect;
1.1 root 29:
1.1.1.15 root 30: uint16 heads;
31: uint16 secs_track;
1.1 root 32:
33: } fatparams;
34:
35:
36: struct msdos_boot_sector
37: {
38: unsigned char boot_jump[3]; /* Boot strap short or near jump */
39: char system_id[8]; /* Name - can be used to special case
40: partition manager volumes */
41: unsigned char sector_size[2]; /* bytes per logical sector */
42: unsigned char cluster_size; /* sectors/cluster */
43: unsigned short reserved;/* reserved sectors */
44: unsigned char fats; /* number of FATs */
45: unsigned char dir_entries[2]; /* root directory entries */
46: unsigned char sectors[2]; /* number of sectors */
47: unsigned char media; /* media code */
48: unsigned short fat_length; /* sectors/FAT */
49: unsigned short secs_track; /* sectors per track */
50: unsigned short heads; /* number of heads */
1.1.1.6 root 51: unsigned __int32 hidden; /* hidden sectors */
52: unsigned __int32 total_sect; /* number of sectors (if sectors == 0) */
1.1 root 53: unsigned char drive_number; /* BIOS drive number */
54: unsigned char RESERVED; /* Unused */
1.1.1.6 root 55: unsigned char ext_boot_sign; /* 0x29 if fields below exist (DOS 3.3+) */
1.1 root 56: unsigned char volume_id[4]; /* Volume ID number */
57: char volume_label[11]; /* Volume label */
1.1.1.6 root 58: char fs_type[8]; /* Typically FAT12, FAT16, or FAT32 */
1.1 root 59: unsigned char boot_code[448]; /* Boot code (or message) */
60: unsigned short boot_sign; /* 0xAA55 */
61: };
62:
63:
64: void GetFatParams ( fatparams *ft );
65: void PutBoot ( fatparams *ft , unsigned char *boot );
1.1.1.7 root 66: int FormatFat (unsigned __int64 startSector, fatparams * ft, void * dev, PCRYPTO_INFO cryptoInfo, BOOL quickFormat);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.