Lines Matching full:np

93 addino(ino_t inum, struct entry *np)  in addino()  argument
100 np->e_ino = inum; in addino()
101 np->e_next = *epp; in addino()
102 *epp = np; in addino()
104 for (np = np->e_next; np != NULL; np = np->e_next) in addino()
105 if (np->e_ino == inum) in addino()
106 badentry(np, "duplicate inum"); in addino()
139 char *np, *cp; in lookupname() local
144 for (np = buf; *cp != '/' && *cp != '\0' && in lookupname()
145 np < &buf[sizeof(buf)]; ) in lookupname()
146 *np++ = *cp++; in lookupname()
147 if (np == &buf[sizeof(buf)]) in lookupname()
149 *np = '\0'; in lookupname()
216 struct entry *np, *ep; in addentry() local
219 np = freelist; in addentry()
220 freelist = np->e_next; in addentry()
221 memset(np, 0, (long)sizeof(struct entry)); in addentry()
223 np = (struct entry *)calloc(1, sizeof(struct entry)); in addentry()
224 if (np == NULL) in addentry()
227 np->e_type = type & ~LINK; in addentry()
232 np->e_name = savename(name); in addentry()
233 np->e_namlen = strlen(name); in addentry()
234 np->e_parent = np; in addentry()
235 addino(UFS_ROOTINO, np); in addentry()
236 return (np); in addentry()
238 np->e_name = savename(strrchr(name, '/') + 1); in addentry()
239 np->e_namlen = strlen(np->e_name); in addentry()
240 np->e_parent = ep; in addentry()
241 np->e_sibling = ep->e_entries; in addentry()
242 ep->e_entries = np; in addentry()
247 np->e_ino = inum; in addentry()
248 np->e_links = ep->e_links; in addentry()
249 ep->e_links = np; in addentry()
253 addino(inum, np); in addentry()
255 return (np); in addentry()
264 struct entry *np; in freeentry() local
276 np = lookupino(ep->e_ino); in freeentry()
277 if (np == NULL) in freeentry()
279 if (np == ep) { in freeentry()
285 for (; np != NULL; np = np->e_links) { in freeentry()
286 if (np->e_links == ep) { in freeentry()
287 np->e_links = ep->e_links; in freeentry()
291 if (np == NULL) in freeentry()
307 struct entry *np; in moveentry() local
310 np = lookupparent(newname); in moveentry()
311 if (np == NULL) in moveentry()
313 if (np != ep->e_parent) { in moveentry()
315 ep->e_parent = np; in moveentry()
316 ep->e_sibling = np->e_entries; in moveentry()
317 np->e_entries = ep; in moveentry()
335 struct entry *np; in removeentry() local
337 np = ep->e_parent; in removeentry()
338 if (np->e_entries == ep) { in removeentry()
339 np->e_entries = ep->e_sibling; in removeentry()
341 for (np = np->e_entries; np != NULL; np = np->e_sibling) { in removeentry()
342 if (np->e_sibling == ep) { in removeentry()
343 np->e_sibling = ep->e_sibling; in removeentry()
347 if (np == NULL) in removeentry()
380 struct strhdr *np; in savename() local
387 np = strtblhdr[len / STRTBLINCR].next; in savename()
388 if (np != NULL) { in savename()
389 strtblhdr[len / STRTBLINCR].next = np->next; in savename()
390 cp = (char *)np; in savename()
407 struct strhdr *tp, *np; in freename() local
410 np = (struct strhdr *)name; in freename()
411 np->next = tp->next; in freename()
412 tp->next = np; in freename()