From b1f475196174db8bc750b545f23449dd5859d965 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 22 Mar 2013 16:59:27 +0100 Subject: Remove examples for compatibility < 25 * configure.ac (AC_CONFIG_FILES): Remove example/Makefile, example-22/Makefile, example-23/Makefile, example-24/Makefile. * example/.gitignore: Remove. * example/Makefile.am: Likewise. * example/fusexmp.c: Likewise. * example/fusexmp.c.patch: Likewise. * example/hello.c: Likewise. * example/null.c: Likewise. * example-22/.gitignore: Likewise. * example-22/Makefile.am: Likewise. * example-22/fusexmp.c: Likewise. * example-22/fusexmp.c.patch: Likewise. * example-22/hello.c: Likewise. * example-22/null.c: Likewise. * example-23/.gitignore: Likewise. * example-23/Makefile.am: Likewise. * example-23/fusexmp.c: Likewise. * example-23/fusexmp.c.patch: Likewise. * example-23/fusexmp_fh.c: Likewise. * example-23/fusexmp_fh.c.patch: Likewise. * example-23/hello.c: Likewise. * example-23/null.c: Likewise. * example-24/.gitignore: Likewise. * example-24/Makefile.am: Likewise. * example-24/fusexmp.c: Likewise. * example-24/fusexmp.c.patch: Likewise. * example-24/fusexmp_fh.c: Likewise. * example-24/fusexmp_fh.c.patch: Likewise. * example-24/hello.c: Likewise. * example-24/hello_ll.c: Likewise. * example-24/null.c: Likewise. --- example-24/null.c | 88 ------------------------------------------------------- 1 file changed, 88 deletions(-) delete mode 100644 example-24/null.c (limited to 'example-24/null.c') diff --git a/example-24/null.c b/example-24/null.c deleted file mode 100644 index d9539ab1f..000000000 --- a/example-24/null.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - FUSE: Filesystem in Userspace - Copyright (C) 2001-2005 Miklos Szeredi - - This program can be distributed under the terms of the GNU GPL. - See the file COPYING. -*/ - -#include -#include -#include -#include -#include - -static int null_getattr(const char *path, struct stat *stbuf) -{ - if(strcmp(path, "/") != 0) - return -ENOENT; - - stbuf->st_mode = S_IFREG | 0644; - stbuf->st_nlink = 1; - stbuf->st_uid = getuid(); - stbuf->st_gid = getgid(); - stbuf->st_size = (1ULL << 32); /* 4G */ - stbuf->st_blocks = 0; - stbuf->st_atime = stbuf->st_mtime = stbuf->st_ctime = time(NULL); - - return 0; -} - -static int null_truncate(const char *path, off_t size) -{ - (void) size; - - if(strcmp(path, "/") != 0) - return -ENOENT; - - return 0; -} - -static int null_open(const char *path, struct fuse_file_info *fi) -{ - (void) fi; - - if(strcmp(path, "/") != 0) - return -ENOENT; - - return 0; -} - -static int null_read(const char *path, char *buf, size_t size, - off_t offset, struct fuse_file_info *fi) -{ - (void) buf; - (void) offset; - (void) fi; - - if(strcmp(path, "/") != 0) - return -ENOENT; - - return size; -} - -static int null_write(const char *path, const char *buf, size_t size, - off_t offset, struct fuse_file_info *fi) -{ - (void) buf; - (void) offset; - (void) fi; - - if(strcmp(path, "/") != 0) - return -ENOENT; - - return size; -} - -static struct fuse_operations null_oper = { - .getattr = null_getattr, - .truncate = null_truncate, - .open = null_open, - .read = null_read, - .write = null_write, -}; - -int main(int argc, char *argv[]) -{ - return fuse_main(argc, argv, &null_oper); -} -- cgit v1.2.3