Home | History | Annotate | Download | only in fsck_msdos

Lines Matching refs:head

249 		    || fat[boot->RootCl].head != boot->RootCl) {
267 rootDir->head = boot->RootCl;
398 if (dir->head == CLUST_FREE)
401 if (dir->head < CLUST_FIRST || dir->head >= boot->NumClusters)
403 physicalSize = fat[dir->head].length * boot->ClusterSize;
424 for (cl = dir->head; (sz += boot->ClusterSize) < dir->size;)
453 cl = dir->head;
541 cl = dir->head;
739 dirent.head = p[26] | (p[27] << 8);
741 dirent.head |= (p[20] << 16) | (p[21] << 24);
770 if (dirent.head != 0) {
777 clearchain(boot, fat, dirent.head);
778 dirent.head = 0;
783 } else if (dirent.head == 0
790 } else if (dirent.head < CLUST_FIRST
791 || dirent.head >= boot->NumClusters
792 || fat[dirent.head].next == CLUST_FREE
793 || (fat[dirent.head].next >= CLUST_RSRVD
794 && fat[dirent.head].next < CLUST_EOFS)
795 || fat[dirent.head].head != dirent.head) {
796 if (dirent.head == 0)
799 else if (dirent.head < CLUST_FIRST
800 || dirent.head >= boot->NumClusters)
803 dirent.head);
804 else if (fat[dirent.head].next == CLUST_FREE)
807 else if (fat[dirent.head].next >= CLUST_RSRVD)
810 rsrvdcltype(fat[dirent.head].next));
834 if (dirent.head >= CLUST_FIRST && dirent.head < boot->NumClusters)
835 fat[dirent.head].flags |= FAT_USED;
857 if (dirent.head != dir->head) {
861 dirent.head = dir->head;
862 p[26] = (u_char)dirent.head;
863 p[27] = (u_char)(dirent.head >> 8);
865 p[20] = (u_char)(dirent.head >> 16);
866 p[21] = (u_char)(dirent.head >> 24);
876 if (dirent.head) {
880 dirent.head = 0;
888 } else if (dirent.head != dir->parent->head) {
892 dirent.head = dir->parent->head;
893 p[26] = (u_char)dirent.head;
894 p[27] = (u_char)(dirent.head >> 8);
896 p[20] = (u_char)(dirent.head >> 16);
897 p[21] = (u_char)(dirent.head >> 24);
905 } else { //only one directory entry can point to dir->head, it's '.'
906 if (dirent.head == dir->head) {
941 printf("%s: %s : 0x%02x:head %d, next 0x%0x parent 0x%0x child 0x%0x\n",
942 __func__,d->name,d->flags,d->head,d->next,d->parent,d->child);
1019 reconnect(int dosfs, struct bootblock *boot, struct fatEntry *fat, cl_t head)
1054 lfcl = p ? fat[lfcl].next : lostDir->head;
1058 lfcl = (lostDir->head < boot->NumClusters) ? lostDir->head : 0;
1074 (void)snprintf(d.name, sizeof(d.name), "%u", head);
1076 d.head = head;
1077 d.size = fat[head].length * boot->ClusterSize;
1082 p[26] = (u_char)d.head;
1083 p[27] = (u_char)(d.head >> 8);
1085 p[20] = (u_char)(d.head >> 16);
1086 p[21] = (u_char)(d.head >> 24);
1092 fat[head].flags |= FAT_USED;