|
|
1.1.1.3 ! root 1: /* The source code contained in this file has been derived from the source code ! 2: of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and ! 3: additions to that source code contained in this file are Copyright (c) 2004 ! 4: TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified ! 5: parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation ! 6: release. Please see the file license.txt for full license details. */ 1.1 root 7: 8: typedef struct fatparams_t 9: { 10: char volume_name[11]; 1.1.1.3 ! root 11: unsigned int num_sectors; /* total number of sectors */ 1.1 root 12: int cluster_count; /* number of clusters */ 13: int size_root_dir; /* size of the root directory in bytes */ 14: int size_fat; /* size of FAT */ 15: int fats; 16: long create_time; 17: int media; 18: int cluster_size; 19: int fat_length; 20: int dir_entries; 21: int sector_size; 22: int hidden; 23: int sectors; 24: long total_sect; 25: 26: int heads; 27: int secs_track; 28: 29: } fatparams; 30: 31: 32: struct msdos_boot_sector 33: { 34: unsigned char boot_jump[3]; /* Boot strap short or near jump */ 35: char system_id[8]; /* Name - can be used to special case 36: partition manager volumes */ 37: unsigned char sector_size[2]; /* bytes per logical sector */ 38: unsigned char cluster_size; /* sectors/cluster */ 39: unsigned short reserved;/* reserved sectors */ 40: unsigned char fats; /* number of FATs */ 41: unsigned char dir_entries[2]; /* root directory entries */ 42: unsigned char sectors[2]; /* number of sectors */ 43: unsigned char media; /* media code */ 44: unsigned short fat_length; /* sectors/FAT */ 45: unsigned short secs_track; /* sectors per track */ 46: unsigned short heads; /* number of heads */ 47: unsigned long hidden; /* hidden sectors */ 48: unsigned long total_sect; /* number of sectors (if sectors == 49: 0) */ 50: unsigned char drive_number; /* BIOS drive number */ 51: unsigned char RESERVED; /* Unused */ 52: unsigned char ext_boot_sign; /* 0x29 if fields below exist (DOS 53: 3.3+) */ 54: unsigned char volume_id[4]; /* Volume ID number */ 55: char volume_label[11]; /* Volume label */ 56: char fs_type[8]; /* Typically FAT12 or FAT16 */ 57: unsigned char boot_code[448]; /* Boot code (or message) */ 58: unsigned short boot_sign; /* 0xAA55 */ 59: }; 60: 61: 62: /* Everything below this line is automatically updated by the -mkproto-tool- */ 63: 64: void GetFatParams ( fatparams *ft ); 65: void PutBoot ( fatparams *ft , unsigned char *boot ); 1.1.1.3 ! root 66: int FormatFat (fatparams * ft, char * header, HFILE dev, PCRYPTO_INFO cryptoInfo, int nFrequency, diskio_f write, BOOL quickFormat);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.