Android 2.1 file i/o: pread fails with errno 22 (EINVAL, Invalid argument)
问题 I'm doing simple file-copy operation using open(2), pread(2) and pwrite(2) as seen below (code simplified a bit). My problem is that the ::pread(2) functions fails returning -1, with [errno=22]. Note that both source and destination files are placed on SD card. This problem occurs on Android 2.1 (API level <=7, both emulator and real device), no problem when running it on Android 2.3 (API level 9). Is there a problem in my code or is it a bug in kernel/stdlib? fileSource = ::open(pcSource, O