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:
patacongo 2008-09-12 22:28:29 +00:00
parent fb6d8f6ae6
commit f796d1dff6

View File

@ -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