Lines Matching refs:fep
560 fent_t *fep;
568 fep = &ftp->fents[ftp->nfiles++];
569 fep->id = id;
570 fep->parent = parent;
700 fent_t *fep;
704 if (i >= 0 && (fep = &flist[FT_DIR].fents[i])->id == dirid)
705 return fep;
736 fent_t *fep;
739 if ((fep = dcache_lookup(dirid)))
740 return fep;
742 for (fep = flp->fents, efep = &fep[flp->nfiles]; fep < efep; fep++) {
743 if (fep->id == dirid) {
744 dcache_enter(dirid, fep - flp->fents);
745 return fep;
792 void fent_to_name(pathname_t * name, flist_t * flp, fent_t * fep)
798 if (fep == NULL)
800 if (fep->parent != -1) {
801 pfep = dirid_to_fent(fep->parent);
805 i = sprintf(buf, "%c%x", flp->tag, fep->id);
806 namerandpad(fep->id, buf, i);
812 fent_t *fep;
818 for (j = 0, fep = flp->fents; j < flp->nfiles; j++, fep++) {
819 if (fep->parent == oldid)
820 fep->parent = newid;
834 int generate_fname(fent_t * fep, int ft, pathname_t * name, int *idp, int *v)
845 if (fep) {
846 fent_to_name(name, &flist[FT_DIR], fep);
866 fent_t *fep;
888 fep = &flp->fents[x - c];
890 fent_to_name(name, flp, fep);
894 *fepp = fep;
897 if (ilist[j] == fep->id) {
1688 fent_t *fep;
1696 if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v1))
1699 parid = fep->id;
1706 e = generate_fname(fep, type, &f, &id, &v);
1710 fent_to_name(&f, &flist[FT_DIR], fep);
2110 fent_t *fep;
2125 if (!get_fname(FT_DIRm, random(), NULL, NULL, &fep, &v))
2128 parid = fep->id;
2131 e = generate_fname(fep, flp - flist, &l, &id, &v1);
2135 fent_to_name(&l, &flist[FT_DIR], fep);
2158 fent_t *fep;
2164 if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))
2167 parid = fep->id;
2169 e = generate_fname(fep, FT_DIR, &f, &id, &v1);
2173 fent_to_name(&f, &flist[FT_DIR], fep);
2193 fent_t *fep;
2199 if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))
2202 parid = fep->id;
2204 e = generate_fname(fep, FT_DEV, &f, &id, &v1);
2208 fent_to_name(&f, &flist[FT_DIR], fep);
2309 fent_t *fep;
2319 if (!get_fname(FT_ANYm, r, &f, &flp, &fep, &v1)) {
2347 oldid = fep->id;
2350 del_from_flist(flp - flist, fep - flp->fents);
2418 fent_t *fep;
2422 if (!get_fname(FT_DIRm, r, &f, NULL, &fep, &v)) {
2431 del_from_flist(FT_DIR, fep - flist[FT_DIR].fents);
2462 fent_t *fep;
2471 if (!get_fname(FT_DIRm, r, NULL, NULL, &fep, &v))
2474 parid = fep->id;
2476 e = generate_fname(fep, FT_SYM, &f, &id, &v1);
2480 fent_to_name(&f, &flist[FT_DIR], fep);
2552 fent_t *fep;
2557 if (!get_fname(FT_NOTDIR, r, &f, &flp, &fep, &v)) {
2566 del_from_flist(flp - flist, fep - flp->fents);