mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:17:34 +00:00
mv: Use pledge()
This commit is contained in:
parent
8ccc2b25c2
commit
ad5ee27ea9
1 changed files with 6 additions and 1 deletions
|
@ -1,11 +1,16 @@
|
||||||
#include <AK/String.h>
|
|
||||||
#include <AK/FileSystemPath.h>
|
#include <AK/FileSystemPath.h>
|
||||||
|
#include <AK/String.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
if (pledge("stdio rpath wpath cpath fattr", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
printf("usage: mv <old-path> <new-path>\n");
|
printf("usage: mv <old-path> <new-path>\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue