• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/msdosfs-209.1.1/fsck_msdos.tproj/

Lines Matching defs:boot

121 static int delete(int fd, struct bootblock *boot, cl_t startcl, size_t startoff, cl_t endcl, size_t endoff, int notlast);
256 markDosDirChain(struct bootblock *boot, struct dosDirEntry *dir)
265 while (cluster >= CLUST_FIRST && cluster < boot->NumClusters && !isUsed(cluster))
299 else if (cluster < CLUST_FIRST || cluster >= boot->NumClusters)
316 dir->physicalSize = (u_int64_t)count * boot->ClusterSize;
338 resetDosDirSection(struct bootblock *boot)
344 b1 = boot->RootDirEnts * 32;
345 b2 = boot->SecPerClust * boot->BytesPerSec;
354 if (boot->flags & FAT32) {
355 if (boot->RootCl < CLUST_FIRST || boot->RootCl >= boot->NumClusters) {
357 boot->RootCl);
361 cl = fat_get(boot->RootCl);
376 ret = fat_set(boot->RootCl, CLUST_EOF);
385 markFree(boot->RootCl);
390 rootDir->head = boot->RootCl;
391 ret |= markDosDirChain(boot, rootDir);
441 delete(int fd, struct bootblock *boot, cl_t startcl, size_t startoff, cl_t endcl, size_t endoff, int notlast)
445 int clsz = boot->SecPerClust * boot->BytesPerSec;
449 while (startcl >= CLUST_FIRST && startcl < boot->NumClusters) {
455 off = startcl * boot->SecPerClust + boot->ClusterOffset;
456 off *= boot->BytesPerSec;
482 msdosfs_removede(f, boot, start, end, startcl, endcl, curcl, path, type)
484 struct bootblock *boot;
506 if (delete(f, boot,
529 checksize(boot, p, dir)
530 struct bootblock *boot;
549 } else if (dir->physicalSize - dir->size >= boot->ClusterSize) {
571 for (cl = dir->head; (sz += boot->ClusterSize) < dir->size;)
608 sz += boot->ClusterSize;
631 static errno_t isSubdirectory(int fd, struct bootblock *boot, struct dosDirEntry *dir)
638 buf = malloc(boot->BytesPerSec);
644 offset = ((off_t)dir->head * boot->SecPerClust + boot->ClusterOffset) * boot->BytesPerSec;
645 amount = pread(fd, buf, boot->BytesPerSec, offset);
646 if (amount != boot->BytesPerSec) {
675 readDosDirSection(f, boot, dir)
677 struct bootblock *boot;
693 if (dir->parent && (cl < CLUST_FIRST || cl >= boot->NumClusters)) {
710 if (!(boot->flags & FAT32) && !dir->parent) {
711 last = boot->RootDirEnts * 32;
712 off = boot->ResSectors + boot->FATs * boot->FATsecs;
714 last = boot->SecPerClust * boot->BytesPerSec;
715 off = cl * boot->SecPerClust + boot->ClusterOffset;
718 off *= boot->BytesPerSec;
755 if (delete(f, boot,
882 mod |= msdosfs_removede(f, boot,
914 if (boot->ClustMask == CLUST32_MASK)
929 mod |= k = msdosfs_removede(f, boot,
967 if (dirent.head < CLUST_FIRST || dirent.head >= boot->NumClusters)
1008 if (boot->ClustMask == CLUST32_MASK)
1020 if (dirent.head >= CLUST_FIRST && dirent.head < boot->NumClusters)
1022 mod |= markDosDirChain(boot, &dirent);
1053 if (boot->ClustMask == CLUST32_MASK) {
1072 if (boot->ClustMask == CLUST32_MASK)
1085 if (boot->ClustMask == CLUST32_MASK) {
1102 errno_t err = isSubdirectory(f, boot, &dirent);
1139 mod |= k = checksize(boot, p, &dirent);
1143 boot->NumFiles++;
1158 if (!(boot->flags & FAT32) && !dir->parent)
1162 } while ((cl = fat_get(cl)) >= CLUST_FIRST && cl < boot->NumClusters && cl != dir->end);
1167 mod |= msdosfs_removede(f, boot,
1181 handleDirTree(int dosfs, struct bootblock *boot)
1185 mod = readDosDirSection(dosfs, boot, rootDir);
1206 mod |= readDosDirSection(dosfs, boot, dir);