Lines Matching refs:fat
218 resetDosDirSection(struct bootblock *boot, struct fatEntry *fat)
253 cl = fat[boot->RootCl].next;
256 || fat[boot->RootCl].head != boot->RootCl) {
267 fat[boot->RootCl].next = CLUST_FREE;
273 fat[boot->RootCl].flags |= FAT_USED;
314 delete(int f, struct bootblock *boot, struct fatEntry *fat, cl_t startcl,
347 startcl = fat[startcl].next;
354 removede(int f, struct bootblock *boot, struct fatEntry *fat, u_char *start,
371 if (delete(f, boot, fat,
391 checksize(struct bootblock *boot, struct fatEntry *fat, u_char *p,
404 physicalSize = fat[dir->head].length * boot->ClusterSize;
427 cl = fat[cl].next;
428 clearchain(boot, fat, fat[cl].next);
429 fat[cl].next = CLUST_EOF;
430 fat[dir->head].length = len;
465 readDosDirSection(int f, struct bootblock *boot, struct fatEntry *fat,
530 if (delete(f, boot, fat,
633 mod |= removede(f, boot, fat,
673 mod |= k = removede(f, boot, fat,
697 clearchain(boot, fat, dirent.head);
712 || fat[dirent.head].next == CLUST_FREE
713 || (fat[dirent.head].next >= CLUST_RSRVD
714 && fat[dirent.head].next < CLUST_EOFS)
715 || fat[dirent.head].head != dirent.head) {
724 else if (fat[dirent.head].next == CLUST_FREE)
727 else if (fat[dirent.head].next >= CLUST_RSRVD)
730 rsrvdcltype(fat[dirent.head].next));
755 fat[dirent.head].flags |= FAT_USED;
846 mod |= k = checksize(boot, fat, p, &dirent);
865 } while ((cl = fat[cl].next) >= CLUST_FIRST && cl < boot->NumClusters);
867 mod |= removede(f, boot, fat,
888 handleDirTree(int dosfs, struct bootblock *boot, struct fatEntry *fat)
892 mod = readDosDirSection(dosfs, boot, fat, rootDir);
913 mod |= readDosDirSection(dosfs, boot, fat, dir);
922 * Try to reconnect a FAT chain into dir
929 reconnect(int dosfs, struct bootblock *boot, struct fatEntry *fat, cl_t head)
965 lfcl = p ? fat[lfcl].next : lostDir->head;
988 d.size = fat[head].length * boot->ClusterSize;
1003 fat[head].flags |= FAT_USED;