diff options
author | Pino Toscano <toscano.pino@tiscali.it> | 2013-03-22 16:59:27 +0100 |
---|---|---|
committer | Pino Toscano <toscano.pino@tiscali.it> | 2013-03-22 16:59:27 +0100 |
commit | b1f475196174db8bc750b545f23449dd5859d965 (patch) | |
tree | d62e67349927b0512a6849508d36ca4ad6512005 /example/null.c | |
parent | 70bf9589f3718ee6162eb7f0320f44a743b80b6d (diff) |
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.
Diffstat (limited to 'example/null.c')
-rw-r--r-- | example/null.c | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/example/null.c b/example/null.c deleted file mode 100644 index 2eb5c8e3c..000000000 --- a/example/null.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - FUSE: Filesystem in Userspace - Copyright (C) 2001-2004 Miklos Szeredi <miklos@szeredi.hu> - - This program can be distributed under the terms of the GNU GPL. - See the file COPYING. -*/ - -#include <fuse.h> -#include <string.h> -#include <unistd.h> -#include <time.h> -#include <errno.h> - -#define UNUSED(x) x __attribute__((unused)) - -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 UNUSED(size)) -{ - if(strcmp(path, "/") != 0) - return -ENOENT; - - return 0; -} - -static int null_open(const char *path, int UNUSED(flags)) -{ - if(strcmp(path, "/") != 0) - return -ENOENT; - - return 0; -} - -static int null_read(const char *path, char *UNUSED(buf), size_t size, - off_t UNUSED(offset)) -{ - if(strcmp(path, "/") != 0) - return -ENOENT; - - return size; -} - -static int null_write(const char *path, const char *UNUSED(buf), size_t size, - off_t UNUSED(offset)) -{ - 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[]) -{ - fuse_main(argc, argv, &null_oper); - return 0; -} |