This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: Clear new space in fseek extended patches


> I object to the logic.  The only time you should write out the zeros
> is if you *write* after an fseek.

Do you mean write anywhere in the file after doing an fseek or only
when you write after the file location corresponding to where the
fseek that extended the file started?  I suspect you mean the latter
and that the zero padding should only be to the extent necessary to
fill any holes in a sparse file.

> Merely fseeking past EOF shouldn't modify the file.

This does seem to be the standard UNIX behavior.

> Also, has anyone tested the relevent operating systems to see if the
> os's seek() past EOF remembers where it *should* be, rather than
> truncating at EOF?  If they all preserve the file position beyond
> EOF, the logic is a lot simpler.

If you can be a little more precise about what you mean I'll concoct
a testcase and try it out on BeOS.

Thanks for the input.

-Fred


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