dd fails with iflag=direct
Thu Oct 9 12:43:00 GMT 2008
On Oct 8 11:36, Andrew Medico wrote:
> Lines: 42
> I'm running into a problem with dd's "iflag=direct" option in Cygwin.
> When I combine it it with "conv=sync,noerror", dd successfully reads
> all of the data from the device but once it gets to the end of the
> device it starts reporting I/O errors and never terminates:
> $ dd if=/dev/sdd of=/dev/null conv=sync,noerror iflag=direct
> dd: reading `/dev/sdd': Input/Output error
> 1952767+0 records in
> 1952767+0 records out
> 999816704 bytes (1.0 GB) copied, 1678.11 s, 596 kB/s
I fixed that in CVS for Cygwin 1.7. Apparently when reading over the
end of a drive (but not a partition), Windows decides to return a weird
error code ERROR_CRC instead of just returning EOF.
For Cygwin 1.5.25, the workaround is not using iflag=direct but standard
buffered reading. It's much faster most of the time anyway.
Thanks for the report,
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin