• Home
  • Raw
  • Download

Lines Matching refs:fat

87 #define	mincls(fat)  ((fat) == 12 ? MINCLS12 :	\  argument
88 (fat) == 16 ? MINCLS16 : \
91 #define maxcls(fat) ((fat) == 12 ? MAXCLS12 : \ argument
92 (fat) == 16 ? MAXCLS16 : \
257 u_int fat, bss, rds, cls, dir, lsn, x, x1, x2; in mkfs_msdos() local
362 if (!(fat = o.fat_type)) { in mkfs_msdos()
364 fat = 12; in mkfs_msdos()
366 fat = 32; in mkfs_msdos()
368 if ((fat == 32 && o.directory_entries) || (fat != 32 && (o.info_sector || o.backup_sector))) { in mkfs_msdos()
370 fat == 32 ? 'e' : o.info_sector ? 'i' : 'k', in mkfs_msdos()
371 fat == 32 ? "32" : "12/16"); in mkfs_msdos()
374 if (o.floppy && fat == 32) in mkfs_msdos()
376 if (fat != 0 && fat != 12 && fat != 16 && fat != 32) { in mkfs_msdos()
377 warnx("%d: bad FAT type", fat); in mkfs_msdos()
454 if (!fat) { in mkfs_msdos()
465 fat = 12; in mkfs_msdos()
474 fat = 16; in mkfs_msdos()
476 fat = 32; in mkfs_msdos()
479 if (fat == 32) { in mkfs_msdos()
522 bpb.bpbResSectors = ((fat == 32) ? in mkfs_msdos()
529 if (fat != 32 && !bpb.bpbRootDirEnts) in mkfs_msdos()
534 for (bpb.bpbSecPerClust = howmany(fat == 16 ? DEFBLK16 : in mkfs_msdos()
537 howmany((RESFTE + maxcls(fat)) * (fat / BPN), in mkfs_msdos()
540 (u_int64_t) (maxcls(fat) + 1) * bpb.bpbSecPerClust) <= in mkfs_msdos()
546 if (fat != 32 && bpb.bpbBigFATsecs > MAXU16) { in mkfs_msdos()
559 fat / BPN * bpb.bpbFATs); in mkfs_msdos()
560 x2 = howmany((RESFTE + MIN(x, maxcls(fat))) * (fat / BPN), in mkfs_msdos()
580 x = (u_int64_t)bpb.bpbBigFATsecs * bpb.bpbBytesPerSec * NPB / (fat / BPN) - in mkfs_msdos()
587 if (cls < mincls(fat)) { in mkfs_msdos()
588 warnx("%u clusters too few clusters for FAT%u, need %u", cls, fat, in mkfs_msdos()
589 mincls(fat)); in mkfs_msdos()
592 if (cls > maxcls(fat)) { in mkfs_msdos()
593 cls = maxcls(fat); in mkfs_msdos()
600 cls * bpb.bpbSecPerClust == 1 ? "" : "s", cls, fat, in mkfs_msdos()
604 if (fat == 32) in mkfs_msdos()
610 if (fat != 32) { in mkfs_msdos()
645 for (lsn = 0; lsn < dir + (fat == 32 ? bpb.bpbSecPerClust : rds); lsn++) { in mkfs_msdos()
649 (dir + (fat == 32 ? bpb.bpbSecPerClust: rds)), in mkfs_msdos()
651 (fat == 32 ? bpb.bpbSecPerClust: rds))); in mkfs_msdos()
656 fat == 32 && bpb.bpbBackup != MAXU16 && in mkfs_msdos()
676 (fat == 32 && bpb.bpbBackup != MAXU16 && in mkfs_msdos()
693 if (fat == 32) { in mkfs_msdos()
717 snprintf(buf, sizeof(buf), "FAT%u", fat); in mkfs_msdos()
730 } else if (fat == 32 && bpb.bpbFSInfo != MAXU16 && in mkfs_msdos()
744 for (x = 1; x < fat * (fat == 32 ? 3 : 2) / 8; x++) in mkfs_msdos()
745 mk1(img[x], fat == 32 && x % 4 == 3 ? 0x0f : 0xff); in mkfs_msdos()