mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Fix mmap compiler error when CONFIG_FS_RAMMAP equals y
fs_munmap.c:122:15: error: ‘struct fs_rammap_s’ has no member named ‘kernel’ fs_rammap.c:110:52: error: expected ‘:’ before ‘;’ token Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: Ia57b641d77fd296e6e75e8fd47c0f77b7b30157b
This commit is contained in:
+2
-2
@@ -119,9 +119,9 @@ static int file_munmap_(FAR void *start, size_t length, bool kernel)
|
||||
|
||||
/* Then free the region */
|
||||
|
||||
if (curr->kernel)
|
||||
if (kernel)
|
||||
{
|
||||
kmm_free(curr)
|
||||
kmm_free(curr);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+2
-2
@@ -106,8 +106,8 @@ int rammap(FAR struct file *filep, size_t length,
|
||||
|
||||
/* Allocate a region of memory of the specified size */
|
||||
|
||||
alloc = (FAR uint8_t *)kernel ?
|
||||
kmm_malloc(sizeof(struct fs_rammap_s) + length);
|
||||
alloc = kernel ?
|
||||
kmm_malloc(sizeof(struct fs_rammap_s) + length) :
|
||||
kumm_malloc(sizeof(struct fs_rammap_s) + length);
|
||||
if (!alloc)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user