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:
Xiang Xiao
2021-07-13 03:38:28 +08:00
parent c4f3d2d296
commit 35e0af812a
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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
View File
@@ -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)
{