From ca63a9f3c976c2cb902776d0477224ec1f89d9b5 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Thu, 24 Mar 2005 12:41:44 +0000 Subject: [PATCH] E*truncate(): added 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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/util-vserver/ensc_wrappers/wrappers-unistd.hc b/util-vserver/ensc_wrappers/wrappers-unistd.hc index 9cd29a8..9a89c3c 100644 --- a/util-vserver/ensc_wrappers/wrappers-unistd.hc +++ b/util-vserver/ensc_wrappers/wrappers-unistd.hc @@ -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()"); +} -- 1.8.1.5