diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-08 11:37:01 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-08 11:40:58 +0100 |
commit | fdbd9f1e272b97d7d28f9f610be8fbf0bdbd98d9 (patch) | |
tree | 5caafbf80252f8116a6921d7498d5d56a21481fb /LibC/grp.cpp | |
parent | 41a751c90c9d39db764308aeba476db593b9b6e1 (diff) | |
download | serenity-fdbd9f1e272b97d7d28f9f610be8fbf0bdbd98d9.zip |
Start working on memory-mapped files.
First of all, change sys$mmap to take a struct SC_mmap_params since our
sycsall calling convention can't handle more than 3 arguments.
This exposed a bug in Syscall::invoke() needing to use clobber lists.
It was a bit confusing to debug. :^)
Diffstat (limited to 'LibC/grp.cpp')
-rw-r--r-- | LibC/grp.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/LibC/grp.cpp b/LibC/grp.cpp index 405744968e..e48772627f 100644 --- a/LibC/grp.cpp +++ b/LibC/grp.cpp @@ -31,7 +31,7 @@ void setgrent() perror("open /etc/group"); } assert(__grdb_stream); - __grdb_entry = (struct group_with_strings*)mmap(nullptr, getpagesize()); + __grdb_entry = (struct group_with_strings*)mmap(nullptr, getpagesize(), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); set_mmap_name(__grdb_entry, getpagesize(), "setgrent"); } } |