xref: /haiku/src/system/libroot/posix/stdio/rename.c (revision c90684742e7361651849be4116d0e5de3a817194)
1 /*
2  * Copyright 2004-2009, Axel Dörfler, axeld@pinc-software.de.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include <errno.h>
8 #include <stdio.h>
9 
10 #include <syscalls.h>
11 #include <syscall_utils.h>
12 
13 
14 int
15 rename(const char *from, const char *to)
16 {
17 	RETURN_AND_SET_ERRNO(_kern_rename(-1, from, -1, to));
18 }
19 
20 
21 int
22 renameat(int fromFD, const char* from, int toFD, const char* to)
23 {
24 	RETURN_AND_SET_ERRNO(_kern_rename(fromFD, from, toFD, to));
25 }
26