Lines Matching refs:dir
162 fullpath(struct dosDirEntry *dir) in fullpath() argument
172 np = dir->lname[0] ? dir->lname : dir->name; in fullpath()
180 dir = dir->parent; in fullpath()
181 if (!dir) in fullpath()
386 checksize(struct fat_descriptor *fat, u_char *p, struct dosDirEntry *dir) in checksize() argument
398 if (dir->head == CLUST_FREE) { in checksize()
401 if (!fat_is_valid_cl(fat, dir->head) || !fat_is_cl_head(fat, dir->head)) { in checksize()
403 fullpath(dir), dir->size, dir->head); in checksize()
409 dir->size = 0; in checksize()
410 dir->head = CLUST_FREE; in checksize()
416 ret = checkchain(fat, dir->head, &chainsize); in checksize()
435 if (physicalSize < dir->size) { in checksize()
437 fullpath(dir), dir->size, (uintmax_t)physicalSize); in checksize()
439 dir->size = physicalSize; in checksize()
447 } else if (physicalSize - dir->size >= boot->ClusterSize) { in checksize()
449 fullpath(dir)); in checksize()
454 for (cl = dir->head, len = sz = 0; in checksize()
455 (sz += boot->ClusterSize) < dir->size; len++) in checksize()
475 check_subdirectory(struct fat_descriptor *fat, struct dosDirEntry *dir) in check_subdirectory() argument
487 cl = dir->head; in check_subdirectory()
488 if (dir->parent && !fat_is_valid_cl(fat, cl)) { in check_subdirectory()
492 if (!(boot->flags & FAT32) && !dir->parent) { in check_subdirectory()
526 pwarn("%s: Incorrect `.' for %s.\n", __func__, dir->name); in check_subdirectory()
532 pwarn("%s: Incorrect `..' for %s. \n", __func__, dir->name); in check_subdirectory()
547 readDosDirSection(struct fat_descriptor *fat, struct dosDirEntry *dir) in readDosDirSection() argument
566 cl = dir->head; in readDosDirSection()
567 if (dir->parent && (!fat_is_valid_cl(fat, cl))) { in readDosDirSection()
585 is_legacyroot = (dir->parent == NULL && !(boot->flags & FAT32)); in readDosDirSection()
592 mod |= checkchain(fat, dir->head, &dirclusters); in readDosDirSection()
619 if (dir->fsckflags & DIREMPWARN) { in readDosDirSection()
626 dir->fsckflags |= DIREMPTY; in readDosDirSection()
633 if (dir->fsckflags & DIREMPTY) { in readDosDirSection()
634 if (!(dir->fsckflags & DIREMPWARN)) { in readDosDirSection()
636 fullpath(dir)); in readDosDirSection()
640 dir->fsckflags &= ~DIREMPTY; in readDosDirSection()
651 dir->fsckflags |= DIREMPWARN; in readDosDirSection()
653 if (dir->fsckflags & DIREMPWARN) { in readDosDirSection()
657 } else if (dir->fsckflags & DIREMPTY) in readDosDirSection()
773 fullpath(dir), 2); in readDosDirSection()
806 dirent.parent = dir; in readDosDirSection()
807 dirent.next = dir->child; in readDosDirSection()
901 if (dirent.head != dir->head) { in readDosDirSection()
903 fullpath(dir)); in readDosDirSection()
905 dirent.head = dir->head; in readDosDirSection()
918 if (dir->parent) { /* XXX */ in readDosDirSection()
919 if (!dir->parent->parent) { in readDosDirSection()
922 fullpath(dir)); in readDosDirSection()
932 } else if (dirent.head != dir->parent->head) { in readDosDirSection()
934 fullpath(dir)); in readDosDirSection()
936 dirent.head = dir->parent->head; in readDosDirSection()
954 if (dirent.head == dir->head) { in readDosDirSection()
956 dirent.name, fullpath(dir)); in readDosDirSection()
988 dir->child = d; in readDosDirSection()
996 n->dir = d; in readDosDirSection()
1026 fullpath(dir), 1); in readDosDirSection()
1057 struct dosDirEntry *dir = pendingDirectories->dir; in handleDirTree() local
1070 mod |= readDosDirSection(fat, dir); in handleDirTree()