[Box Backup] Bug fix - don't die on lstat failure
Tue, 14 Dec 2004 16:26:37 +0000
On 14 Dec 2004, at 16:17, Joe Krahn wrote:
> Nick Knight wrote:
>> From reading the docs on lstat and linux lfs when the compiler flags
>> used to enable large file support this switches calls to the 64 bit
>> versions (lstat64).
>> Although in my experience if a bad lstat is called fro whatever reason
>> then the backup will die, I second a fix to make the lstat more like a
>> bad read...
> When you mention compiler flags, do you mean the following defines?
> '-D_LARGEFILE_SOURCE' and `-D_FILE_OFFSET_BITS=64'
> Or is there also an actual compiler flag?
> In either case, are any large-file flags currently in the boxbackup
is used on all compiler line under Linux if "working"  LFS support
is detected by the ./configure script.
It is my understanding that -D_LARGEFILE_SOURCE merely makes the *64
functions available. However, since all the source uses 64 bit offsets,
using -D_FILE_OFFSET_BITS=64 makes more sense.
I have had reports of success backing up large files after this support
was added (and an issue caused by zlib not meeting it's documentation
Can you tell me which error you get from lstat? (the value of errno,
looked up in the relevant header file.)
 By working, I mean that using the flag increases the size of off_t
and the relevant members of struct stat to 64 bits.