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:
parent
e2705cd86c
commit
1f3a8b5adf
|
@ -119,9 +119,9 @@ static int file_munmap_(FAR void *start, size_t length, bool kernel)
|
||||||
|
|
||||||
/* Then free the region */
|
/* Then free the region */
|
||||||
|
|
||||||
if (curr->kernel)
|
if (kernel)
|
||||||
{
|
{
|
||||||
kmm_free(curr)
|
kmm_free(curr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -106,8 +106,8 @@ int rammap(FAR struct file *filep, size_t length,
|
||||||
|
|
||||||
/* Allocate a region of memory of the specified size */
|
/* Allocate a region of memory of the specified size */
|
||||||
|
|
||||||
alloc = (FAR uint8_t *)kernel ?
|
alloc = kernel ?
|
||||||
kmm_malloc(sizeof(struct fs_rammap_s) + length);
|
kmm_malloc(sizeof(struct fs_rammap_s) + length) :
|
||||||
kumm_malloc(sizeof(struct fs_rammap_s) + length);
|
kumm_malloc(sizeof(struct fs_rammap_s) + length);
|
||||||
if (!alloc)
|
if (!alloc)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue