diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-08-16 14:00:51 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-08-16 14:00:51 -0400 |
commit | 896e28812c51b9ffdf3efc00c7d7ef699e380a58 (patch) | |
tree | aaa25e093fb4a2ac4c57609e1f745e5ac0734ca8 /src/stdio/rename.c | |
parent | 0b0d1fe1d4fbf8560577d81e5af0549683eac8ba (diff) |
formatting
Diffstat (limited to 'src/stdio/rename.c')
-rw-r--r-- | src/stdio/rename.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/stdio/rename.c b/src/stdio/rename.c index 589b3690..ad1be639 100644 --- a/src/stdio/rename.c +++ b/src/stdio/rename.c @@ -1,20 +1,12 @@ +#include <errno.h> #include <stdio.h> -#include "errno.h" #include "_syscall.h" /** rename a file **/ + int rename(const char *old, const char *new) { - SYSCALL_NUMBER(sc, rename, -1); - int err = 0; - - err = __syscall(sc, old, new); - if (err < 0) { - errno = -err; - return -1; - } - - return 0; + SYSCALL(rename, int, -1, old, new, 0, 0, 0, 0); } /*** @@ -24,7 +16,5 @@ ARGUMENT(new). /* IMPLEMENTATION(Behavior if ARGUMENT(new) exists prior to THIS() being called) -*/ -/* STDC(1) */ |