bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: permission denied in cygwin


From: Christian Franke
Subject: Re: permission denied in cygwin
Date: Mon, 26 Feb 2024 15:57:09 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 SeaMonkey/2.53.16

Antonio Diaz Diaz wrote:
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".


Further experiments and comparison with Linux behavior suggests that ENODEV is a reasonable mapping. See related upstream commit:
https://cygwin.com/git/?p=newlib-cygwin.git;a=commitdiff;h=4af5f9d

Regards,
Christian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]