mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
fs/smartfs/smartfs_smart.c: Current sector should have a space for next entry size. If not, we should move to next sector.
This commit is contained in:
committed by
Gregory Nutt
parent
a04d2eeb10
commit
a279815434
@@ -1306,7 +1306,7 @@ static int smartfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir)
|
|||||||
/* Now advance to the next entry */
|
/* Now advance to the next entry */
|
||||||
|
|
||||||
dir->u.smartfs.fs_curroffset += entrysize;
|
dir->u.smartfs.fs_curroffset += entrysize;
|
||||||
if (dir->u.smartfs.fs_curroffset >= fs->fs_llformat.availbytes)
|
if (dir->u.smartfs.fs_curroffset + entrysize >= fs->fs_llformat.availbytes)
|
||||||
{
|
{
|
||||||
/* We advanced past the end of the sector. Go to next sector */
|
/* We advanced past the end of the sector. Go to next sector */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user