E*truncate(): added
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 24 Mar 2005 12:41:44 +0000 (12:41 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Thu, 24 Mar 2005 12:41:44 +0000 (12:41 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1976 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/ensc_wrappers/wrappers-unistd.hc

index 9cd29a8..9a89c3c 100644 (file)
@@ -206,3 +206,15 @@ Enice(int n)
 {
   FatalErrnoError(nice(n)==-1, "nice()");
 }
+
+inline static WRAPPER_DECL void
+Etruncate(const char *path, off_t length)
+{
+  FatalErrnoError(truncate(path,length)==-1, "truncate()");
+}
+
+inline static WRAPPER_DECL void
+Eftruncate(int fd, off_t length)
+{
+  FatalErrnoError(ftruncate(fd,length)==-1, "ftruncate()");
+}