Xiang Xiao 906cb8b0f4 net/tcp: tcp_sendfile need restore the file location at the end
quote from https://man7.org/linux/man-pages/man2/sendfile.2.html:
If offset is not NULL, then it points to a variable holding the
file offset from which sendfile() will start reading data from
in_fd.  When sendfile() returns, this variable will be set to the
offset of the byte following the last byte that was read.  If
offset is not NULL, then sendfile() does not modify the file
offset of in_fd; otherwise the file offset is adjusted to reflect
the number of bytes read from in_fd.
If offset is NULL, then data will be read from in_fd starting at
the file offset, and the file offset will be updated by the call.

The change also align with the implementation at:
libs/libc/misc/lib_sendfile.c

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I607944f40b04f76731af7b205dcd319b0637fa04
2021-07-12 05:20:45 -07:00
..
2021-07-07 03:55:41 -05:00
2021-07-05 06:20:52 -05:00
2021-06-13 21:20:24 -05:00
2021-06-30 06:22:14 +09:00
2021-07-06 01:44:55 -05:00
2021-07-07 03:55:41 -05:00
2021-07-05 06:20:52 -05:00
2021-06-30 06:22:14 +09:00
2021-06-30 06:22:14 +09:00
2021-06-30 06:22:14 +09:00