mirror of
https://github.com/apache/nuttx.git
synced 2026-10-04 12:48:09 +00:00
fs/romfs: romfs_read return the partail read size instead error code
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
96900845a5
commit
cca7b7cb37
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue