delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/11/21/08:48:34

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 21 Nov 2008 14:48:45 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin 1.7: O_DIRECT read from raw devices returns EOF
Message-ID: <20081121134845.GG30831@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <1L3Vag-0fDPUm0 AT fwd05 DOT aul DOT t-online DOT de>
MIME-Version: 1.0
In-Reply-To: <1L3Vag-0fDPUm0@fwd05.aul.t-online.de>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019