Use SEC_NSECTOR macro
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@921 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
fb6d8f6ae6
commit
f796d1dff6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user