From: Nicholas Nethercote Date: Fri, 4 Oct 2002 10:29:38 +0000 (+0000) Subject: Added (untested) system call VG_(unlink)(). X-Git-Tag: svn/VALGRIND_1_9_4~250 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c5fbb495217a0e9844999bf2dd7bba1520a73b79;p=thirdparty%2Fvalgrind.git Added (untested) system call VG_(unlink)(). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1177 --- diff --git a/coregrind/vg_mylibc.c b/coregrind/vg_mylibc.c index c6c158c6ff..abb5db378b 100644 --- a/coregrind/vg_mylibc.c +++ b/coregrind/vg_mylibc.c @@ -1091,6 +1091,14 @@ Int VG_(stat) ( Char* file_name, struct vki_stat* buf ) VG_(is_kerror)(res) ? (-1) : 0; } +Int VG_(unlink) ( Char* file_name ) +{ + Int res; + res = vg_do_syscall1(__NR_unlink, (UInt)file_name); + return + VG_(is_kerror)(res) ? (-1) : 0; +} + /* Misc functions looking for a proper home. */ /* We do getenv without libc's help by snooping around in diff --git a/include/vg_skin.h b/include/vg_skin.h index 530e1132ec..68da7f2a52 100644 --- a/include/vg_skin.h +++ b/include/vg_skin.h @@ -357,12 +357,13 @@ extern Int VG_(log2) ( Int x ); /* unistd.h, fcntl.h, sys/stat.h */ extern Int VG_(getpid) ( void ); -extern Int VG_(open) ( const Char* pathname, Int flags, Int mode ); -extern Int VG_(read) ( Int fd, void* buf, Int count); -extern Int VG_(write) ( Int fd, void* buf, Int count); -extern void VG_(close) ( Int fd ); +extern Int VG_(open) ( const Char* pathname, Int flags, Int mode ); +extern Int VG_(read) ( Int fd, void* buf, Int count); +extern Int VG_(write) ( Int fd, void* buf, Int count); +extern void VG_(close) ( Int fd ); -extern Int VG_(stat) ( Char* file_name, struct vki_stat* buf ); +extern Int VG_(unlink) ( Char* file_name ); +extern Int VG_(stat) ( Char* file_name, struct vki_stat* buf ); /* ------------------------------------------------------------------ */