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>
This commit is contained in:
Xiang Xiao 2021-07-13 03:38:28 +08:00 committed by Gustavo Henrique Nihei
parent e2705cd86c
commit 1f3a8b5adf
2 changed files with 4 additions and 4 deletions

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
{

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)
{