Lines Matching refs:ep
55 struct entry *ep; in pathcheck() local
65 ep = lookupname(name); in pathcheck()
66 if (ep == NULL) { in pathcheck()
68 ep = addentry(name, pathsearch(name)->d_ino, NODE); in pathcheck()
69 newnode(ep); in pathcheck()
71 ep->e_flags |= NEW|KEEP; in pathcheck()
80 mktempname(struct entry *ep) in mktempname() argument
84 if (ep->e_flags & TMPNAME) in mktempname()
85 badentry(ep, "mktempname: called with TMPNAME"); in mktempname()
86 ep->e_flags |= TMPNAME; in mktempname()
87 (void) strcpy(oldname, myname(ep)); in mktempname()
88 freename(ep->e_name); in mktempname()
89 ep->e_name = savename(gentempname(ep)); in mktempname()
90 ep->e_namlen = strlen(ep->e_name); in mktempname()
91 renameit(oldname, myname(ep)); in mktempname()
98 gentempname(struct entry *ep) in gentempname() argument
104 for (np = lookupino(ep->e_ino); in gentempname()
105 np != NULL && np != ep; np = np->e_links) in gentempname()
108 badentry(ep, "not on ino list"); in gentempname()
109 (void) sprintf(name, "%s%ld%lu", TMPHDR, i, (u_long)ep->e_ino); in gentempname()
150 removenode(struct entry *ep) in removenode() argument
154 if (ep->e_type != NODE) in removenode()
155 badentry(ep, "removenode: not a node"); in removenode()
156 if (ep->e_entries != NULL) in removenode()
157 badentry(ep, "removenode: non-empty directory"); in removenode()
158 ep->e_flags |= REMOVED; in removenode()
159 ep->e_flags &= ~TMPNAME; in removenode()
160 cp = myname(ep); in removenode()
172 removeleaf(struct entry *ep) in removeleaf() argument
176 if (ep->e_type != LEAF) in removeleaf()
177 badentry(ep, "removeleaf: not a leaf"); in removeleaf()
178 ep->e_flags |= REMOVED; in removeleaf()
179 ep->e_flags &= ~TMPNAME; in removeleaf()
180 cp = myname(ep); in removeleaf()
257 delwhiteout(struct entry *ep) in delwhiteout() argument
261 if (ep->e_type != LEAF) in delwhiteout()
262 badentry(ep, "delwhiteout: not a leaf"); in delwhiteout()
263 ep->e_flags |= REMOVED; in delwhiteout()
264 ep->e_flags &= ~TMPNAME; in delwhiteout()
265 name = myname(ep); in delwhiteout()
280 struct entry *ep; in lowerbnd() local
283 ep = lookupino(start); in lowerbnd()
284 if (ep == NULL || ep->e_type == NODE) in lowerbnd()
286 if (ep->e_flags & (NEW|EXTRACT)) in lowerbnd()
298 struct entry *ep; in upperbnd() local
301 ep = lookupino(start); in upperbnd()
302 if (ep == NULL || ep->e_type == NODE) in upperbnd()
304 if (ep->e_flags & (NEW|EXTRACT)) in upperbnd()
314 badentry(struct entry *ep, char *msg) in badentry() argument
318 fprintf(stderr, "name: %s\n", myname(ep)); in badentry()
319 fprintf(stderr, "parent name %s\n", myname(ep->e_parent)); in badentry()
320 if (ep->e_sibling != NULL) in badentry()
321 fprintf(stderr, "sibling name: %s\n", myname(ep->e_sibling)); in badentry()
322 if (ep->e_entries != NULL) in badentry()
323 fprintf(stderr, "next entry name: %s\n", myname(ep->e_entries)); in badentry()
324 if (ep->e_links != NULL) in badentry()
325 fprintf(stderr, "next link name: %s\n", myname(ep->e_links)); in badentry()
326 if (ep->e_next != NULL) in badentry()
328 "next hashchain name: %s\n", myname(ep->e_next)); in badentry()
330 ep->e_type == NODE ? "NODE" : "LEAF"); in badentry()
331 fprintf(stderr, "inode number: %lu\n", (u_long)ep->e_ino); in badentry()
332 panic("flags: %s\n", flagvalues(ep)); in badentry()
339 flagvalues(struct entry *ep) in flagvalues() argument
345 if (ep->e_flags & REMOVED) in flagvalues()
347 if (ep->e_flags & TMPNAME) in flagvalues()
349 if (ep->e_flags & EXTRACT) in flagvalues()
351 if (ep->e_flags & NEW) in flagvalues()
353 if (ep->e_flags & KEEP) in flagvalues()
355 if (ep->e_flags & EXISTED) in flagvalues()