Everything

 

long read (long fileno, unsigned char *buf, long count)


[Description]

-

Data is read from the file specified by the first parameter (fileno) to the area in memory specified by the second parameter (buf). The number of bytes of data to be read is specified by the third parameter (count).

-

When the end of the file is reached, only a number of bytes fewer than or equal to count bytes can be read.

-

The position for file reading/writing advances by the number of bytes read.

-

When reading is performed successfully, the actual number of bytes read is returned; if the read operation fails, -1 is returned.

[Return value]

Normal: Actual number of bytes read

Error: -1

[Parameters]

fileno Number of the file to be read

buf Memory area to store read data

count Number of bytes to read