On 2017-03-13, Grant Edwards <[email protected]> wrote:
> After upgrading to a new version of busybox (1.25.1), I now have an
> odd problem with 'cat'. When stdout is a file, it _appears_ to be
> doing a seek to the beginning of the output file between input files.
[...]
> But, strace doesn't show any seeks. I see that 'cat' is using
> sendfile mutiple times. According to sendfile(2):
>
> In Linux kernels before 2.6.33, out_fd must refer to a socket. Since
> Linux 2.6.33 it can be any file. If it is a regular file, then send‐
> file() changes the file offset appropriately.
>
> Apparently "change file file offset apprpriatly" means it gets reset
> to zero after every call to sendfile(). I take it this implementation
> of 'cat' works for other people?
That paragraph is wrong (or at least misleading). I've checked the
source code, and 2.6.33 does not update the output file postition (at
least not the version I downloaded from kernels.org nor the version I
got from Atmel). Perhaps the author of that man page had a 2.6.33 with
some 3.0 stuff backported.
The sendfile implementation for 2.6.33 is virtually identical to
2.6.31 (there's one added error-check to make sure an offset is
non-negative).
In 3.x, sendfile clearly updates the output file position.
So, it appears that busybox 1.25.1 requires a 3.0 kernel or newer. :(
Where does one find the kernel-version-dependencies for busybox
What's the latest version of busybox that I _can_ use with 2.6.33?
--
Grant Edwards grant.b.edwards Yow! I put aside my copy
at of "BOWLING WORLD" and
gmail.com think about GUN CONTROL
legislation...
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox