mirror of
https://github.com/apache/nuttx.git
synced 2026-05-19 03:03:37 +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 */
|
||||
|
||||
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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user