Re: [PATCH RFC 2/8] fs: always get the file size in _fs_read()

2022-06-28 Thread Qu Wenruo
On 2022/6/28 20:36, Huang Jianan wrote: Hi, wenruo, 在 2022/6/28 15:28, Qu Wenruo 写道: For _fs_read(), @len == 0 means we read the whole file. And we just pass @len == 0 to make each filesystem to handle it. In fact we have info->size() call to properly get the filesize. So we can not only

Re: [PATCH RFC 2/8] fs: always get the file size in _fs_read()

2022-06-28 Thread Huang Jianan
Hi, wenruo, 在 2022/6/28 15:28, Qu Wenruo 写道: For _fs_read(), @len == 0 means we read the whole file. And we just pass @len == 0 to make each filesystem to handle it. In fact we have info->size() call to properly get the filesize. So we can not only call info->size() to grab the file_size for

[PATCH RFC 2/8] fs: always get the file size in _fs_read()

2022-06-28 Thread Qu Wenruo
For _fs_read(), @len == 0 means we read the whole file. And we just pass @len == 0 to make each filesystem to handle it. In fact we have info->size() call to properly get the filesize. So we can not only call info->size() to grab the file_size for len == 0 case, but also detect invalid @len