Re: [Vala] [PATCH 2/2] vapi/posix.vapi: Introduce ftruncate() and truncate().



On Sun, Aug 30, 2009 at 01:42:33PM +0200, Julian Andres Klode wrote:
Signed-off-by: Julian Andres Klode <jak jak-linux org>
---
 vapi/posix.vapi |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/vapi/posix.vapi b/vapi/posix.vapi
index cfc9bb3..0c4c0f8 100644
--- a/vapi/posix.vapi
+++ b/vapi/posix.vapi
@@ -1576,6 +1576,11 @@ namespace Posix {
      [CCode (cheader_filename = "unistd.h")]
      public int sync ();
 
+     [CCode (cheader_filename = "unistd.h")]
+     public int ftruncate(int fd, off_t length);
+     [CCode (cheader_filename = "unistd.h")]
+     public int truncate(const char *path, off_t length);
+
      [SimpleType]
      [CCode (cname = "cc_t", cheader_filename = "termios.h")]
      [IntegerType (rank = 3, min = 0, max = 255)]
-- 
1.6.3.3


There has been no answer to my 2 patches yet, so I ask again. Having
mmap() and file truncation support is kind of needed for maintaining
a binary cache on the disk. And writing a package manager[1] without
such a cache would be silly.

[1] http://git.debian.org/?p=users/jak/apt2.git
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]