This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cygwin 1.7: O_DIRECT read from raw devices returns EOF
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 21 Nov 2008 14:48:45 +0100
- Subject: Re: Cygwin 1.7: O_DIRECT read from raw devices returns EOF
- References: <1L3Vag-0fDPUm0@fwd05.aul.t-online.de>
- Reply-to: cygwin at cygwin dot com
On Nov 21 13:58, Christian Franke wrote:
> void
> fhandler_dev_floppy::raw_read (void *ptr, size_t& ulen)
> {
> ...
> DWORD bytes_to_read = 0;
> ...
> if (devbuf)
> { /* !O_DIRECT ... */ }
> else
> {
> _off64_t current_position = get_current_position ();
> if (current_position + bytes_to_read >= drive_size)
> bytes_to_read = drive_size - current_position;
> if (bytes_to_read && !read_file (p, len, &bytes_read, &ret))
> ...
>
> In the O_DIRECT case, bytes_to_read is always 0.
Indeed. Thanks for catching this bug! I've checked in a patch.
Would you mind to give it a whirl?
Thanks again,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
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/