mirror of
https://github.com/apache/nuttx.git
synced 2025-12-10 04:04:18 +08:00
fs/mmap/fs_mmap.c: MAP_PRIVATE or MAP_SHARED must be specified
MAP_PRIVATE or MAP_SHARED must be specified in flags according to standard Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This commit is contained in:
committed by
Xiang Xiao
parent
a4c9fdc447
commit
729f2f890b
@@ -82,6 +82,13 @@ static int file_mmap_(FAR struct file *filep, FAR void *start,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* MAP_PRIVATE or MAP_SHARED must be specified */
|
||||
|
||||
if (((flags & MAP_PRIVATE) == 0) && ((flags & MAP_SHARED) == 0))
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Fixed mappings and protections are not currently supported. These
|
||||
* options could be supported in the KERNEL build with an MMU, but that
|
||||
* logic is not in place.
|
||||
|
||||
Reference in New Issue
Block a user