From: Enrico Scholz Date: Thu, 24 Mar 2005 12:41:44 +0000 (+0000) Subject: E*truncate(): added X-Git-Tag: IPSENTINEL_VERSION_0_12~18 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca63a9f3c976c2cb902776d0477224ec1f89d9b5;p=util-vserver.git E*truncate(): added git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1976 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- 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()"); +}