mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 05:42:05 +08:00
fs/mmap: rammap should return buffer start address
Signed-off-by: Xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
+2
-1
@@ -179,6 +179,8 @@ int rammap(FAR struct file *filep, FAR struct mm_map_entry_s *entry,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
entry->vaddr = rdbuffer; /* save the buffer firstly */
|
||||
|
||||
/* Seek to the specified file offset */
|
||||
|
||||
fpos = file_seek(filep, entry->offset, SEEK_SET);
|
||||
@@ -235,7 +237,6 @@ int rammap(FAR struct file *filep, FAR struct mm_map_entry_s *entry,
|
||||
|
||||
/* Add the buffer to the list of regions */
|
||||
|
||||
entry->vaddr = rdbuffer;
|
||||
entry->priv.i = kernel;
|
||||
entry->munmap = unmap_rammap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user