Skip to content
Commit 6502f59a authored by Zim's avatar Zim Committed by Zimuzo Ezeozue
Browse files

Fix FileUtils#copy to fallback on userspace copy if sendfile fails

As per the manpage, sendfile(2) might fail for the following reasons:
1. input fd doesn't support mmap
2. output was opened with O_APPEND

If sendfile(2) fails with EINVAL or ENOSYS, we fallback to userspace
copy

Fixed failing FileUtilsTest#convertToModernFd test since
I7d6ecf4549e8ed5134d20977c2089240be804827 that stoped matching valid
files to convert to modernfd with regex

Test: atest FileUtilsTest
Bug: 184236915
Change-Id: I0955fe2a7dfb40ac1f78bde4a325eb624a34f28b
parent fdeb85d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment