Lines Matching refs:dirp
397 struct direct *dirp = idesc->id_dirp;
418 if (dirp->d_ino != 0 && strcmp(dirp->d_name, ".") == 0) {
419 if (dirp->d_ino != idesc->id_number) {
421 dirp->d_ino = idesc->id_number;
439 if (dirp->d_ino != 0 && strcmp(dirp->d_name, "..") != 0) {
441 dirp->d_name);
443 } else if ((int)dirp->d_reclen < entrysize) {
446 } else if ((int)dirp->d_reclen < 2 * entrysize) {
455 proto.d_reclen = dirp->d_reclen;
456 (void) memmove((void *)dirp, (void *)&proto,
477 reclen = dirp->d_reclen - entrysize;
479 (void) memmove((void *)dirp, (void *)&proto,
491 LINK_RANGE(errmsg, lncntp[dirp->d_ino], -1);
493 LINK_CLEAR(errmsg, dirp->d_ino, IFDIR, &ldesc);
494 if (statemap[dirp->d_ino] == USTATE) {
501 dirp->d_ino = 0;
502 dirp->d_reclen += reclen;
512 dirp = (struct direct *)((char *)(dirp) + entrysize);
513 (void) memset((void *)dirp, 0, (size_t)reclen);
514 dirp->d_reclen = reclen;
566 reclen = DIRSIZ(dirp);
567 if ((int)dirp->d_reclen < reclen + entrysize) {
579 * part, dirp will be pointing at where ".." should be,
583 proto.d_reclen = dirp->d_reclen - reclen;
584 dirp->d_reclen = reclen;
586 if (dirp->d_ino > 0 && dirp->d_ino <= maxino) {
590 LINK_RANGE(errmsg, lncntp[dirp->d_ino], -1);
592 LINK_CLEAR(errmsg, dirp->d_ino, IFDIR, &ldesc);
593 if (statemap[dirp->d_ino] == USTATE) {
603 dirp->d_ino = 0;
604 dirp->d_reclen += proto.d_reclen;
609 TRACK_LNCNTP(dirp->d_ino, lncntp[dirp->d_ino]--);
615 dirp = (struct direct *)((char *)(dirp) + reclen);
616 (void) memset((void *)dirp, 0, (size_t)proto.d_reclen);
617 dirp->d_reclen = proto.d_reclen;
627 fileerror(idesc->id_number, dirp->d_ino,
629 dirp->d_ino = 0;
642 if (dirp->d_ino != 0 && inp->i_dotdot == 0 &&
643 strcmp(dirp->d_name, "..") == 0) {
644 inp->i_dotdot = dirp->d_ino;
647 if (dirp->d_ino != 0 && strcmp(dirp->d_name, "..") != 0) {
650 dirp->d_name);
653 } else if ((int)dirp->d_reclen < entrysize) {
670 proto.d_reclen = dirp->d_reclen;
671 (void) memmove((void *)dirp, (void *)&proto,
689 proto.d_reclen = dirp->d_reclen;
690 (void) memmove((void *)dirp, (void *)&proto, (size_t)entrysize);
698 if (dirp->d_ino != 0) {
699 LINK_RANGE(errmsg, lncntp[dirp->d_ino], -1);
701 LINK_CLEAR(errmsg, dirp->d_ino, IFDIR, &ldesc);
702 if (statemap[dirp->d_ino] == USTATE) {
703 dirp->d_ino = 0;
707 TRACK_LNCNTP(dirp->d_ino, lncntp[dirp->d_ino]--);
711 if (dirp->d_ino == 0)
713 if (dirp->d_namlen <= 2 &&
714 dirp->d_name[0] == '.' &&
716 if (dirp->d_namlen == 1) {
718 dirp->d_ino = 0;
726 if (dirp->d_name[1] == '.') {
728 dirp->d_ino = 0;
752 if (dirp->d_ino > maxino || dirp->d_ino == 0) {
753 fileerror(idesc->id_number, dirp->d_ino, "I OUT OF RANGE");
758 switch (statemap[dirp->d_ino] & ~(INDELAYD)) {
762 fileerror(idesc->id_number, dirp->d_ino, "UNALLOCATED");
771 dp = ginode(dirp->d_ino);
772 if (statemap[dirp->d_ino] == DCLEAR) {
776 inp = getinoinfo(dirp->d_ino);
787 dirp->d_ino);
795 } else if (statemap[dirp->d_ino] == SCLEAR) {
809 fileerror(idesc->id_number, dirp->d_ino, errmsg);
819 dp = ginode(dirp->d_ino);
820 statemap[dirp->d_ino] &= STMASK;
821 TRACK_LNCNTP(dirp->d_ino, lncntp[dirp->d_ino] = 0);
827 statemap[dirp->d_ino] = DFOUND;
838 inp = getinoinfo(dirp->d_ino);
846 dirp->d_ino);
856 dirp->d_ino);
857 getpathname(namebuf, dirp->d_ino, dirp->d_ino);
890 dp = ginode(dirp->d_ino);
894 (strcmp(dirp->d_name, "..") == 0)) {
907 dp = ginode(dirp->d_ino);
913 if (dirp->d_ino == idesc->id_number) {
927 dirp->d_ino,
930 idesc->id_number, dirp->d_ino);
932 dp = ginode(dirp->d_ino);
936 dirp->d_ino,
946 dirp->d_ino,
949 dp = ginode(dirp->d_ino);
978 (strcmp(dirp->d_name, ".") != 0)) {
981 dirp->d_ino,
985 dp = ginode(dirp->d_ino);
989 dirp->d_ino,
1016 dirp->d_ino,
1021 dirp->d_ino);
1036 TRACK_LNCNTP(dirp->d_ino,
1037 lncntp[dirp->d_ino]--);
1045 fileerror(idesc->id_number, dirp->d_ino, errmsg);
1051 statemap[dirp->d_ino], dirp->d_ino);
1074 dirp->d_ino = 0;