• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sbin/fsck_msdosfs/

Lines Matching refs:dirent

539 	struct dosDirEntry dirent, *d;
736 memset(&dirent, 0, sizeof dirent);
742 dirent.flags = p[11];
748 dirent.name[j] = p[j];
749 dirent.name[8] = '\0';
750 for (k = 7; k >= 0 && dirent.name[k] == ' '; k--)
751 dirent.name[k] = '\0';
752 if (k < 0 || dirent.name[k] != '\0')
754 if (dirent.name[0] == SLOT_E5)
755 dirent.name[0] = 0xe5;
757 if (dirent.flags & ATTR_VOLUME) {
770 dirent.name[k++] = '.';
772 dirent.name[k++] = p[j+8];
773 dirent.name[k] = '\0';
774 for (k--; k >= 0 && dirent.name[k] == ' '; k--)
775 dirent.name[k] = '\0';
784 dirent.head = p[26] | (p[27] << 8);
786 dirent.head |= (p[20] << 16) | (p[21] << 24);
787 dirent.size = p[28] | (p[29] << 8) | (p[30] << 16) | (p[31] << 24);
789 strlcpy(dirent.lname, longName,
790 sizeof(dirent.lname));
795 dirent.parent = dir;
796 dirent.next = dir->child;
802 fullpath(&dirent), 0);
834 if (!(dirent.flags & ATTR_DIRECTORY) ||
835 (strcmp(dirent.name, ".") != 0 &&
836 strcmp(dirent.name, "..") != 0)) {
837 if ((dirent.size != 0 || (dirent.flags & ATTR_DIRECTORY)) &&
838 ((!fat_is_valid_cl(fat, dirent.head) ||
839 !fat_is_cl_head(fat, dirent.head)))) {
840 if (!fat_is_valid_cl(fat, dirent.head)) {
842 fullpath(&dirent),
843 dirent.head);
846 fullpath(&dirent));
849 if (dirent.flags & ATTR_DIRECTORY) {
862 dirent.size = 0;
863 dirent.head = 0;
870 if (dirent.flags & ATTR_DIRECTORY) {
876 if (dirent.size) {
878 fullpath(&dirent));
881 dirent.size = 0;
889 if (strcmp(dirent.name, ".") == 0) {
890 if (dirent.head != dir->head) {
894 dirent.head = dir->head;
895 p[26] = (u_char)dirent.head;
896 p[27] = (u_char)(dirent.head >> 8);
898 p[20] = (u_char)(dirent.head >> 16);
899 p[21] = (u_char)(dirent.head >> 24);
906 } else if (strcmp(dirent.name, "..") == 0) {
909 if (dirent.head) {
913 dirent.head = 0;
921 } else if (dirent.head != dir->parent->head) {
925 dirent.head = dir->parent->head;
926 p[26] = (u_char)dirent.head;
927 p[27] = (u_char)(dirent.head >> 8);
929 p[20] = (u_char)(dirent.head >> 16);
930 p[21] = (u_char)(dirent.head >> 24);
943 if (dirent.head == dir->head) {
945 dirent.name, fullpath(dir));
953 &dirent) & FSERROR) == FSERROR) {
975 memcpy(d, &dirent, sizeof(struct dosDirEntry));
988 mod |= k = checksize(fat, p, &dirent);