summaryrefslogtreecommitdiff
path: root/LibC/stdio.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-07 23:35:26 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-07 23:35:26 +0200
commit37ae00a4dd20e095ca58cf00d666ed5ab373f004 (patch)
treedb6143d4dc52e747bd48b3c95b548e417ba93f3a /LibC/stdio.cpp
parent71b643655282309d347e464806e4ca1cd1115797 (diff)
downloadserenity-37ae00a4dd20e095ca58cf00d666ed5ab373f004.zip
Kernel+Userland: Add the rename() syscall along with a basic /bin/mv.
Diffstat (limited to 'LibC/stdio.cpp')
-rw-r--r--LibC/stdio.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/LibC/stdio.cpp b/LibC/stdio.cpp
index 8fcf67e59c..1e05307508 100644
--- a/LibC/stdio.cpp
+++ b/LibC/stdio.cpp
@@ -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*)