diff options
-rw-r--r-- | nuttx/fs/romfs/fs_romfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nuttx/fs/romfs/fs_romfs.c b/nuttx/fs/romfs/fs_romfs.c index 5dbacd829..e031612f8 100644 --- a/nuttx/fs/romfs/fs_romfs.c +++ b/nuttx/fs/romfs/fs_romfs.c @@ -372,7 +372,7 @@ static ssize_t romfs_read(FAR struct file *filep, char *buffer, size_t buflen) * aligned to a sector boundary. */ - nsectors = buflen / rm->rm_hwsectorsize; + nsectors = SEC_NSECTORS(rm, buflen); if (nsectors > 0 && sectorndx == 0) { /* Read maximum contiguous sectors directly to the user's |