[patch] make cadaver work for large files

Henrik Holst henrik at witsbits.com
Tue Oct 14 11:09:50 EDT 2008


fre 2008-10-10 klockan 16:31 +0100 skrev Joe Orton:
> On Fri, Aug 29, 2008 at 01:12:45PM +0200, Henrik Holst wrote:
> > Hello,
> > 
> >   cadaver does not work for files larger than 2GiB aka it lacks support
> > for LFS.
> > 
> > I have included two patches, one against config.h.in which I'm a little
> > unsure if that is the best way to attack the problem (I'm a automake
> > novice). The second is against cadaver.c and is a fix for what looks
> > like a type where the wrong define is used to print ne_off_t values
> > which makes the wrong value to be printed in the progress bar when
> > transfering large files.
> 
> Hi Henrik!  Thanks for the patch and sorry as ever for the slow reply.
> 
> I've applied the cadaver.c patch to fix the progress bar in LFS builds,
> but I took a different approach for broader LFS support, because use of 
> _FILE_OFFSET_BITS=64 may break if building against a neon which did not 
> enable LFS support at build time by changing the size of off_t.
> 
> So I've just enabled O_LARGEFILE where available in get and put.  I've 
> also tweaked ls.c to handle sizes using unsigned long long where 
> available, that fixes the ls output too for >2GB files on 32-bit builds.
> 
> (all committed to SVN trunk now)
> 
> Regards, Joe
> 
Sounds great Joe!

/Henrik Holst
Witsbits AB





More information about the cadaver mailing list