#include <oskit/diskpart/diskpart.h>int diskpart_read_func(void *driver_info, int sector, char *buf);
This function is called from diskpart_get_partition and diskpart_get_type whenever they need to read data from the target disk.
- driver_info
- The parameter passed to diskpart_get_partition and diskpart_get_type. Used to pass data through the diskpart library to this read routine.
- sector
- The sector to read.
- buf
- Memory location where the sector should be read in to. The buffer must be at least SECTOR_SIZE bytes.
Returns zero on success, non-zero to indicate an error.