FAT
FatVolRdSects()
PROTOTYPE
#include <fsdriver.h>
int FatVolRdSects(FAT *fat, void *buf, ui32 first_sect, int count);
DESCRIPTION
FatVolRdSects() reads count sectors from the FAT volume specified by fat, a handle previously returned by FatVolOpen(), beginning at sector first_sect. buf points to where the data is copied to.
If successful, FatVolRdSects() returns 0. Otherwise, it sets errno and returns -1.
ERROR CODES
| EFAULT | Either fat or buf equals NULL. |
| EINVAL | fat is not a valid volume handle or buf is not aligned. |
EXAMPLE
FAT *fat;
ui8 buf[512];
...
/*---------------------------------------------------------------*/
/* Read one sector from volume's underlying driver. */
/*---------------------------------------------------------------*/
if (FatVolRdSects(fat, buf, 10, 1))
error("FatVolRdSects() failed");