search for: disk_errno

Displaying 1 result from an estimated 1 matches for "disk_errno".

2010 Sep 19
2
can't get write_sectors to work...
...bus_type, d->edd_params.interface_type); zero_buf = calloc(1, d->edd_params.bytes_per_sector); for(int sector = 0; sector < d->edd_params.sectors; sector++){ err = write_verify_sectors(d, sector,zero_buf,1); if (err == -1) { printf("sector: %d error: %d\n", sector, disk_errno); //disk_errno is always zero here } printf("sector: %d wrote:%d\r", sector, err); } if (zero_buf) { free(zero_buf); } } When run, the error case is always executed, but disk_errno is always zero. If I switch to write_sectors() the call succeeds (returns the same number of...