1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:47:34 +00:00

Demos: Use pledge and unveil

This commit is contained in:
Brendan Coles 2020-11-01 19:37:48 +00:00 committed by Andreas Kling
parent e8ff7c895b
commit 9faca895d3
8 changed files with 115 additions and 0 deletions

View file

@ -62,6 +62,16 @@ int main(int argc, char* argv[])
return 1;
}
if (unveil("/res", "r") < 0) {
perror("unveil");
return 1;
}
if (unveil(nullptr, nullptr) < 0) {
perror("unveil");
return 1;
}
if ((grid_rows > 0) ^ (grid_columns > 0)) {
warnln("Expected either both or none of 'grid-rows' and 'grid-cols' to be passed.");
return 1;