minix/lib/libc/sys-minix/rename.c
Lionel Sambuc 1db8ecf0e4 Message type for VFS_{LINK,SYMLINK,RENAME}
Change-Id: If4569bac4584e053b7c4816fe47338327175fd44
2014-07-28 17:05:32 +02:00

22 lines
486 B
C

#include <sys/cdefs.h>
#include <lib.h>
#include "namespace.h"
#include <string.h>
#include <stdio.h>
#ifdef __weak_alias
__weak_alias(__posix_rename, rename)
#endif
int rename(const char *name, const char *name2)
{
message m;
memset(&m, 0, sizeof(m));
m.m_lc_vfs_link.len1 = strlen(name) + 1;
m.m_lc_vfs_link.len2 = strlen(name2) + 1;
m.m_lc_vfs_link.name1 = (vir_bytes)name;
m.m_lc_vfs_link.name2 = (vir_bytes)name2;
return(_syscall(VFS_PROC_NR, VFS_RENAME, &m));
}