mufs: return actual amount of bytes read in mufs_read()
This commit is contained in:
parent
676c9bdbb0
commit
4739b8f995
1 changed files with 1 additions and 0 deletions
|
@ -104,6 +104,7 @@ size_t mufs_read(struct mufs_file *file, void *data, size_t len)
|
|||
if (!(ret = mufs_tree_read(file->tree, data, file->va, len)))
|
||||
return 0;
|
||||
|
||||
ret = min(ret, file->tree->file_size - file->va);
|
||||
file->va += ret;
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue