X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 9 Oct 2008 14:42:16 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: dd fails with iflag=direct Message-ID: <20081009124216.GY9289@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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, Corinna -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/