1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

mv: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-13 12:30:12 +01:00
parent 8ccc2b25c2
commit ad5ee27ea9

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;