• Home
  • Raw
  • Download

Lines Matching refs:dirent

528 	struct dosDirEntry dirent, *d;  in readDosDirSection()  local
691 memset(&dirent, 0, sizeof dirent); in readDosDirSection()
697 dirent.flags = p[11]; in readDosDirSection()
703 dirent.name[j] = p[j]; in readDosDirSection()
704 dirent.name[8] = '\0'; in readDosDirSection()
705 for (k = 7; k >= 0 && dirent.name[k] == ' '; k--) in readDosDirSection()
706 dirent.name[k] = '\0'; in readDosDirSection()
707 if (dirent.name[k] != '\0') in readDosDirSection()
709 if (dirent.name[0] == SLOT_E5) in readDosDirSection()
710 dirent.name[0] = 0xe5; in readDosDirSection()
712 if (dirent.flags & ATTR_VOLUME) { in readDosDirSection()
725 dirent.name[k++] = '.'; in readDosDirSection()
727 dirent.name[k++] = p[j+8]; in readDosDirSection()
728 dirent.name[k] = '\0'; in readDosDirSection()
729 for (k--; k >= 0 && dirent.name[k] == ' '; k--) in readDosDirSection()
730 dirent.name[k] = '\0'; in readDosDirSection()
739 dirent.head = p[26] | (p[27] << 8); in readDosDirSection()
741 dirent.head |= (p[20] << 16) | (p[21] << 24); in readDosDirSection()
742 dirent.size = p[28] | (p[29] << 8) | (p[30] << 16) | (p[31] << 24); in readDosDirSection()
744 strcpy(dirent.lname, longName); in readDosDirSection()
749 dirent.parent = dir; in readDosDirSection()
750 dirent.next = dir->child; in readDosDirSection()
756 fullpath(&dirent), 0); in readDosDirSection()
769 if (dirent.size == 0 && !(dirent.flags & ATTR_DIRECTORY)) { in readDosDirSection()
770 if (dirent.head != 0) { in readDosDirSection()
772 fullpath(&dirent)); in readDosDirSection()
777 clearchain(boot, fat, dirent.head); in readDosDirSection()
778 dirent.head = 0; in readDosDirSection()
783 } else if (dirent.head == 0 in readDosDirSection()
784 && !strcmp(dirent.name, "..") in readDosDirSection()
790 } else if (dirent.head < CLUST_FIRST in readDosDirSection()
791 || dirent.head >= boot->NumClusters in readDosDirSection()
792 || fat[dirent.head].next == CLUST_FREE in readDosDirSection()
793 || (fat[dirent.head].next >= CLUST_RSRVD in readDosDirSection()
794 && fat[dirent.head].next < CLUST_EOFS) in readDosDirSection()
795 || fat[dirent.head].head != dirent.head) { in readDosDirSection()
796 if (dirent.head == 0) in readDosDirSection()
798 fullpath(&dirent)); in readDosDirSection()
799 else if (dirent.head < CLUST_FIRST in readDosDirSection()
800 || dirent.head >= boot->NumClusters) in readDosDirSection()
802 fullpath(&dirent), in readDosDirSection()
803 dirent.head); in readDosDirSection()
804 else if (fat[dirent.head].next == CLUST_FREE) in readDosDirSection()
806 fullpath(&dirent)); in readDosDirSection()
807 else if (fat[dirent.head].next >= CLUST_RSRVD) in readDosDirSection()
809 fullpath(&dirent), in readDosDirSection()
810 rsrvdcltype(fat[dirent.head].next)); in readDosDirSection()
813 fullpath(&dirent)); in readDosDirSection()
814 if (dirent.flags & ATTR_DIRECTORY) { in readDosDirSection()
827 dirent.size = 0; in readDosDirSection()
834 if (dirent.head >= CLUST_FIRST && dirent.head < boot->NumClusters) in readDosDirSection()
835 fat[dirent.head].flags |= FAT_USED; in readDosDirSection()
837 if (dirent.flags & ATTR_DIRECTORY) { in readDosDirSection()
843 if (dirent.size) { in readDosDirSection()
845 fullpath(&dirent)); in readDosDirSection()
848 dirent.size = 0; in readDosDirSection()
856 if (strcmp(dirent.name, ".") == 0) { in readDosDirSection()
857 if (dirent.head != dir->head) { in readDosDirSection()
861 dirent.head = dir->head; in readDosDirSection()
862 p[26] = (u_char)dirent.head; in readDosDirSection()
863 p[27] = (u_char)(dirent.head >> 8); in readDosDirSection()
865 p[20] = (u_char)(dirent.head >> 16); in readDosDirSection()
866 p[21] = (u_char)(dirent.head >> 24); in readDosDirSection()
873 } else if (strcmp(dirent.name, "..") == 0) { in readDosDirSection()
876 if (dirent.head) { in readDosDirSection()
880 dirent.head = 0; in readDosDirSection()
888 } else if (dirent.head != dir->parent->head) { in readDosDirSection()
892 dirent.head = dir->parent->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()
906 if (dirent.head == dir->head) { in readDosDirSection()
908 dirent.name, fullpath(dir)); in readDosDirSection()
921 if (check_dot_dot(f,boot,fat,&dirent)) { in readDosDirSection()
937 memcpy(d, &dirent, sizeof(struct dosDirEntry)); in readDosDirSection()
953 mod |= k = checksize(boot, fat, p, &dirent); in readDosDirSection()