Lines Matching defs:tot_sectors
59 unsigned long *tot_sectors, int keepBoot)
71 *tot_sectors = dev->heads * dev->sectors * dev->tracks - DWORD(nhs);
73 if (*tot_sectors < 0x10000){
74 set_word(boot->psect, *tot_sectors);
78 set_dword(boot->bigsect, *tot_sectors);
157 unsigned long tot_sectors, int fat32)
167 if(tot_sectors > MAX_DISK_SIZE(12, FAT12-1))
169 if(fat32 || tot_sectors > MAX_DISK_SIZE(16, FAT16-1))
193 if(tot_sectors < min_fat16_size)
195 else if(tot_sectors >= 2* min_fat16_size)
223 static void calc_fat_bits2(Fs_t *Fs, unsigned long tot_sectors, int fat_bits,
233 rem_sect = tot_sectors - Fs->dir_len - Fs->fat_start;
326 static void xdf_calc_fat_size(Fs_t *Fs, unsigned long tot_sectors,
331 rem_sect = tot_sectors - Fs->dir_len - Fs->fat_start - 2 * Fs->fat_len;
354 static void calc_fat_size(Fs_t *Fs, unsigned long tot_sectors)
366 fprintf(stderr, "tot_sectors=%lu\n", tot_sectors);
369 real_rem_sect = rem_sect = tot_sectors - Fs->dir_len - Fs->fat_start;
516 static void calc_cluster_size(struct Fs_t *Fs, unsigned long tot_sectors,
551 rem_sect = tot_sectors - Fs->dir_len - Fs->fat_start;
597 static void calc_fs_parameters(struct device *dev, unsigned long tot_sectors,
633 Fs->cluster_size = (tot_sectors > 2000 ) ? 1:2;
643 Fs->dir_len = (tot_sectors > 2000) ? 32 : 7;
646 calc_cluster_size(Fs, tot_sectors, dev->fat_bits);
648 xdf_calc_fat_size(Fs, tot_sectors, dev->fat_bits);
650 calc_fat_bits2(Fs, tot_sectors, dev->fat_bits,
653 calc_fat_size(Fs, tot_sectors);
662 static void calc_fs_parameters_32(unsigned long tot_sectors,
677 Fs->num_clus = tot_sectors / Fs->cluster_size;
679 calc_fat_size(Fs, tot_sectors);
781 unsigned long tot_sectors;
1141 tot_sectors = used_dev.tracks*used_dev.heads*used_dev.sectors - used_dev.hidden;
1146 sectorsToBytes((Stream_t*)&Fs, tot_sectors-1),
1190 used_dev.fat_bits = comp_fat_bits(&Fs,used_dev.fat_bits, tot_sectors, fat32);
1196 calc_fs_parameters_32(tot_sectors, &Fs, boot);
1220 calc_fs_parameters(&used_dev, tot_sectors, &Fs, boot);
1256 &tot_sectors, keepBoot);