fd                105 include/ipc/fs.h 	int	fd;			/* file descriptor */
fd                113 include/ipc/fs.h 	int	fd;			/* file descriptor */
fd                123 include/ipc/fs.h 	int	fd;			/* file descriptor */
fd                133 include/ipc/fs.h 	int	fd;			/* file descriptor */
fd                144 include/ipc/fs.h 	int	fd;			/* file descriptor */
fd                153 include/ipc/fs.h 	int	fd;			/* file descriptor */
fd                163 include/ipc/fs.h 	int	fd;			/* file descriptor */
fd                 58 usr/bin/cat/cat.c 	int ch, fd;
fd                 73 usr/bin/cat/cat.c 	fd = fileno(stdin);
fd                 78 usr/bin/cat/cat.c 				fd = fileno(stdin);
fd                 79 usr/bin/cat/cat.c 			else if ((fd = open(*argv, O_RDONLY, 0)) < 0) {
fd                 87 usr/bin/cat/cat.c 		do_cat(fd);
fd                 88 usr/bin/cat/cat.c 		if (fd != fileno(stdin))
fd                 89 usr/bin/cat/cat.c 			(void)close(fd);
fd                204 usr/bin/sh/sh.c 	int fd, argc;
fd                236 usr/bin/sh/sh.c 					fd = open(file, O_WRONLY | O_APPEND);
fd                238 usr/bin/sh/sh.c 					fd = creat(file, 0666);
fd                240 usr/bin/sh/sh.c 				fd = open(file, O_RDONLY);
fd                242 usr/bin/sh/sh.c 			if (fd == -1) {
fd                246 usr/bin/sh/sh.c 			redir[io] = fd;
fd                409 usr/bin/sh/sh.c readline(int fd, char *line, int len)
fd                416 usr/bin/sh/sh.c 		cnt = read(fd, p, 1);
fd                433 usr/bin/sh/sh.c cmdloop(int fd)
fd                443 usr/bin/sh/sh.c 		p = readline(fd, line, sizeof(line));
fd                 93 usr/bin/touch/touch.c 	int fd;
fd                 97 usr/bin/touch/touch.c 			if ((fd = creat(file, 0666)) < 0)
fd                 99 usr/bin/touch/touch.c 			close(fd);
fd                103 usr/bin/touch/touch.c 	if ((fd = open(file, 2)) < 0)
fd                106 usr/bin/touch/touch.c 	close(fd);
fd                 61 usr/lib/libc/gen/fts.c #define	FCHDIR(sp, fd)	(!ISSET(FTS_NOCHDIR) && fchdir(fd))
fd                459 usr/lib/libc/gen/fts.c 	int fd;
fd                512 usr/lib/libc/gen/fts.c 	if ((fd = open(".", O_RDONLY, 0)) < 0)
fd                515 usr/lib/libc/gen/fts.c 	if (fchdir(fd))
fd                517 usr/lib/libc/gen/fts.c 	(void)close(fd);
fd                 41 usr/lib/libc/stdio/fdopen.c fdopen(fd, mode)
fd                 42 usr/lib/libc/stdio/fdopen.c 	int fd;
fd                 52 usr/lib/libc/stdio/fdopen.c 	if ((fdflags = fcntl(fd, F_GETFL, 0)) < 0)
fd                 70 usr/lib/libc/stdio/fdopen.c 	fp->_file = fd;
fd                 44 usr/lib/libc/stdio/mktemp.c 	int fd;
fd                 46 usr/lib/libc/stdio/mktemp.c 	return (_gettemp(path, &fd) ? fd : -1);
fd                 46 usr/lib/libc/stdio/tmpfile.c 	int fd, sverrno;
fd                 56 usr/lib/libc/stdio/tmpfile.c 	fd = mkstemp(buf);
fd                 57 usr/lib/libc/stdio/tmpfile.c 	if (fd != -1)
fd                 62 usr/lib/libc/stdio/tmpfile.c 	if (fd == -1)
fd                 65 usr/lib/libc/stdio/tmpfile.c 	if ((fp = fdopen(fd, "w+")) == NULL) {
fd                 67 usr/lib/libc/stdio/tmpfile.c 		(void)close(fd);
fd                 37 usr/lib/libc/termios/tcdrain.c tcdrain(fd)
fd                 38 usr/lib/libc/termios/tcdrain.c 	int fd;
fd                 41 usr/lib/libc/termios/tcdrain.c 	return (ioctl(fd, TIOCDRAIN, 0));
fd                 38 usr/lib/libc/termios/tcflow.c tcflow(fd, action)
fd                 39 usr/lib/libc/termios/tcflow.c 	int fd, action;
fd                 46 usr/lib/libc/termios/tcflow.c 		return (ioctl(fd, TIOCSTOP, 0));
fd                 48 usr/lib/libc/termios/tcflow.c 		return (ioctl(fd, TIOCSTART, 0));
fd                 51 usr/lib/libc/termios/tcflow.c 		if (tcgetattr(fd, &term) == -1)
fd                 54 usr/lib/libc/termios/tcflow.c 		if (c != _POSIX_VDISABLE && write(fd, &c, sizeof(c)) == -1)
fd                 41 usr/lib/libc/termios/tcflush.c tcflush(fd, which)
fd                 42 usr/lib/libc/termios/tcflush.c 	int fd, which;
fd                 60 usr/lib/libc/termios/tcflush.c 	return (ioctl(fd, TIOCFLUSH, &com));
fd                 36 usr/lib/libc/termios/tcgetattr.c tcgetattr(fd, t)
fd                 37 usr/lib/libc/termios/tcgetattr.c 	int fd;
fd                 41 usr/lib/libc/termios/tcgetattr.c 	return (ioctl(fd, TIOCGETA, t));
fd                 38 usr/lib/libc/termios/tcgetpgrp.c tcgetpgrp(int fd)
fd                 42 usr/lib/libc/termios/tcgetpgrp.c 	if (ioctl(fd, TIOCGPGRP, &s) < 0)
fd                 37 usr/lib/libc/termios/tcsendbreak.c tcsendbreak(fd, len)
fd                 38 usr/lib/libc/termios/tcsendbreak.c 	int fd, len;
fd                 45 usr/lib/libc/termios/tcsendbreak.c 	if (ioctl(fd, TIOCSBRK, 0) == -1)
fd                 48 usr/lib/libc/termios/tcsendbreak.c 	if (ioctl(fd, TIOCCBRK, 0) == -1)
fd                 39 usr/lib/libc/termios/tcsetattr.c tcsetattr(fd, opt, t)
fd                 40 usr/lib/libc/termios/tcsetattr.c 	int fd, opt;
fd                 52 usr/lib/libc/termios/tcsetattr.c 		return (ioctl(fd, TIOCSETA, t));
fd                 54 usr/lib/libc/termios/tcsetattr.c 		return (ioctl(fd, TIOCSETAW, t));
fd                 56 usr/lib/libc/termios/tcsetattr.c 		return (ioctl(fd, TIOCSETAF, t));
fd                 38 usr/lib/libc/termios/tcsetpgrp.c tcsetpgrp(int fd, pid_t pgrp)
fd                 43 usr/lib/libc/termios/tcsetpgrp.c 	return (ioctl(fd, TIOCSPGRP, &s));
fd                 36 usr/lib/posix/file/close.c close(int fd)
fd                 41 usr/lib/posix/file/close.c 	m.data[0] = fd;
fd                 38 usr/lib/posix/file/fchdir.c fchdir(int fd)
fd                 43 usr/lib/posix/file/fchdir.c 	m.data[0] = fd;
fd                 39 usr/lib/posix/file/fcntl.c fcntl(int fd, int cmd, ...)
fd                 50 usr/lib/posix/file/fcntl.c 	m.fd = fd;
fd                 39 usr/lib/posix/file/fstat.c fstat(int fd, struct stat *st)
fd                 44 usr/lib/posix/file/fstat.c 	m.fd = fd;
fd                 36 usr/lib/posix/file/fsync.c fsync(int fd)
fd                 41 usr/lib/posix/file/fsync.c 	m.data[0] = fd;
fd                 36 usr/lib/posix/file/ftruncate.c ftruncate(int fd, off_t length)
fd                 41 usr/lib/posix/file/ftruncate.c 	m.data[0] = fd;
fd                 40 usr/lib/posix/file/ioctl.c ioctl(int fd, unsigned long cmd, ...)
fd                 81 usr/lib/posix/file/ioctl.c 	m.fd = fd;
fd                 36 usr/lib/posix/file/isatty.c isatty(int fd)
fd                 41 usr/lib/posix/file/isatty.c 	m.data[0] = fd;
fd                 39 usr/lib/posix/file/lseek.c lseek(int fd, off_t offset, int whence)
fd                 44 usr/lib/posix/file/lseek.c 	m.data[0] = fd;
fd                 56 usr/lib/posix/file/open.c 	return m.fd;
fd                 53 usr/lib/posix/file/opendir.c 	dir->dd_fd = m.fd;
fd                 36 usr/lib/posix/file/pipe.c pipe(int fd[2])
fd                 43 usr/lib/posix/file/pipe.c 	fd[0] = m.data[0];
fd                 44 usr/lib/posix/file/pipe.c 	fd[1] = m.data[1];
fd                 38 usr/lib/posix/file/read.c read(int fd, void *buf, size_t len)
fd                 43 usr/lib/posix/file/read.c 	m.fd = fd;
fd                 46 usr/lib/posix/file/readdir.c 	m.fd = dir->dd_fd;
fd                 37 usr/lib/posix/file/write.c write(int fd, void *buf, size_t len)
fd                 42 usr/lib/posix/file/write.c 	m.fd = fd;
fd                 40 usr/lib/posix/time/gettimeofday.c 	int fd, error;
fd                 42 usr/lib/posix/time/gettimeofday.c 	if ((fd = open("/dev/rtc", 0)) < 0) {
fd                 46 usr/lib/posix/time/gettimeofday.c 	error = ioctl(fd, RTCIOC_GET_TIME, tv);
fd                 47 usr/lib/posix/time/gettimeofday.c 	close(fd);
fd                 59 usr/server/exec/exec_elf.c load_exec(Elf32_Ehdr *ehdr, task_t task, int fd, vaddr_t *entry)
fd                 85 usr/server/exec/exec_elf.c 			if (lseek(fd, (off_t)phdr->p_offset, SEEK_SET)
fd                 88 usr/server/exec/exec_elf.c 			if (read(fd, mapped, phdr->p_filesz) < 0)
fd                195 usr/server/exec/exec_elf.c load_reloc(Elf32_Ehdr *ehdr, task_t task, int fd, vaddr_t *entry)
fd                212 usr/server/exec/exec_elf.c 	if (lseek(fd, ehdr->e_shoff, SEEK_SET) < 0) {
fd                216 usr/server/exec/exec_elf.c 	if (read(fd, buf, shdr_size) < 0) {
fd                284 usr/server/exec/exec_elf.c 		if (lseek(fd, shdr->sh_offset, SEEK_SET) < 0) {
fd                288 usr/server/exec/exec_elf.c 		if (read(fd, addr, shdr->sh_size) < 0) {
fd                336 usr/server/exec/exec_elf.c 	int error, fd;
fd                346 usr/server/exec/exec_elf.c 	if ((fd = open(exec->path, O_RDONLY)) == -1)
fd                351 usr/server/exec/exec_elf.c 			  fd, &exec->entry);
fd                354 usr/server/exec/exec_elf.c 			  fd, &exec->entry);
fd                356 usr/server/exec/exec_elf.c 	close(fd);
fd                445 usr/server/exec/exec_execve.c 	int fd;
fd                451 usr/server/exec/exec_execve.c 	if ((fd = open(path, O_RDONLY)) == -1)
fd                454 usr/server/exec/exec_execve.c 	if (fstat(fd, &st) == -1) {
fd                455 usr/server/exec/exec_execve.c 		close(fd);
fd                460 usr/server/exec/exec_execve.c 		close(fd);
fd                467 usr/server/exec/exec_execve.c 	if (read(fd, hdrbuf, HEADER_SIZE) == -1) {
fd                468 usr/server/exec/exec_execve.c 		close(fd);
fd                471 usr/server/exec/exec_execve.c 	close(fd);
fd                131 usr/server/fs/vfs/main.c 	int fd, error;
fd                135 usr/server/fs/vfs/main.c 	if ((fd = task_newfd(t)) == -1)
fd                156 usr/server/fs/vfs/main.c 	t->t_ofile[fd] = fp;
fd                158 usr/server/fs/vfs/main.c 	msg->fd = fd;
fd                166 usr/server/fs/vfs/main.c 	int fd, error;
fd                168 usr/server/fs/vfs/main.c 	fd = msg->data[0];
fd                169 usr/server/fs/vfs/main.c 	if (fd >= OPEN_MAX)
fd                172 usr/server/fs/vfs/main.c 	fp = t->t_ofile[fd];
fd                179 usr/server/fs/vfs/main.c 	t->t_ofile[fd] = NULL;
fd                221 usr/server/fs/vfs/main.c 	if ((fp = task_getfp(t, msg->fd)) == NULL)
fd                241 usr/server/fs/vfs/main.c 	if ((fp = task_getfp(t, msg->fd)) == NULL)
fd                258 usr/server/fs/vfs/main.c 	if ((fp = task_getfp(t, msg->fd)) == NULL)
fd                282 usr/server/fs/vfs/main.c 	if ((fp = task_getfp(t, msg->fd)) == NULL)
fd                295 usr/server/fs/vfs/main.c 	int fd, error;
fd                298 usr/server/fs/vfs/main.c 	if ((fd = task_newfd(t)) == -1)
fd                307 usr/server/fs/vfs/main.c 	t->t_ofile[fd] = fp;
fd                308 usr/server/fs/vfs/main.c 	msg->fd = fd;
fd                316 usr/server/fs/vfs/main.c 	int fd, error;
fd                318 usr/server/fs/vfs/main.c 	fd = msg->data[0];
fd                319 usr/server/fs/vfs/main.c 	if (fd >= OPEN_MAX)
fd                321 usr/server/fs/vfs/main.c 	fp = t->t_ofile[fd];
fd                327 usr/server/fs/vfs/main.c 	t->t_ofile[fd] = NULL;
fd                336 usr/server/fs/vfs/main.c 	if ((fp = task_getfp(t, msg->fd)) == NULL)
fd                454 usr/server/fs/vfs/main.c 	int fd;
fd                456 usr/server/fs/vfs/main.c 	fd = msg->data[0];
fd                457 usr/server/fs/vfs/main.c 	if ((fp = task_getfp(t, fd)) == NULL)
fd                578 usr/server/fs/vfs/main.c 	if ((fp = task_getfp(t, msg->fd)) == NULL)
fd                690 usr/server/fs/vfs/main.c 	int fd;
fd                702 usr/server/fs/vfs/main.c 	for (fd = 0; fd < OPEN_MAX; fd++) {
fd                703 usr/server/fs/vfs/main.c 		fp = target->t_ofile[fd];
fd                707 usr/server/fs/vfs/main.c 				target->t_ofile[fd] = NULL;
fd                724 usr/server/fs/vfs/main.c 	int fd;
fd                731 usr/server/fs/vfs/main.c 	for (fd = 0; fd < OPEN_MAX; fd++) {
fd                732 usr/server/fs/vfs/main.c 		fp = t->t_ofile[fd];
fd                132 usr/server/fs/vfs/vfs.h file_t	 task_getfp(struct task *t, int fd);
fd                133 usr/server/fs/vfs/vfs.h void	 task_setfp(struct task *t, int fd, file_t fp);
fd                135 usr/server/fs/vfs/vfs.h void	 task_delfd(struct task *t, int fd);
fd                165 usr/server/fs/vfs/vfs_task.c task_getfp(struct task *t, int fd)
fd                168 usr/server/fs/vfs/vfs_task.c 	if (fd < 0 || fd >= OPEN_MAX)
fd                171 usr/server/fs/vfs/vfs_task.c 	return t->t_ofile[fd];
fd                178 usr/server/fs/vfs/vfs_task.c task_setfp(struct task *t, int fd, file_t fp)
fd                181 usr/server/fs/vfs/vfs_task.c 	t->t_ofile[fd] = fp;
fd                191 usr/server/fs/vfs/vfs_task.c 	int fd;
fd                196 usr/server/fs/vfs/vfs_task.c 	for (fd = 0; fd < OPEN_MAX; fd++) {
fd                197 usr/server/fs/vfs/vfs_task.c 		if (t->t_ofile[fd] == NULL)
fd                200 usr/server/fs/vfs/vfs_task.c 	if (fd == OPEN_MAX)
fd                203 usr/server/fs/vfs/vfs_task.c 	return fd;
fd                210 usr/server/fs/vfs/vfs_task.c task_delfd(struct task *t, int fd)
fd                213 usr/server/fs/vfs/vfs_task.c 	t->t_ofile[fd] = NULL;
fd                 51 usr/test/creat/creat.c 	int fd, i;
fd                 63 usr/test/creat/creat.c 		if ((fd = creat(file, 0660)) == -1) {
fd                 69 usr/test/creat/creat.c 		if (fd != -1 && close(fd) == -1)
fd                 42 usr/test/dup/dup.c 	int fd;
fd                 45 usr/test/dup/dup.c 	if ((fd = mkstemp(temp)) < 0)
fd                 48 usr/test/dup/dup.c 	if (ftruncate(fd, 1024) != 0)
fd                 50 usr/test/dup/dup.c 	return (fd);
fd                 55 usr/test/fileio/fileio.c 	int fd, i;
fd                 57 usr/test/fileio/fileio.c 	if ((fd = open(WRITE_TARGET, O_CREAT|O_RDWR, 0)) < 0)
fd                 62 usr/test/fileio/fileio.c 		write(fd, iobuf, IOBUFSZ);
fd                 64 usr/test/fileio/fileio.c 	close(fd);
fd                 73 usr/test/fileio/fileio.c 	int rd, fd;
fd                 75 usr/test/fileio/fileio.c 	if ((fd = open(READ_TARGET, O_RDONLY, 0)) < 0)
fd                 78 usr/test/fileio/fileio.c 	while ((rd = read(fd, iobuf, IOBUFSZ)) > 0)
fd                 80 usr/test/fileio/fileio.c 	close(fd);
fd                103 usr/test/fileio/fileio.c 	int fd;
fd                106 usr/test/fileio/fileio.c 		if ((fd = open(READ_TARGET, O_RDONLY, 0)) < 0)
fd                108 usr/test/fileio/fileio.c 		close(fd);
fd                118 usr/test/fileio/fileio.c 	int rd, fd;
fd                120 usr/test/fileio/fileio.c 	if ((fd = open(READ_TARGET, O_RDONLY, 0)) < 0)
fd                124 usr/test/fileio/fileio.c 		while ((rd = read(fd, iobuf, IOBUFSZ)) > 0)
fd                127 usr/test/fileio/fileio.c 	close(fd);
fd                 47 usr/test/pipe/pipe.c 	int fd[2];
fd                 53 usr/test/pipe/pipe.c 	if (pipe(fd) == -1) {
fd                 57 usr/test/pipe/pipe.c 	write(fd[1], str, sizeof(str));
fd                 58 usr/test/pipe/pipe.c 	read(fd[0], buf, sizeof(buf));
fd                 65 usr/test/pipe/pipe.c 	int fd[2];
fd                 71 usr/test/pipe/pipe.c 	if (pipe(fd) == -1) {
fd                 81 usr/test/pipe/pipe.c 		close(fd[1]);
fd                 82 usr/test/pipe/pipe.c 		read(fd[0], buf, 256);
fd                 83 usr/test/pipe/pipe.c 		close(fd[0]);
fd                 89 usr/test/pipe/pipe.c 		close(fd[0]);
fd                 90 usr/test/pipe/pipe.c 		write(fd[1], str, sizeof(str));
fd                 91 usr/test/pipe/pipe.c 		close(fd[1]);