Lines Matching refs:bps

112     u_int8_t bps[2];    /* bytes per sector */  member
156 u_int bps; /* bytes per sector */ member
409 bpb.bps = opt_S; in newfs_msdos_main()
420 bpb.bsec -= (opt_ofs / bpb.bps); in newfs_msdos_main()
441 if (!powerof2(bpb.bps)) in newfs_msdos_main()
442 errx(1, "bytes/sector (%u) is not a power of 2", bpb.bps); in newfs_msdos_main()
443 if (bpb.bps < MINBPS) in newfs_msdos_main()
445 bpb.bps, MINBPS); in newfs_msdos_main()
461 if (opt_b < bpb.bps) in newfs_msdos_main()
463 opt_b, bpb.bps); in newfs_msdos_main()
464 if (opt_b > bpb.bps * MAXSPC) in newfs_msdos_main()
465 errx(1, "block size (%u) is too large; maximum is %u", opt_b, bpb.bps * MAXSPC); in newfs_msdos_main()
466 bpb.spc = opt_b / bpb.bps; in newfs_msdos_main()
505 if (!S_ISREG(sb.st_mode) || sb.st_size % bpb.bps || in newfs_msdos_main()
506 sb.st_size < bpb.bps || sb.st_size > bpb.bps * MAXU16) in newfs_msdos_main()
508 bss = sb.st_size / bpb.bps; in newfs_msdos_main()
515 ((bpb.spc ? 16 : 12) / BPN), bpb.bps * NPB) * in newfs_msdos_main()
518 bpb.bps / sizeof(struct de)) + in newfs_msdos_main()
520 (bpb.spc ? bpb.spc : howmany(DEFBLK, bpb.bps))) in newfs_msdos_main()
524 howmany((RESFTE + MAXCLS16) * 2, bpb.bps) * bpb.nft + in newfs_msdos_main()
525 howmany(DEFRDE, bpb.bps / sizeof(struct de)) + in newfs_msdos_main()
527 (bpb.spc ? bpb.spc : howmany(8192, bpb.bps))) in newfs_msdos_main()
567 bpb.res = (fat == 32 ? MAX(x, MAX(16384 / bpb.bps, 4)) : x) + extra_res; in newfs_msdos_main()
572 rds = howmany(bpb.rde, bpb.bps / sizeof(struct de)); in newfs_msdos_main()
574 for (bpb.spc = howmany(fat == 16 ? DEFBLK16 : DEFBLK, bpb.bps); in newfs_msdos_main()
578 bpb.bps * NPB) * bpb.nft + in newfs_msdos_main()
589 x = (u_int64_t)(bpb.bsec - x1) * bpb.bps * NPB / 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()
623 cls == 1 ? "" : "s", bpb.bps * bpb.spc); in newfs_msdos_main()
641 if (!(img = malloc(bpb.bps))) in newfs_msdos_main()
642 err(1, "%u", bpb.bps); in newfs_msdos_main()
652 if ((n = read(fd1, img, bpb.bps)) == -1) in newfs_msdos_main()
654 if ((unsigned)n != bpb.bps) in newfs_msdos_main()
657 memset(img, 0, bpb.bps); in newfs_msdos_main()
661 mk2(bsbpb->bps, bpb.bps); in newfs_msdos_main()
737 if ((n = write(fd, img, bpb.bps)) == -1) in newfs_msdos_main()
739 if ((unsigned)n != bpb.bps) { in newfs_msdos_main()
803 if (ioctl(fd, BLKSSZGET, &bpb->bps)) { in getdiskinfo()
808 ckgeom(fname, bpb->bps, "bytes/sector"); in getdiskinfo()
887 if (bpb->bps == 0 && ioctl(fd, DIOCGSECTORSIZE, &dlp.d_secsize) == -1) in getdiskinfo()
912 if (bpb->bps == 0) in getdiskinfo()
913 bpb->bps = ckgeom(fname, lp->d_secsize, "bytes/sector"); in getdiskinfo()
930 printf("bps=%u spc=%u res=%u nft=%u", bpb->bps, bpb->spc, bpb->res, in print_bpb()