hostfs_open:return errno from host

Summary:
  Returns the error code returned directly by the host to avoid conversion to EBADF

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
chenrun1 2024-12-16 17:52:11 +08:00 committed by Xiang Xiao
parent 450b47fbb0
commit cf66a1d5ce

View file

@ -296,7 +296,7 @@ static int hostfs_open(FAR struct file *filep, FAR const char *relpath,
{
/* Error opening file */
ret = -EBADF;
ret = hf->fd;
goto errout_with_buffer;
}