1 /* 2 ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 ** Distributed under the terms of the Haiku License. 4 */ 5 6 7 #include <stdio.h> 8 #include <syscalls.h> 9 #include <errno.h> 10 11 12 int 13 rename(const char *from, const char *to) 14 { 15 int status = _kern_rename(-1, from, -1, to); 16 if (status < B_OK) { 17 errno = status; 18 return -1; 19 } 20 21 return status; 22 } 23 24