np 66 usr/lib/libc/stdlib/getenv.c const char *np; np 71 usr/lib/libc/stdlib/getenv.c for (np = name; *np && *np != '='; ++np) np 73 usr/lib/libc/stdlib/getenv.c len = np - name; np 81 usr/server/fs/fatfs/fatfs_node.c struct fatfs_node *np) np 99 usr/server/fs/fatfs/fatfs_node.c *(&np->dirent) = *de; np 100 usr/server/fs/fatfs/fatfs_node.c np->sector = sec; np 101 usr/server/fs/fatfs/fatfs_node.c np->offset = sizeof(struct fat_dirent) * i; np 121 usr/server/fs/fatfs/fatfs_node.c fatfs_lookup_node(vnode_t dvp, char *name, struct fatfs_node *np) np 141 usr/server/fs/fatfs/fatfs_node.c error = fat_lookup_dirent(fmp, sec, fat_name, np); np 151 usr/server/fs/fatfs/fatfs_node.c np); np 176 usr/server/fs/fatfs/fatfs_node.c struct fatfs_node *np) np 192 usr/server/fs/fatfs/fatfs_node.c *(&np->dirent) = *de; np 193 usr/server/fs/fatfs/fatfs_node.c np->sector = sec; np 194 usr/server/fs/fatfs/fatfs_node.c np->offset = sizeof(struct fat_dirent) * i; np 214 usr/server/fs/fatfs/fatfs_node.c fatfs_get_node(vnode_t dvp, int index, struct fatfs_node *np) np 229 usr/server/fs/fatfs/fatfs_node.c error = fat_get_dirent(fmp, sec, index, &cur_index, np); np 239 usr/server/fs/fatfs/fatfs_node.c &cur_index, np); np 260 usr/server/fs/fatfs/fatfs_node.c fat_add_dirent(struct fatfsmount *fmp, u_long sec, struct fatfs_node *np) np 280 usr/server/fs/fatfs/fatfs_node.c memcpy(de, &np->dirent, sizeof(struct fat_dirent)); np 292 usr/server/fs/fatfs/fatfs_node.c fatfs_add_node(vnode_t dvp, struct fatfs_node *np) np 307 usr/server/fs/fatfs/fatfs_node.c error = fat_add_dirent(fmp, sec, np); np 316 usr/server/fs/fatfs/fatfs_node.c error = fat_add_dirent(fmp, sec, np); np 343 usr/server/fs/fatfs/fatfs_node.c error = fat_add_dirent(fmp, sec, np); np 355 usr/server/fs/fatfs/fatfs_node.c fatfs_put_node(struct fatfsmount *fmp, struct fatfs_node *np) np 359 usr/server/fs/fatfs/fatfs_node.c error = fat_read_dirent(fmp, np->sector); np 363 usr/server/fs/fatfs/fatfs_node.c memcpy(fmp->dir_buf + np->offset, &np->dirent, np 366 usr/server/fs/fatfs/fatfs_node.c error = fat_write_dirent(fmp, np->sector); np 202 usr/server/fs/fatfs/fatfs_vfsops.c struct fatfs_node *np; np 204 usr/server/fs/fatfs/fatfs_vfsops.c np = malloc(sizeof(struct fatfs_node)); np 205 usr/server/fs/fatfs/fatfs_vfsops.c if (np == NULL) np 207 usr/server/fs/fatfs/fatfs_vfsops.c vp->v_data = np; np 134 usr/server/fs/fatfs/fatfs_vnops.c struct fatfs_node *np; np 145 usr/server/fs/fatfs/fatfs_vnops.c np = vp->v_data; np 146 usr/server/fs/fatfs/fatfs_vnops.c error = fatfs_lookup_node(dvp, name, np); np 152 usr/server/fs/fatfs/fatfs_vnops.c de = &np->dirent; np 239 usr/server/fs/fatfs/fatfs_vnops.c struct fatfs_node *np; np 270 usr/server/fs/fatfs/fatfs_vnops.c np = vp->v_data; np 271 usr/server/fs/fatfs/fatfs_vnops.c de = &np->dirent; np 273 usr/server/fs/fatfs/fatfs_vnops.c error = fatfs_put_node(fmp, np); np 342 usr/server/fs/fatfs/fatfs_vnops.c struct fatfs_node np; np 349 usr/server/fs/fatfs/fatfs_vnops.c error = fatfs_get_node(vp, fp->f_offset, &np); np 352 usr/server/fs/fatfs/fatfs_vnops.c de = &np.dirent; np 379 usr/server/fs/fatfs/fatfs_vnops.c struct fatfs_node np; np 400 usr/server/fs/fatfs/fatfs_vnops.c de = &np.dirent; np 407 usr/server/fs/fatfs/fatfs_vnops.c error = fatfs_add_node(dvp, &np); np 420 usr/server/fs/fatfs/fatfs_vnops.c struct fatfs_node np; np 430 usr/server/fs/fatfs/fatfs_vnops.c error = fatfs_lookup_node(dvp, name, &np); np 433 usr/server/fs/fatfs/fatfs_vnops.c de = &np.dirent; np 450 usr/server/fs/fatfs/fatfs_vnops.c error = fatfs_put_node(fmp, &np); np 556 usr/server/fs/fatfs/fatfs_vnops.c struct fatfs_node np; np 575 usr/server/fs/fatfs/fatfs_vnops.c memset(&np, 0, sizeof(struct fatfs_node)); np 576 usr/server/fs/fatfs/fatfs_vnops.c de = &np.dirent; np 582 usr/server/fs/fatfs/fatfs_vnops.c error = fatfs_add_node(dvp, &np); np 620 usr/server/fs/fatfs/fatfs_vnops.c struct fatfs_node np; np 630 usr/server/fs/fatfs/fatfs_vnops.c error = fatfs_lookup_node(dvp, name, &np); np 634 usr/server/fs/fatfs/fatfs_vnops.c de = &np.dirent; np 648 usr/server/fs/fatfs/fatfs_vnops.c error = fatfs_put_node(fmp, &np); np 681 usr/server/fs/fatfs/fatfs_vnops.c struct fatfs_node *np; np 688 usr/server/fs/fatfs/fatfs_vnops.c np = vp->v_data; np 689 usr/server/fs/fatfs/fatfs_vnops.c de = &np->dirent; np 706 usr/server/fs/fatfs/fatfs_vnops.c error = fatfs_put_node(fmp, np); np 144 usr/server/fs/fifofs/fifo_vnops.c struct fifo_node *np = vp->v_data; np 155 usr/server/fs/fifofs/fifo_vnops.c if (np->fn_readers == 0 && np->fn_writers > 0) np 157 usr/server/fs/fifofs/fifo_vnops.c np->fn_readers++; np 160 usr/server/fs/fifofs/fifo_vnops.c if (np->fn_writers == 0 && np->fn_readers > 0) np 162 usr/server/fs/fifofs/fifo_vnops.c np->fn_writers++; np 171 usr/server/fs/fifofs/fifo_vnops.c while (np->fn_writers == 0) np 177 usr/server/fs/fifofs/fifo_vnops.c if (np->fn_readers == 0) np 180 usr/server/fs/fifofs/fifo_vnops.c while (np->fn_readers == 0) np 190 usr/server/fs/fifofs/fifo_vnops.c struct fifo_node *np = vp->v_data; np 194 usr/server/fs/fifofs/fifo_vnops.c if (np == NULL) np 198 usr/server/fs/fifofs/fifo_vnops.c np->fn_readers--; np 199 usr/server/fs/fifofs/fifo_vnops.c if (np->fn_readers == 0) np 203 usr/server/fs/fifofs/fifo_vnops.c np->fn_writers--; np 204 usr/server/fs/fifofs/fifo_vnops.c if (np->fn_writers == 0) np 211 usr/server/fs/fifofs/fifo_vnops.c if (!strncmp(np->fn_name, "pipe", 4)) { np 221 usr/server/fs/fifofs/fifo_vnops.c struct fifo_node *np = vp->v_data; np 230 usr/server/fs/fifofs/fifo_vnops.c while (np->fn_size == 0) { np 234 usr/server/fs/fifofs/fifo_vnops.c if (np->fn_writers == 0) { np 246 usr/server/fs/fifofs/fifo_vnops.c nbytes = (np->fn_size < size) ? np->fn_size : size; np 247 usr/server/fs/fifofs/fifo_vnops.c np->fn_size -= nbytes; np 250 usr/server/fs/fifofs/fifo_vnops.c pos = np->fn_start; np 252 usr/server/fs/fifofs/fifo_vnops.c *p++ = np->fn_buf[pos]; np 257 usr/server/fs/fifofs/fifo_vnops.c np->fn_start = pos; np 266 usr/server/fs/fifofs/fifo_vnops.c struct fifo_node *np = vp->v_data; np 278 usr/server/fs/fifofs/fifo_vnops.c while (np->fn_size >= PIPE_BUF) np 284 usr/server/fs/fifofs/fifo_vnops.c nfree = PIPE_BUF - np->fn_size; np 287 usr/server/fs/fifofs/fifo_vnops.c pos = np->fn_start + np->fn_size; np 290 usr/server/fs/fifofs/fifo_vnops.c np->fn_size += nbytes; np 293 usr/server/fs/fifofs/fifo_vnops.c np->fn_buf[pos] = *p++; np 320 usr/server/fs/fifofs/fifo_vnops.c struct fifo_node *np = NULL; np 333 usr/server/fs/fifofs/fifo_vnops.c np = list_entry(n, struct fifo_node, fn_link); np 334 usr/server/fs/fifofs/fifo_vnops.c if (strcmp(name, np->fn_name) == 0) { np 343 usr/server/fs/fifofs/fifo_vnops.c vp->v_data = np; np 354 usr/server/fs/fifofs/fifo_vnops.c struct fifo_node *np; np 364 usr/server/fs/fifofs/fifo_vnops.c if ((np = malloc(sizeof(struct fifo_node))) == NULL) np 367 usr/server/fs/fifofs/fifo_vnops.c if ((np->fn_buf = malloc(PIPE_BUF)) == NULL) { np 368 usr/server/fs/fifofs/fifo_vnops.c free(np); np 372 usr/server/fs/fifofs/fifo_vnops.c np->fn_name = malloc(len); np 373 usr/server/fs/fifofs/fifo_vnops.c if (np->fn_name == NULL) { np 374 usr/server/fs/fifofs/fifo_vnops.c free(np->fn_buf); np 375 usr/server/fs/fifofs/fifo_vnops.c free(np); np 379 usr/server/fs/fifofs/fifo_vnops.c strlcpy(np->fn_name, name, len); np 380 usr/server/fs/fifofs/fifo_vnops.c mutex_init(&np->fn_rmtx); np 381 usr/server/fs/fifofs/fifo_vnops.c mutex_init(&np->fn_wmtx); np 382 usr/server/fs/fifofs/fifo_vnops.c cond_init(&np->fn_rcond); np 383 usr/server/fs/fifofs/fifo_vnops.c cond_init(&np->fn_wcond); np 384 usr/server/fs/fifofs/fifo_vnops.c np->fn_readers = 0; np 385 usr/server/fs/fifofs/fifo_vnops.c np->fn_writers = 0; np 386 usr/server/fs/fifofs/fifo_vnops.c np->fn_start = 0; np 387 usr/server/fs/fifofs/fifo_vnops.c np->fn_size = 0; np 390 usr/server/fs/fifofs/fifo_vnops.c list_insert(&fifo_head, &np->fn_link); np 398 usr/server/fs/fifofs/fifo_vnops.c struct fifo_node *np = vp->v_data; np 401 usr/server/fs/fifofs/fifo_vnops.c list_remove(&np->fn_link); np 404 usr/server/fs/fifofs/fifo_vnops.c free(np->fn_name); np 405 usr/server/fs/fifofs/fifo_vnops.c free(np->fn_buf); np 406 usr/server/fs/fifofs/fifo_vnops.c free(np); np 426 usr/server/fs/fifofs/fifo_vnops.c struct fifo_node *np; np 440 usr/server/fs/fifofs/fifo_vnops.c np = NULL; np 444 usr/server/fs/fifofs/fifo_vnops.c np = list_entry(n, struct fifo_node, fn_link); np 448 usr/server/fs/fifofs/fifo_vnops.c if (np == NULL) { np 453 usr/server/fs/fifofs/fifo_vnops.c strlcpy((char *)&dir->d_name, np->fn_name, np 476 usr/server/fs/fifofs/fifo_vnops.c struct fifo_node *np = vp->v_data; np 478 usr/server/fs/fifofs/fifo_vnops.c DPRINTF(("wait_reader: %x\n", np)); np 480 usr/server/fs/fifofs/fifo_vnops.c mutex_lock(&np->fn_rmtx); np 481 usr/server/fs/fifofs/fifo_vnops.c cond_wait(&np->fn_rcond, &np->fn_rmtx); np 482 usr/server/fs/fifofs/fifo_vnops.c mutex_unlock(&np->fn_rmtx); np 489 usr/server/fs/fifofs/fifo_vnops.c struct fifo_node *np = vp->v_data; np 491 usr/server/fs/fifofs/fifo_vnops.c DPRINTF(("wakeup_writer: %x\n", np)); np 492 usr/server/fs/fifofs/fifo_vnops.c cond_broadcast(&np->fn_rcond); np 498 usr/server/fs/fifofs/fifo_vnops.c struct fifo_node *np = vp->v_data; np 500 usr/server/fs/fifofs/fifo_vnops.c DPRINTF(("wait_writer: %x\n", np)); np 502 usr/server/fs/fifofs/fifo_vnops.c mutex_lock(&np->fn_wmtx); np 503 usr/server/fs/fifofs/fifo_vnops.c cond_wait(&np->fn_wcond, &np->fn_wmtx); np 504 usr/server/fs/fifofs/fifo_vnops.c mutex_unlock(&np->fn_wmtx); np 511 usr/server/fs/fifofs/fifo_vnops.c struct fifo_node *np = vp->v_data; np 513 usr/server/fs/fifofs/fifo_vnops.c DPRINTF(("wakeup_reader: %x\n", np)); np 514 usr/server/fs/fifofs/fifo_vnops.c cond_broadcast(&np->fn_wcond); np 63 usr/server/fs/ramfs/ramfs_vfsops.c struct ramfs_node *np; np 68 usr/server/fs/ramfs/ramfs_vfsops.c np = ramfs_allocate_node("/", VDIR); np 69 usr/server/fs/ramfs/ramfs_vfsops.c if (np == NULL) np 71 usr/server/fs/ramfs/ramfs_vfsops.c mp->m_root->v_data = np; np 101 usr/server/fs/ramfs/ramfs_vnops.c struct ramfs_node *np; np 103 usr/server/fs/ramfs/ramfs_vnops.c np = malloc(sizeof(struct ramfs_node)); np 104 usr/server/fs/ramfs/ramfs_vnops.c if (np == NULL) np 106 usr/server/fs/ramfs/ramfs_vnops.c memset(np, 0, sizeof(struct ramfs_node)); np 108 usr/server/fs/ramfs/ramfs_vnops.c np->rn_namelen = strlen(name); np 109 usr/server/fs/ramfs/ramfs_vnops.c np->rn_name = malloc(np->rn_namelen + 1); np 110 usr/server/fs/ramfs/ramfs_vnops.c if (np->rn_name == NULL) { np 111 usr/server/fs/ramfs/ramfs_vnops.c free(np); np 114 usr/server/fs/ramfs/ramfs_vnops.c strlcpy(np->rn_name, name, np->rn_namelen + 1); np 115 usr/server/fs/ramfs/ramfs_vnops.c np->rn_type = type; np 116 usr/server/fs/ramfs/ramfs_vnops.c return np; np 120 usr/server/fs/ramfs/ramfs_vnops.c ramfs_free_node(struct ramfs_node *np) np 123 usr/server/fs/ramfs/ramfs_vnops.c free(np->rn_name); np 124 usr/server/fs/ramfs/ramfs_vnops.c free(np); np 130 usr/server/fs/ramfs/ramfs_vnops.c struct ramfs_node *np, *prev; np 132 usr/server/fs/ramfs/ramfs_vnops.c np = ramfs_allocate_node(name, type); np 133 usr/server/fs/ramfs/ramfs_vnops.c if (np == NULL) np 140 usr/server/fs/ramfs/ramfs_vnops.c dnp->rn_child = np; np 145 usr/server/fs/ramfs/ramfs_vnops.c prev->rn_next = np; np 148 usr/server/fs/ramfs/ramfs_vnops.c return np; np 152 usr/server/fs/ramfs/ramfs_vnops.c ramfs_remove_node(struct ramfs_node *dnp, struct ramfs_node *np) np 162 usr/server/fs/ramfs/ramfs_vnops.c if (dnp->rn_child == np) { np 163 usr/server/fs/ramfs/ramfs_vnops.c dnp->rn_child = np->rn_next; np 165 usr/server/fs/ramfs/ramfs_vnops.c for (prev = dnp->rn_child; prev->rn_next != np; np 172 usr/server/fs/ramfs/ramfs_vnops.c prev->rn_next = np->rn_next; np 174 usr/server/fs/ramfs/ramfs_vnops.c ramfs_free_node(np); np 181 usr/server/fs/ramfs/ramfs_vnops.c ramfs_rename_node(struct ramfs_node *np, char *name) np 187 usr/server/fs/ramfs/ramfs_vnops.c if (len <= np->rn_namelen) { np 189 usr/server/fs/ramfs/ramfs_vnops.c strlcpy(np->rn_name, name, sizeof(np->rn_name)); np 196 usr/server/fs/ramfs/ramfs_vnops.c free(np->rn_name); np 197 usr/server/fs/ramfs/ramfs_vnops.c np->rn_name = tmp; np 199 usr/server/fs/ramfs/ramfs_vnops.c np->rn_namelen = len; np 206 usr/server/fs/ramfs/ramfs_vnops.c struct ramfs_node *np, *dnp; np 218 usr/server/fs/ramfs/ramfs_vnops.c for (np = dnp->rn_child; np != NULL; np = np->rn_next) { np 219 usr/server/fs/ramfs/ramfs_vnops.c if (np->rn_namelen == len && np 220 usr/server/fs/ramfs/ramfs_vnops.c memcmp(name, np->rn_name, len) == 0) { np 229 usr/server/fs/ramfs/ramfs_vnops.c vp->v_data = np; np 231 usr/server/fs/ramfs/ramfs_vnops.c vp->v_type = np->rn_type; np 232 usr/server/fs/ramfs/ramfs_vnops.c vp->v_size = np->rn_size; np 241 usr/server/fs/ramfs/ramfs_vnops.c struct ramfs_node *np; np 247 usr/server/fs/ramfs/ramfs_vnops.c np = ramfs_add_node(dvp->v_data, name, VDIR); np 248 usr/server/fs/ramfs/ramfs_vnops.c if (np == NULL) np 250 usr/server/fs/ramfs/ramfs_vnops.c np->rn_size = 0; np 266 usr/server/fs/ramfs/ramfs_vnops.c struct ramfs_node *np; np 274 usr/server/fs/ramfs/ramfs_vnops.c np = vp->v_data; np 275 usr/server/fs/ramfs/ramfs_vnops.c if (np->rn_buf != NULL) np 276 usr/server/fs/ramfs/ramfs_vnops.c vm_free(task_self(), np->rn_buf); np 284 usr/server/fs/ramfs/ramfs_vnops.c struct ramfs_node *np; np 290 usr/server/fs/ramfs/ramfs_vnops.c np = vp->v_data; np 293 usr/server/fs/ramfs/ramfs_vnops.c if (np->rn_buf != NULL) { np 294 usr/server/fs/ramfs/ramfs_vnops.c vm_free(task_self(), np->rn_buf); np 295 usr/server/fs/ramfs/ramfs_vnops.c np->rn_buf = NULL; np 296 usr/server/fs/ramfs/ramfs_vnops.c np->rn_bufsize = 0; np 298 usr/server/fs/ramfs/ramfs_vnops.c } else if (length > np->rn_bufsize) { np 303 usr/server/fs/ramfs/ramfs_vnops.c if (np->rn_size != 0) { np 304 usr/server/fs/ramfs/ramfs_vnops.c memcpy(new_buf, np->rn_buf, vp->v_size); np 305 usr/server/fs/ramfs/ramfs_vnops.c vm_free(task, np->rn_buf); np 307 usr/server/fs/ramfs/ramfs_vnops.c np->rn_buf = new_buf; np 308 usr/server/fs/ramfs/ramfs_vnops.c np->rn_bufsize = new_size; np 310 usr/server/fs/ramfs/ramfs_vnops.c np->rn_size = length; np 321 usr/server/fs/ramfs/ramfs_vnops.c struct ramfs_node *np; np 327 usr/server/fs/ramfs/ramfs_vnops.c np = ramfs_add_node(dvp->v_data, name, VREG); np 328 usr/server/fs/ramfs/ramfs_vnops.c if (np == NULL) np 336 usr/server/fs/ramfs/ramfs_vnops.c struct ramfs_node *np; np 352 usr/server/fs/ramfs/ramfs_vnops.c np = vp->v_data; np 353 usr/server/fs/ramfs/ramfs_vnops.c memcpy(buf, np->rn_buf + off, size); np 363 usr/server/fs/ramfs/ramfs_vnops.c struct ramfs_node *np; np 375 usr/server/fs/ramfs/ramfs_vnops.c np = vp->v_data; np 382 usr/server/fs/ramfs/ramfs_vnops.c if (end_pos > (off_t)np->rn_bufsize) { np 394 usr/server/fs/ramfs/ramfs_vnops.c if (np->rn_size != 0) { np 395 usr/server/fs/ramfs/ramfs_vnops.c memcpy(new_buf, np->rn_buf, vp->v_size); np 396 usr/server/fs/ramfs/ramfs_vnops.c vm_free(task, np->rn_buf); np 398 usr/server/fs/ramfs/ramfs_vnops.c np->rn_buf = new_buf; np 399 usr/server/fs/ramfs/ramfs_vnops.c np->rn_bufsize = new_size; np 401 usr/server/fs/ramfs/ramfs_vnops.c np->rn_size = end_pos; np 404 usr/server/fs/ramfs/ramfs_vnops.c memcpy(np->rn_buf + file_pos, buf, size); np 414 usr/server/fs/ramfs/ramfs_vnops.c struct ramfs_node *np, *old_np; np 432 usr/server/fs/ramfs/ramfs_vnops.c np = ramfs_add_node(dvp2->v_data, name2, VREG); np 433 usr/server/fs/ramfs/ramfs_vnops.c if (np == NULL) np 438 usr/server/fs/ramfs/ramfs_vnops.c np->rn_buf = old_np->rn_buf; np 439 usr/server/fs/ramfs/ramfs_vnops.c np->rn_size = old_np->rn_size; np 440 usr/server/fs/ramfs/ramfs_vnops.c np->rn_bufsize = old_np->rn_bufsize; np 454 usr/server/fs/ramfs/ramfs_vnops.c struct ramfs_node *np, *dnp; np 467 usr/server/fs/ramfs/ramfs_vnops.c np = dnp->rn_child; np 468 usr/server/fs/ramfs/ramfs_vnops.c if (np == NULL) { np 474 usr/server/fs/ramfs/ramfs_vnops.c np = np->rn_next; np 475 usr/server/fs/ramfs/ramfs_vnops.c if (np == NULL) { np 480 usr/server/fs/ramfs/ramfs_vnops.c if (np->rn_type == VDIR) np 484 usr/server/fs/ramfs/ramfs_vnops.c strlcpy((char *)&dir->d_name, np->rn_name,