mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 06:17:30 +08:00
Add mmap
This commit is contained in:

committed by
Christian Mauderer

parent
bc2ba9a9cd
commit
b68ca55c96
@@ -35,6 +35,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
@@ -125,6 +126,9 @@ static void test_cdev(const char *path)
|
||||
assert(rv == -1);
|
||||
assert(errno == TEST_KQ_ERRNO);
|
||||
|
||||
rv = mmap(NULL, 1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
assert(rv == 0);
|
||||
|
||||
rv = close(fd);
|
||||
assert(rv == 0);
|
||||
|
||||
|
Reference in New Issue
Block a user