int read(int fd, void *buf, uint32 count)
This function basically acts as its standard equivalent, except that it caches the data so as to improve performances.
fd is a file descriptor corresponding to an already opened file. This must be a descriptor returned by the library functions, and not by the standard ones.
buf is a buffer provided by the user. It must be large enough to contain all the data that will be read.
count is the maximum number of bytes this function should try to read.
The number of bytes read
is returned.
On error, -1 is returned and error() will return the
corresponding error code.
Writes to "opened" file
descriptor. Does caching.
int
write(int fd,
void *buf, uint32
count)
Copyright © Nicolas Brodu, 1999 - 2000