aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2005-09-08 14:40:16 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2005-09-08 14:40:16 +0000
commit5e3a7383bde79b460fec5420a093e1e71df389ad (patch)
treeb2c3832440d535391fefd07c49fbb8bf3fe89690 /example
parent9f60c499ee9a3828c1cb10d1f3123a680721e81d (diff)
more reverting
Diffstat (limited to 'example')
-rw-r--r--example/fusexmp_fh.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/example/fusexmp_fh.c b/example/fusexmp_fh.c
index 17bd77e..432ff6f 100644
--- a/example/fusexmp_fh.c
+++ b/example/fusexmp_fh.c
@@ -193,20 +193,6 @@ static int xmp_truncate(const char *path, off_t size)
return 0;
}
-static int xmp_ftruncate(const char *path, off_t size,
- struct fuse_file_info *fi)
-{
- int res;
-
- (void) path;
-
- res = ftruncate(fi->fh, size);
- if(res == -1)
- return -errno;
-
- return 0;
-}
-
static int xmp_utime(const char *path, struct utimbuf *buf)
{
int res;
@@ -231,28 +217,6 @@ static int xmp_open(const char *path, struct fuse_file_info *fi)
return 0;
}
-static int xmp_create(const char *path, mode_t mode, struct fuse_file_info *fi)
-{
- int fd;
- struct stat stbuf;
-
- fd = open(path, fi->flags | O_NOFOLLOW, mode);
- if(fd == -1)
- return -errno;
-
- if (fstat(fd, &stbuf) == -1) {
- close(fd);
- return -EIO;
- }
- if (!S_ISREG(stbuf.st_mode)) {
- close(fd);
- return -EISDIR;
- }
-
- fi->fh = fd;
- return 0;
-}
-
static int xmp_read(const char *path, char *buf, size_t size, off_t offset,
struct fuse_file_info *fi)
{
@@ -367,7 +331,6 @@ static struct fuse_operations xmp_oper = {
.chmod = xmp_chmod,
.chown = xmp_chown,
.truncate = xmp_truncate,
- .ftruncate = xmp_ftruncate,
.utime = xmp_utime,
.open = xmp_open,
.read = xmp_read,
@@ -375,7 +338,6 @@ static struct fuse_operations xmp_oper = {
.statfs = xmp_statfs,
.release = xmp_release,
.fsync = xmp_fsync,
- .create = xmp_create,
#ifdef HAVE_SETXATTR
.setxattr = xmp_setxattr,
.getxattr = xmp_getxattr,