Lines Matching refs:dirent

550 	struct dosDirEntry dirent, *d;  in readDosDirSection()  local
747 memset(&dirent, 0, sizeof dirent); in readDosDirSection()
753 dirent.flags = p[11]; in readDosDirSection()
759 dirent.name[j] = p[j]; in readDosDirSection()
760 dirent.name[8] = '\0'; in readDosDirSection()
761 for (k = 7; k >= 0 && dirent.name[k] == ' '; k--) in readDosDirSection()
762 dirent.name[k] = '\0'; in readDosDirSection()
763 if (k < 0 || dirent.name[k] != '\0') in readDosDirSection()
765 if (dirent.name[0] == SLOT_E5) in readDosDirSection()
766 dirent.name[0] = 0xe5; in readDosDirSection()
768 if (dirent.flags & ATTR_VOLUME) { in readDosDirSection()
781 dirent.name[k++] = '.'; in readDosDirSection()
783 dirent.name[k++] = p[j+8]; in readDosDirSection()
784 dirent.name[k] = '\0'; in readDosDirSection()
785 for (k--; k >= 0 && dirent.name[k] == ' '; k--) in readDosDirSection()
786 dirent.name[k] = '\0'; in readDosDirSection()
795 dirent.head = p[26] | (p[27] << 8); in readDosDirSection()
797 dirent.head |= (p[20] << 16) | (p[21] << 24); in readDosDirSection()
798 dirent.size = p[28] | (p[29] << 8) | (p[30] << 16) | (p[31] << 24); in readDosDirSection()
800 strlcpy(dirent.lname, longName, in readDosDirSection()
801 sizeof(dirent.lname)); in readDosDirSection()
806 dirent.parent = dir; in readDosDirSection()
807 dirent.next = dir->child; in readDosDirSection()
813 fullpath(&dirent), 0); in readDosDirSection()
845 if (!(dirent.flags & ATTR_DIRECTORY) || in readDosDirSection()
846 (strcmp(dirent.name, ".") != 0 && in readDosDirSection()
847 strcmp(dirent.name, "..") != 0)) { in readDosDirSection()
848 if ((dirent.size != 0 || (dirent.flags & ATTR_DIRECTORY)) && in readDosDirSection()
849 ((!fat_is_valid_cl(fat, dirent.head) || in readDosDirSection()
850 !fat_is_cl_head(fat, dirent.head)))) { in readDosDirSection()
851 if (!fat_is_valid_cl(fat, dirent.head)) { in readDosDirSection()
853 fullpath(&dirent), in readDosDirSection()
854 dirent.head); in readDosDirSection()
857 fullpath(&dirent)); in readDosDirSection()
860 if (dirent.flags & ATTR_DIRECTORY) { in readDosDirSection()
873 dirent.size = 0; in readDosDirSection()
874 dirent.head = 0; in readDosDirSection()
881 if (dirent.flags & ATTR_DIRECTORY) { in readDosDirSection()
887 if (dirent.size) { in readDosDirSection()
889 fullpath(&dirent)); in readDosDirSection()
892 dirent.size = 0; in readDosDirSection()
900 if (strcmp(dirent.name, ".") == 0) { in readDosDirSection()
901 if (dirent.head != dir->head) { in readDosDirSection()
905 dirent.head = dir->head; in readDosDirSection()
906 p[26] = (u_char)dirent.head; in readDosDirSection()
907 p[27] = (u_char)(dirent.head >> 8); in readDosDirSection()
909 p[20] = (u_char)(dirent.head >> 16); in readDosDirSection()
910 p[21] = (u_char)(dirent.head >> 24); in readDosDirSection()
917 } else if (strcmp(dirent.name, "..") == 0) { in readDosDirSection()
920 if (dirent.head) { in readDosDirSection()
924 dirent.head = 0; in readDosDirSection()
932 } else if (dirent.head != dir->parent->head) { in readDosDirSection()
936 dirent.head = dir->parent->head; in readDosDirSection()
937 p[26] = (u_char)dirent.head; in readDosDirSection()
938 p[27] = (u_char)(dirent.head >> 8); in readDosDirSection()
940 p[20] = (u_char)(dirent.head >> 16); in readDosDirSection()
941 p[21] = (u_char)(dirent.head >> 24); in readDosDirSection()
954 if (dirent.head == dir->head) { in readDosDirSection()
956 dirent.name, fullpath(dir)); in readDosDirSection()
964 &dirent) & FSERROR) == FSERROR) { in readDosDirSection()
986 memcpy(d, &dirent, sizeof(struct dosDirEntry)); in readDosDirSection()
999 mod |= k = checksize(fat, p, &dirent); in readDosDirSection()