fs/romfs: fix open zero-byte file fail issue
N/A Error log as below: romfs_open: ERROR: Failed to locate start of file data: -5 Change-Id: I0594a84b727077606450dea3ea348cfc2390458b Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
This commit is contained in:
parent
01fabe6c67
commit
dc14f89909
|
@ -982,7 +982,7 @@ int romfs_datastart(struct romfs_mountpt_s *rm, uint32_t offset,
|
|||
/* Get the offset to the next chunk */
|
||||
|
||||
offset += 16;
|
||||
if (offset >= rm->rm_volsize)
|
||||
if (offset > rm->rm_volsize)
|
||||
{
|
||||
return -EIO;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue