Christian Franke wrote:
The problem is that no errno is offered for "unspecified" errors
IMHO the problem is the existence of "unspecified" errors. Ddrescue
needs that the system returns 2 different kinds of errors: non-fatal
(temporary or affecting just a sector, for example) and fatal
(permanent, like EACCES "Permission denied").
If the system returns a fatal error code for a non-fatal error,
ddrescue quits prematurely.
If the system returns a non-fatal error code for a fatal error,
ddrescue marks the rest of the drive as "bad-sector" and rescues nothing.
and interestingly also not for "media changed".
Maybe ESTALE could be used for "media changed".