pm_BytesPerSec
size_t cBlockSize = fatVolume->pm_BytesPerSec;
howmany(bp->b_bufsize, fatVolume->pm_BytesPerSec));
uint32 cBlockCount = bp->b_bufsize / fatVolume->pm_BytesPerSec;
cBlockSize = fatVolume->pm_BytesPerSec;
howmany(bp->b_bufsize, fatVolume->pm_BytesPerSec));
printFunc("%" B_PRIu32 " bytes/sector, %lu sectors/cluster\n", fatVolume->pm_BytesPerSec,
#define BLOCK_TO_SECTOR(fat_volume, block) ((block * DEV_BSIZE) / fat_volume->pm_BytesPerSec)
size_t bytesPerSector = fatVolume->pm_BytesPerSec;
off_t fatFirstSector = fatVolume->pm_fatblk / fatVolume->pm_BytesPerSec;
/ fatVolume->pm_BytesPerSec;
fatVolume->pm_BlkPerSec = fatVolume->pm_BytesPerSec / DEV_BSIZE;
fatVolume->pm_fatblocksize = roundup(fatVolume->pm_fatblocksize, fatVolume->pm_BytesPerSec);
if (dev->si_geometry->bytes_per_sector > fatVolume->pm_BytesPerSec) {
"-byte sectors.\n", fatVolume->pm_BytesPerSec, dev->si_geometry->bytes_per_sector);
if (fsSectors > dev->si_mediasize / fatVolume->pm_BytesPerSec) {
uint32 fatEntriesPerSector = fatVolume->pm_BytesPerSec / 4;
= block_cache_create(dev->si_fd, fsSectors, fatVolume->pm_BytesPerSec, readOnly);
dummyVolume.pm_BlkPerSec = dummyVolume.pm_BytesPerSec / DEV_BSIZE;
cookie->fBytesPerSector = dummyVolume.pm_BytesPerSec;
rootDirSector += dirOffset / fatVolume->pm_BytesPerSec;
HOWMANY(fatVolume->pm_rootdirsize * DEV_BSIZE, fatVolume->pm_BytesPerSec);
rootDirBytes = (volume->pm_rootdirsize / volume->pm_BlkPerSec) * volume->pm_BytesPerSec;
volume->pm_BytesPerSec = getushort(bpb->bpbBytesPerSec);
if (volume->pm_BytesPerSec != 0x200 && volume->pm_BytesPerSec != 0x400
&& volume->pm_BytesPerSec != 0x800 && volume->pm_BytesPerSec != 0x1000) {
INFORM("invalid bytes per sector (%d)\n", volume->pm_BytesPerSec);
} else if (volume->pm_BytesPerSec < DEV_BSIZE) {
INFORM("invalid bytes per sector (%d)\n", volume->pm_BytesPerSec);
} else if (volume->pm_BytesPerSec * volume->pm_bpb.bpbSecPerClust > 0x10000) {
volume->pm_BytesPerSec * volume->pm_bpb.bpbSecPerClust);
if ((volume->pm_RootDirEnts * 32) % volume->pm_BytesPerSec != 0) {
if ((off_t) volume->pm_HugeSectors * volume->pm_BytesPerSec < volume->pm_HugeSectors) {
if (static_cast<off_t>(volume->pm_HugeSectors) * volume->pm_BytesPerSec
uint32 bytesPerSec = volume->pm_BytesPerSec;