www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/14/14:46:22

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
content-class: urn:content-classes:message
MIME-Version: 1.0
Subject: RE: BUG: Bad call to GetFileSze in ext2fsprogs lib/ext2fs/getsize.c
Date: Tue, 14 Sep 2004 14:43:04 -0400
Message-ID: <3D848382FB72E249812901444C6BDB1D03E04E7E@exchange.timesys.com>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
From: "Robb, Sam" <sam DOT robb AT timesys DOT com>
To: <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i8EIkH38009284

> On Tue, Sep 14, 2004 at 10:32:47AM -0700, Earl Chew wrote:
> >Earl Chew wrote:
> >>The call to GetFileSize() doesn't match the Microsoft documentation,
> >>and invariably mis-sizes the disk image as zero.

Earl,

  Thanks for the comments.  I considered some of the things
you suggested, but for the moment, I'm holding off on anything
other than minor changes to the existing source.

> Let me again point out that a cygwin program shouldn't be 
> doing *ANY OF THIS*.
> 
> It shouldn't be calling GetFileSize and it shouldn't be calling
> CreateFile.
> 
> cgf

  Agreed... however, the e2fsprogs code itself is what's making
these calls :-/

  In other words, whoever did the initial port of e2fsprogs to
Cygwin (Ted Ts'o, from the ChangeLog entries) decided, for some
reason, to make use of native Win32 calls instead of using stat/
statfs.  Since the only ChangeLog entry for Cygwin is dated from
2003-04-18, it's possible that he ran into problems with Cygwin
the current state of the Cygwin code and felt the need to fall
back on Win32 natives (probably for large file support, since
the code made an explicit call to GetFileSizeEx...)

  I'm going to look at the code, and see if the existing state
of Cygwin is such that the non-windows code path in getfile.c
can be used instead.  If/when that happens, I'll feed patches
back upstream, along with comments, so the next release of the
e2fsprogs package can be built without any annoying bits like
this... but it's going to have to remain in there for the near
future.

-Samrobb 

--
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