> +config FEATURE_USE_SENDFILE
> + bool "Use sendfile system call"
> + default y
> + help
> + When enabled, busybox will use the kernel sendfile() function
> + instead of read/write loops where applicable.
Please include the kernel version requirement here.
> +#if ENABLE_FEATURE_USE_SENDFILE
> + {
> + ssize_t sz = size && (size < buffer_size)
> + ? size : MAXINT(ssize_t) - 0xffff;
>
> - rd = safe_read(src_fd, buffer, size > buffer_size ?
> buffer_size : size);
> + while (1) {
And here. Comment should be enough, as the call will probably error out
on older kernels.
> + rd = sendfile(dst_fd, src_fd, NULL, sz);
> + if (rd <= 0) {
> + /* Might be EOF, might be an error,
> + * to make sure fall back to the
- Lauri
--
http://www.fastmail.fm - A no graphics, no pop-ups email service
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox