Lines Matching refs:dir

162 fullpath(struct dosDirEntry *dir)  in fullpath()  argument
171 np = dir->lname[0] ? dir->lname : dir->name; in fullpath()
177 } while ((dir = dir->parent) != NULL); in fullpath()
178 if (dir) in fullpath()
391 struct dosDirEntry *dir) in checksize() argument
398 if (dir->head == CLUST_FREE) in checksize()
401 if (dir->head < CLUST_FIRST || dir->head >= boot->NumClusters) in checksize()
403 physicalSize = fat[dir->head].length * boot->ClusterSize; in checksize()
405 if (physicalSize < dir->size) { in checksize()
407 fullpath(dir), dir->size, physicalSize); in checksize()
409 dir->size = physicalSize; in checksize()
417 } else if (physicalSize - dir->size >= boot->ClusterSize) { in checksize()
419 fullpath(dir)); in checksize()
424 for (cl = dir->head, len = sz = 0; in checksize()
425 (sz += boot->ClusterSize) < dir->size; len++) in checksize()
429 fat[dir->head].length = len; in checksize()
445 struct dosDirEntry *dir) in readDosDirSection() argument
458 cl = dir->head; in readDosDirSection()
459 if (dir->parent && (cl < CLUST_FIRST || cl >= boot->NumClusters)) { in readDosDirSection()
468 if (!(boot->flags & FAT32) && !dir->parent) { in readDosDirSection()
488 if (dir->fsckflags & DIREMPWARN) { in readDosDirSection()
495 dir->fsckflags |= DIREMPTY; in readDosDirSection()
502 if (dir->fsckflags & DIREMPTY) { in readDosDirSection()
503 if (!(dir->fsckflags & DIREMPWARN)) { in readDosDirSection()
505 fullpath(dir)); in readDosDirSection()
509 dir->fsckflags &= ~DIREMPTY; in readDosDirSection()
519 dir->fsckflags |= DIREMPWARN; in readDosDirSection()
521 if (dir->fsckflags & DIREMPWARN) { in readDosDirSection()
525 } else if (dir->fsckflags & DIREMPTY) in readDosDirSection()
632 fullpath(dir), 2); in readDosDirSection()
665 dirent.parent = dir; in readDosDirSection()
666 dirent.next = dir->child; in readDosDirSection()
701 && dir->parent /* XXX */ in readDosDirSection()
702 && !dir->parent->parent) { in readDosDirSection()
773 if (dirent.head != dir->head) { in readDosDirSection()
775 fullpath(dir)); in readDosDirSection()
777 dirent.head = dir->head; in readDosDirSection()
791 if (dir->parent) { /* XXX */ in readDosDirSection()
792 if (!dir->parent->parent) { in readDosDirSection()
795 fullpath(dir)); in readDosDirSection()
805 } else if (dirent.head != dir->parent->head) { in readDosDirSection()
807 fullpath(dir)); in readDosDirSection()
809 dirent.head = dir->parent->head; in readDosDirSection()
831 dir->child = d; in readDosDirSection()
839 n->dir = d; in readDosDirSection()
849 if (!(boot->flags & FAT32) && !dir->parent) in readDosDirSection()
866 fullpath(dir), 1); in readDosDirSection()
871 if ((mod & FSDIRMOD) && !(boot->flags & FAT32) && !dir->parent) { in readDosDirSection()
896 struct dosDirEntry *dir = pendingDirectories->dir; in handleDirTree() local
909 mod |= readDosDirSection(dosfs, boot, fat, dir); in handleDirTree()