This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin 1.7: O_DIRECT read from raw devices returns EOF


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]