Reads the sectors requested from a file using DFS, sleeping until completion.
#include <dfs.h>
int dfs_read (
int fildes,
uint32_t startingSector,
size_t sectorCount,
void *buffer );
(IN) Specifies the file handle returned from a prior call to open for the indicated file.
(IN) Specifies the starting sector number (logical offset from beginning of the file) in the file where the read operation is to begin.
(IN) Specifies the number of sectors to be read into the buffer.
(OUT) Points to a contiguous buffer area large enough to contain the number of sectors indicated to be read.
If successful, returns 0. Otherwise, returns a nonzero error code:
For possible DFS errors, see Section 13.4.5, DFS Return Values.
This function performs a read of one or more sectors using a logical zero-based sector offset into the indicated file. Since this function is blocking, control is returned to the caller after all reads relating to the requested read function have been completed. If a status indicating a hole was detected during the requested read operation, the buffer is zeroed. It is not possible to read beyond the end of the allocated area of a file.