Correctly return error codes on write/read in Linux.
Correctly check for not supported errors in Linux.