Lines Matching defs:fd
55 static chan_t *fd_to_channel(int fd)
57 if ((fd < 0) || (fd >= NR_CHANS) || (fdset[fd].index == NODEV)) {
61 return &fdset[fd];
494 * This function closes the channel identified by the file descriptor fd.
496 int close(int fd)
500 channel = fd_to_channel(fd);
604 * This function calls the read function of the driver associated to fd.
608 int read(int fd, void *buf, int n)
616 channel = fd_to_channel(fd);
629 * This function calls the write function of the driver associated to fd.
633 int write(int fd, void *buf, int n)
641 channel = fd_to_channel(fd);
654 * This function calls the seek function of the driver associated to fd.
657 int seek(int fd, long off, int whence)
661 channel = fd_to_channel(fd);