|
|
1.1.1.9 ! root 1: /* ! 2: Legal Notice: The source code contained in this file has been derived from ! 3: the source code of Encryption for the Masses 2.02a, which is Copyright (c) ! 4: Paul Le Roux and which is covered by the 'License Agreement for Encryption ! 5: for the Masses'. Modifications and additions to that source code contained ! 6: in this file are Copyright (c) TrueCrypt Foundation and are covered by the ! 7: TrueCrypt License 2.2 the full text of which is contained in the file ! 8: License.txt included in TrueCrypt binary and source code distribution ! 9: packages. */ 1.1 root 10: 11: typedef struct fatparams_t 12: { 13: char volume_name[11]; 1.1.1.3 root 14: unsigned int num_sectors; /* total number of sectors */ 1.1 root 15: int cluster_count; /* number of clusters */ 16: int size_root_dir; /* size of the root directory in bytes */ 17: int size_fat; /* size of FAT */ 18: int fats; 1.1.1.6 root 19: unsigned int create_time; 1.1 root 20: int media; 21: int cluster_size; 22: int fat_length; 23: int dir_entries; 24: int sector_size; 25: int hidden; 1.1.1.6 root 26: __int16 reserved; 1.1 root 27: int sectors; 1.1.1.6 root 28: unsigned int total_sect; 1.1 root 29: 30: int heads; 31: int secs_track; 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.