This is an automated email from the ASF dual-hosted git repository. ligd pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit cca7b7cb37d066853014337cffd776b55e76e729 Author: Xiang Xiao <[email protected]> AuthorDate: Sun Jul 28 15:42:26 2024 +0800 fs/romfs: romfs_read return the partail read size instead error code Signed-off-by: Xiang Xiao <[email protected]> --- fs/romfs/fs_romfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/romfs/fs_romfs.c b/fs/romfs/fs_romfs.c index 54ac0adcf4..5eba67f904 100644 --- a/fs/romfs/fs_romfs.c +++ b/fs/romfs/fs_romfs.c @@ -492,7 +492,7 @@ static ssize_t romfs_read(FAR struct file *filep, FAR char *buffer, errout_with_lock: nxrmutex_unlock(&rm->rm_lock); - return ret < 0 ? ret : readsize; + return readsize ? readsize : ret; } /****************************************************************************
