crafcat7 commented on PR #15535: URL: https://github.com/apache/nuttx/pull/15535#issuecomment-2589682189
> my suggestion > > introduce a hostfs backend api like: > > ``` > int host_convert_errno_to_nuttx(int host_error, int default_error) > ``` > > this PR can use > > ```c > ret = -host_convert_errno_to_nuttx(-hf->fd, EBADF); > ``` > > an implementation for arch/sim/src/sim/posix/sim_hostfs.c can be > > ```c > int host_convert_errno_to_nuttx(int host_error, int default_error) > { > #if defined(CONFIG_HOST_LINUX) > return host_errno; > #else > if (host_error == 0) > { > return 0; > } > return default_error; > #endif > } > ``` I made a revision based on your suggestion -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org