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: BUG: Bad call to GetFileSze in ext2fsprogs lib/ext2fs/getsize.c

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


  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


Unsubscribe info:
Problem reports:

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