Don't forget to convert the host convention (-1/errno) to the nuttx kernel convention. (negative errno)