Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com Date: Sun, 15 Aug 1999 18:27:31 -0400 From: Chris Faylor To: cygdev Subject: Re: Patch: error in fhandler_base read/write code Message-ID: <19990815182731.A3444@cygnus.com> Reply-To: cygwin-developers AT sourceware DOT cygnus DOT com Mail-Followup-To: cygdev References: <37B49BBB DOT CD2A1D9A AT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: <37B49BBB.CD2A1D9A@vinschen.de>; from Corinna Vinschen on Sat, Aug 14, 1999 at 12:27:07AM +0200 Applied. Thanks. -chris On Sat, Aug 14, 1999 at 12:27:07AM +0200, Corinna Vinschen wrote: >I have found two errors in fhandler code: >- In case of an error fhandler_base::raw_read always returns the error > code EACCES. >- fhandler_base::raw_write always returns bytes_written if the windows > error is ERROR_DISK_FULL. This results in an endless loop e.g. in > cp command if bytes_written is 0. > >While changing the above behaviour I found that ERROR_DISK_FULL is >not handled by errno.cc. > >ChangeLog: >========== > >Sat Aug 14 0:10:00 Corinna Vinschen > > * fhandler.cc (fhandler_base::raw_read): `set_errno (EACCES)' > replaced with `__seterrno_from_win_error (errcode)'. > (fhandler_base::raw_write): In case of ERROR_DISK_FULL, return > bytes_written only if bytes_written > 0. > * errno.cc: Map ERROR_DISK_FULL to ENOSPC. >[snip]