1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00

Kernel+Userland: Add the rename() syscall along with a basic /bin/mv.

This commit is contained in:
Andreas Kling 2019-04-07 23:35:26 +02:00
parent 71b6436552
commit 37ae00a4dd
11 changed files with 99 additions and 2 deletions

View file

@ -418,8 +418,8 @@ int fclose(FILE* stream)
int rename(const char* oldpath, const char* newpath)
{
dbgprintf("FIXME(LibC): rename(%s, %s)\n", oldpath, newpath);
ASSERT_NOT_REACHED();
int rc = syscall(SC_rename, oldpath, newpath);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
char* tmpnam(char*)