fuse_nfs: Add truncate

Libnfs already has exports for truncate, hook them up to the fuse example.

Signed-off-by: Alexander Graf <agraf@suse.de>
libnfs-4.0.0-vitalif
Alexander Graf 2015-09-11 11:24:07 +02:00
parent b66121610d
commit 9439361243
1 changed files with 6 additions and 0 deletions

View File

@ -227,6 +227,11 @@ static int fuse_nfs_chown(const char *path, uid_t uid, gid_t gid)
return nfs_chown(nfs, path, uid, gid);
}
static int fuse_nfs_truncate(const char *path, off_t size)
{
return nfs_truncate(nfs, path, size);
}
static struct fuse_operations nfs_oper = {
.chmod = fuse_nfs_chmod,
.chown = fuse_nfs_chown,
@ -245,6 +250,7 @@ static struct fuse_operations nfs_oper = {
.utime = fuse_nfs_utime,
.rename = fuse_nfs_rename,
.symlink = fuse_nfs_symlink,
.truncate = fuse_nfs_truncate,
.write = fuse_nfs_write,
};