Lines Matching refs:dirent
537 struct dosDirEntry dirent, *d; in readDosDirSection() local
734 memset(&dirent, 0, sizeof dirent); in readDosDirSection()
740 dirent.flags = p[11]; in readDosDirSection()
746 dirent.name[j] = p[j]; in readDosDirSection()
747 dirent.name[8] = '\0'; in readDosDirSection()
748 for (k = 7; k >= 0 && dirent.name[k] == ' '; k--) in readDosDirSection()
749 dirent.name[k] = '\0'; in readDosDirSection()
750 if (k < 0 || dirent.name[k] != '\0') in readDosDirSection()
752 if (dirent.name[0] == SLOT_E5) in readDosDirSection()
753 dirent.name[0] = 0xe5; in readDosDirSection()
755 if (dirent.flags & ATTR_VOLUME) { in readDosDirSection()
768 dirent.name[k++] = '.'; in readDosDirSection()
770 dirent.name[k++] = p[j+8]; in readDosDirSection()
771 dirent.name[k] = '\0'; in readDosDirSection()
772 for (k--; k >= 0 && dirent.name[k] == ' '; k--) in readDosDirSection()
773 dirent.name[k] = '\0'; in readDosDirSection()
782 dirent.head = p[26] | (p[27] << 8); in readDosDirSection()
784 dirent.head |= (p[20] << 16) | (p[21] << 24); in readDosDirSection()
785 dirent.size = p[28] | (p[29] << 8) | (p[30] << 16) | (p[31] << 24); in readDosDirSection()
787 strlcpy(dirent.lname, longName, in readDosDirSection()
788 sizeof(dirent.lname)); in readDosDirSection()
793 dirent.parent = dir; in readDosDirSection()
794 dirent.next = dir->child; in readDosDirSection()
800 fullpath(&dirent), 0); in readDosDirSection()
832 if (!(dirent.flags & ATTR_DIRECTORY) || in readDosDirSection()
833 (strcmp(dirent.name, ".") != 0 && in readDosDirSection()
834 strcmp(dirent.name, "..") != 0)) { in readDosDirSection()
835 if ((dirent.size != 0 || (dirent.flags & ATTR_DIRECTORY)) && in readDosDirSection()
836 ((!fat_is_valid_cl(fat, dirent.head) || in readDosDirSection()
837 !fat_is_cl_head(fat, dirent.head)))) { in readDosDirSection()
838 if (!fat_is_valid_cl(fat, dirent.head)) { in readDosDirSection()
840 fullpath(&dirent), in readDosDirSection()
841 dirent.head); in readDosDirSection()
844 fullpath(&dirent)); in readDosDirSection()
847 if (dirent.flags & ATTR_DIRECTORY) { in readDosDirSection()
860 dirent.size = 0; in readDosDirSection()
861 dirent.head = 0; in readDosDirSection()
868 if (dirent.flags & ATTR_DIRECTORY) { in readDosDirSection()
874 if (dirent.size) { in readDosDirSection()
876 fullpath(&dirent)); in readDosDirSection()
879 dirent.size = 0; in readDosDirSection()
887 if (strcmp(dirent.name, ".") == 0) { in readDosDirSection()
888 if (dirent.head != dir->head) { in readDosDirSection()
892 dirent.head = dir->head; in readDosDirSection()
893 p[26] = (u_char)dirent.head; in readDosDirSection()
894 p[27] = (u_char)(dirent.head >> 8); in readDosDirSection()
896 p[20] = (u_char)(dirent.head >> 16); in readDosDirSection()
897 p[21] = (u_char)(dirent.head >> 24); in readDosDirSection()
904 } else if (strcmp(dirent.name, "..") == 0) { in readDosDirSection()
907 if (dirent.head) { in readDosDirSection()
911 dirent.head = 0; in readDosDirSection()
919 } else if (dirent.head != dir->parent->head) { in readDosDirSection()
923 dirent.head = dir->parent->head; in readDosDirSection()
924 p[26] = (u_char)dirent.head; in readDosDirSection()
925 p[27] = (u_char)(dirent.head >> 8); in readDosDirSection()
927 p[20] = (u_char)(dirent.head >> 16); in readDosDirSection()
928 p[21] = (u_char)(dirent.head >> 24); in readDosDirSection()
941 if (dirent.head == dir->head) { in readDosDirSection()
943 dirent.name, fullpath(dir)); in readDosDirSection()
951 &dirent) & FSERROR) == FSERROR) { in readDosDirSection()
973 memcpy(d, &dirent, sizeof(struct dosDirEntry)); in readDosDirSection()
986 mod |= k = checksize(fat, p, &dirent); in readDosDirSection()