diff options
author | Raghavendra G <raghavendra@gluster.com> | 2009-11-18 01:16:33 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-11-18 21:14:20 -0800 |
commit | 9c5547193f637cb52cbb91c0409dd3580acafdcb (patch) | |
tree | 8cd3f75cd209a4f3c2b77ed0f0efd0b82a6a1e49 /libglusterfsclient/src/libglusterfsclient.h | |
parent | a0c05848d2ed0b0600d73214594a161cbb42302c (diff) |
libglusterfsclient: implement glusterfs_truncate.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 369 (Samba does not work with booster.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=369
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.h')
-rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.h b/libglusterfsclient/src/libglusterfsclient.h index 1684381c9bb..ad23e02a0cd 100755 --- a/libglusterfsclient/src/libglusterfsclient.h +++ b/libglusterfsclient/src/libglusterfsclient.h @@ -1339,6 +1339,19 @@ glusterfs_fchdir (glusterfs_file_t fd); char * glusterfs_getcwd (char *buf, size_t size); +/* + * Truncate the file to a specified length. + * + * @path : path to the file. + * @length : length to which the file has to be truncated. + * + * Returns 0 on success and -1 on failure with errno set appropriately + */ + +int +glusterfs_truncate (const char *path, off_t length); + + /* FIXME: review the need for these apis */ /* added for log related initialization in booster fork implementation */ void |