diff options
-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, |