Lines Matching refs:fat
80 #define mincls(fat) ((fat) == 12 ? MINCLS12 : \ argument
81 (fat) == 16 ? MINCLS16 : \
84 #define maxcls(fat) ((fat) == 12 ? MAXCLS12 : \ argument
85 (fat) == 16 ? MAXCLS16 : \
263 u_int fat, bss, rds, cls, dir, lsn, x, x1, x2; in newfs_msdos_main() local
446 if (!(fat = opt_F)) { in newfs_msdos_main()
448 fat = 12; in newfs_msdos_main()
450 fat = 32; in newfs_msdos_main()
452 if ((fat == 32 && opt_e) || (fat != 32 && (opt_i || opt_k))) in newfs_msdos_main()
454 fat == 32 ? 'e' : opt_i ? 'i' : 'k', in newfs_msdos_main()
455 fat == 32 ? "32" : "12/16"); in newfs_msdos_main()
456 if (opt_f && fat == 32) in newfs_msdos_main()
512 if (!fat) { in newfs_msdos_main()
521 fat = 12; in newfs_msdos_main()
528 fat = 16; in newfs_msdos_main()
530 fat = 32; in newfs_msdos_main()
533 if (fat == 32) { in newfs_msdos_main()
567 bpb.res = (fat == 32 ? MAX(x, MAX(16384 / bpb.bps, 4)) : x) + extra_res; in newfs_msdos_main()
570 if (fat != 32 && !bpb.rde) in newfs_msdos_main()
574 for (bpb.spc = howmany(fat == 16 ? DEFBLK16 : DEFBLK, bpb.bps); in newfs_msdos_main()
577 howmany((RESFTE + maxcls(fat)) * (fat / BPN), in newfs_msdos_main()
580 (u_int64_t)(maxcls(fat) + 1) * bpb.spc <= bpb.bsec; in newfs_msdos_main()
582 if (fat != 32 && bpb.bspf > MAXU16) in newfs_msdos_main()
590 (bpb.spc * bpb.bps * NPB + fat / BPN * bpb.nft); in newfs_msdos_main()
591 x2 = howmany((RESFTE + MIN(x, maxcls(fat))) * (fat / BPN), bpb.bps * NPB); in newfs_msdos_main()
609 x = (u_int64_t)bpb.bspf * bpb.bps * NPB / (fat / BPN) - RESFTE; in newfs_msdos_main()
614 if (cls < mincls(fat)) in newfs_msdos_main()
615 errx(1, "%u clusters too few clusters for FAT%u, need %u", cls, fat, mincls(fat)); in newfs_msdos_main()
616 if (cls > maxcls(fat)) { in newfs_msdos_main()
617 cls = maxcls(fat); in newfs_msdos_main()
622 fname, cls * bpb.spc, cls * bpb.spc == 1 ? "" : "s", cls, fat, in newfs_msdos_main()
626 if (fat == 32) in newfs_msdos_main()
632 if (fat != 32) { in newfs_msdos_main()
644 for (lsn = 0; lsn < dir + (fat == 32 ? bpb.spc : rds); lsn++) { in newfs_msdos_main()
646 if (opt_B && fat == 32 && bpb.bkbs != MAXU16 && bss <= bpb.bkbs && x >= bpb.bkbs) { in newfs_msdos_main()
658 if (!lsn || (fat == 32 && bpb.bkbs != MAXU16 && lsn == bpb.bkbs)) { in newfs_msdos_main()
674 if (fat == 32) { in newfs_msdos_main()
698 sprintf(buf, "FAT%u", fat); in newfs_msdos_main()
711 } else if (fat == 32 && bpb.infs != MAXU16 && in newfs_msdos_main()
722 for (x = 1; x < fat * (fat == 32 ? 3 : 2) / 8; x++) in newfs_msdos_main()
723 mk1(img[x], fat == 32 && x % 4 == 3 ? 0x0f : 0xff); in newfs_msdos_main()