]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added (untested) system call VG_(unlink)().
authorNicholas Nethercote <njn@valgrind.org>
Fri, 4 Oct 2002 10:29:38 +0000 (10:29 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 4 Oct 2002 10:29:38 +0000 (10:29 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1177

coregrind/vg_mylibc.c
include/vg_skin.h

index c6c158c6ff3e35a64f9c09ba2d9e2c016e1fdc37..abb5db378bd679cd9e2c43ba056c7ee6185c762c 100644 (file)
@@ -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
index 530e1132eca73bc63d4e3dded06404b285adbdbe..68da7f2a523b8154412495f130b27b707d6b4c54 100644 (file)
@@ -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 );
 
 
 /* ------------------------------------------------------------------ */