From cf66a1d5ce04dd1704d239b3d0a3bd8f2dcfdc8b Mon Sep 17 00:00:00 2001 From: chenrun1 Date: Mon, 16 Dec 2024 17:52:11 +0800 Subject: [PATCH] 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 --- 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; }