READ(2)
NAME
read − device independent input routine
SYNOPSIS
int read(dev, buffer, numchars)
int dev;
char ∗buffer;
int numchars;
DESCRIPTION
Read will read up to numchars bytes from the I/O device given by dev. It returns SYSERR if dev is incorrect. It returns the number of characters read if successful. The number of bytes actually returned depends on the device. For example, when reading from a device of type "tty", each read normally returns one line. For a disk, however, each read returns one block and the argument numchars is taken to be the index of the disk block desired.
SEE ALSO
close(2), control(2), getc(2), open(2), putc(2), seek(2), write(2)
December 01, 1986 — Xinu Programmer’s Manual