mv: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-13 12:30:12 +01:00
commit ad5ee27ea9
Notes: sideshowbarker 2024-07-19 10:04:31 +09:00

View file

@ -1,11 +1,16 @@
#include <AK/String.h>
#include <AK/FileSystemPath.h>
#include <AK/String.h>
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
int main(int argc, char** argv)
{
if (pledge("stdio rpath wpath cpath fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
if (argc != 3) {
printf("usage: mv <old-path> <new-path>\n");
return 1;