diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2004-02-25 09:19:29 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2004-02-25 09:19:29 +0000 |
commit | 33c319c567f9735633c98671bb877a9af7304b2a (patch) | |
tree | f906b7ca5b66fc4a00bbbc1672249331a0ae17c8 | |
parent | e970f305d4708134c60a9b416bd48793ac3e8844 (diff) | |
download | libfuse-33c319c567f9735633c98671bb877a9af7304b2a.tar.gz |
added fuse_get()
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | include/fuse.h | 9 | ||||
-rw-r--r-- | lib/helper.c | 5 |
3 files changed, 17 insertions, 0 deletions
@@ -2,6 +2,9 @@ * Clean up option parsing in fuse_main() + * Added fuse_get() function which returns the fuse object created + by fuse_main() + 2004-02-20 Miklos Szeredi <mszeredi@inf.bme.hu> * removed old way of mounting (fusermount mountpoint program) diff --git a/include/fuse.h b/include/fuse.h index 7fdcc6e..7a751ae 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -150,6 +150,15 @@ extern "C" { */ void fuse_main(int argc, char *argv[], const struct fuse_operations *op); +/* + * Returns the fuse object created by fuse_main() + * + * This is useful when fuse_get_context() is used. + * + * @return the fuse object + */ +struct fuse *fuse_get(void); + /* ----------------------------------------------------------- * * More detailed API * * ----------------------------------------------------------- */ diff --git a/lib/helper.c b/lib/helper.c index e06c01c..f2ed9b8 100644 --- a/lib/helper.c +++ b/lib/helper.c @@ -17,6 +17,11 @@ static struct fuse *fuse; +struct fuse *fuse_get(void) +{ + return fuse; +} + static void usage(char *progname) { fprintf(stderr, |