• Home
  • Raw
  • Download

Lines Matching refs:boot

227 	struct bootblock *boot;  in resetDosDirSection()  local
229 boot = fat_get_boot(fat); in resetDosDirSection()
231 rootdir_size = boot->bpbRootDirEnts * 32; in resetDosDirSection()
232 cluster_size = boot->bpbSecPerClust * boot->bpbBytesPerSec; in resetDosDirSection()
253 if (boot->flags & FAT32) { in resetDosDirSection()
254 if (!fat_is_cl_head(fat, boot->bpbRootClust)) { in resetDosDirSection()
258 rootDir->head = boot->bpbRootClust; in resetDosDirSection()
304 struct bootblock *boot; in delete() local
306 boot = fat_get_boot(fat); in delete()
308 clsz = boot->bpbSecPerClust * boot->bpbBytesPerSec; in delete()
318 off = (startcl - CLUST_FIRST) * boot->bpbSecPerClust + boot->FirstCluster; in delete()
320 off *= boot->bpbBytesPerSec; in delete()
393 struct bootblock *boot; in checksize() local
395 boot = fat_get_boot(fat); in checksize()
422 physicalSize = (u_int64_t)chainsize * boot->ClusterSize; in checksize()
436 } else if (physicalSize - dir->size >= boot->ClusterSize) { in checksize()
444 (sz += boot->ClusterSize) < dir->size; len++) in checksize()
471 struct bootblock *boot; in check_subdirectory() local
473 boot = fat_get_boot(fat); in check_subdirectory()
481 if (!(boot->flags & FAT32) && !dir->parent) { in check_subdirectory()
482 off = boot->bpbResSectors + boot->bpbFATs * in check_subdirectory()
483 boot->FATsecs; in check_subdirectory()
485 off = (cl - CLUST_FIRST) * boot->bpbSecPerClust + boot->FirstCluster; in check_subdirectory()
493 buf = malloc(boot->bpbBytesPerSec); in check_subdirectory()
496 boot->bpbBytesPerSec); in check_subdirectory()
500 off *= boot->bpbBytesPerSec; in check_subdirectory()
502 read(fd, buf, boot->bpbBytesPerSec) != (ssize_t)boot->bpbBytesPerSec) { in check_subdirectory()
538 struct bootblock *boot; in readDosDirSection() local
552 boot = fat_get_boot(fat); in readDosDirSection()
574 is_legacyroot = (dir->parent == NULL && !(boot->flags & FAT32)); in readDosDirSection()
576 iosize = boot->bpbRootDirEnts * 32; in readDosDirSection()
577 entries = boot->bpbRootDirEnts; in readDosDirSection()
579 iosize = boot->bpbSecPerClust * boot->bpbBytesPerSec; in readDosDirSection()
590 off = boot->bpbResSectors + boot->bpbFATs * in readDosDirSection()
591 boot->FATsecs; in readDosDirSection()
597 off = (cl - CLUST_FIRST) * boot->bpbSecPerClust + boot->FirstCluster; in readDosDirSection()
600 off *= boot->bpbBytesPerSec; in readDosDirSection()
785 if (boot->ClustMask == CLUST32_MASK) in readDosDirSection()
860 if (boot->ClustMask == CLUST32_MASK) in readDosDirSection()
897 if (boot->ClustMask == CLUST32_MASK) { in readDosDirSection()
915 if (boot->ClustMask == CLUST32_MASK) in readDosDirSection()
928 if (boot->ClustMask == CLUST32_MASK) { in readDosDirSection()
992 boot->NumFiles++; in readDosDirSection()
1077 struct bootblock *boot = fat_get_boot(fat); in reconnect() local
1098 lfbuf = malloc(boot->ClusterSize); in reconnect()
1108 for (; p < lfbuf + boot->ClusterSize; p += 32) in reconnect()
1112 if (p && p < lfbuf + boot->ClusterSize) in reconnect()
1115 if (lfcl < CLUST_FIRST || lfcl >= boot->NumClusters) { in reconnect()
1118 lfcl = (lostDir->head < boot->NumClusters) ? lostDir->head : 0; in reconnect()
1121 lfoff = (lfcl - CLUST_FIRST) * boot->ClusterSize in reconnect()
1122 + boot->FirstCluster * boot->bpbBytesPerSec; in reconnect()
1125 || (size_t)read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { in reconnect()
1132 boot->NumFiles++; in reconnect()
1139 d.size = length * boot->ClusterSize; in reconnect()
1146 if (boot->ClustMask == CLUST32_MASK) { in reconnect()
1155 || (size_t)write(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { in reconnect()