This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new cf66a1d5ce hostfs_open:return errno from host
cf66a1d5ce is described below
commit cf66a1d5ce04dd1704d239b3d0a3bd8f2dcfdc8b
Author: chenrun1 <[email protected]>
AuthorDate: Mon Dec 16 17:52:11 2024 +0800
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 <[email protected]>
---
fs/hostfs/hostfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hostfs/hostfs.c b/fs/hostfs/hostfs.c
index e1c693ef04..511a043c36 100644
--- a/fs/hostfs/hostfs.c
+++ b/fs/hostfs/hostfs.c
@@ -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;
}