1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Replace system calls that accept a path with *at versions.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-10-25 17:35:54 +02:00
parent 921deb6eeb
commit 1fa2df3e6a
13 changed files with 68 additions and 44 deletions

View file

@ -22,12 +22,12 @@
*******************************************************************************/
#include <sys/syscall.h>
#include <unistd.h>
#include <sys/types.h>
DEFN_SYSCALL2(int, SysTruncate, SYSCALL_TRUNCATE, const char*, off_t);
#include <fcntl.h>
#include <unistd.h>
extern "C" int truncate(const char* pathname, off_t length)
{
return SysTruncate(pathname, length);
return truncateat(AT_FDCWD, pathname, length);
}