Lines Matching refs:BytesPerSec
83 boot->BytesPerSec = block[11] + (block[12] << 8);
133 if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET)
134 != boot->FSInfo * boot->BytesPerSec
160 if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET)
161 != boot->FSInfo * boot->BytesPerSec
183 if (lseek(dosfs, boot->Backup * boot->BytesPerSec, SEEK_SET)
184 != boot->Backup * boot->BytesPerSec
223 boot->FirstCluster = (boot->RootDirEnts * 32 + boot->BytesPerSec - 1)
224 / boot->BytesPerSec
228 if (boot->BytesPerSec % DOSBOOTBLOCKSIZE != 0) {
229 pfatal("Invalid sector size: %u", boot->BytesPerSec);
269 boot->NumFatEntries = (boot->FATsecs * boot->BytesPerSec) / 4;
272 boot->NumFatEntries = (boot->FATsecs * boot->BytesPerSec) / 2;
275 boot->NumFatEntries = (boot->FATsecs * boot->BytesPerSec * 2) / 3;
292 boot->ClusterSize = boot->BytesPerSec * boot->SecPerClust;
305 fsinfo = calloc(2, boot->BytesPerSec);
309 if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET)
310 != boot->FSInfo * boot->BytesPerSec
311 || (size_t)read(dosfs, fsinfo, 2 * boot->BytesPerSec)
312 != 2 * boot->BytesPerSec) {
325 if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET)
326 != boot->FSInfo * boot->BytesPerSec
327 || (size_t)write(dosfs, fsinfo, 2 * boot->BytesPerSec)
328 != 2 * boot->BytesPerSec) {