diff options
author | syl <syl@cvs.openbsd.org> | 2013-06-14 20:40:42 +0000 |
---|---|---|
committer | syl <syl@cvs.openbsd.org> | 2013-06-14 20:40:42 +0000 |
commit | 2a452811a20b55d5fb8b2b4ad59dd71e89c2e16b (patch) | |
tree | 218372d8217153b952d6cf32c0c07a81db085476 /lib/libfuse | |
parent | 900072bfb5757e0b79aaf4f65231b07a9f1fb336 (diff) |
add support for fuse_version(3). Needed by ntfs-3g.
Ok beck@ and pirofti@.
Diffstat (limited to 'lib/libfuse')
-rw-r--r-- | lib/libfuse/Makefile | 5 | ||||
-rw-r--r-- | lib/libfuse/fuse.3 | 10 | ||||
-rw-r--r-- | lib/libfuse/fuse.c | 8 | ||||
-rw-r--r-- | lib/libfuse/fuse.h | 3 |
4 files changed, 20 insertions, 6 deletions
diff --git a/lib/libfuse/Makefile b/lib/libfuse/Makefile index 5a5b068a3db..97e90bea3d0 100644 --- a/lib/libfuse/Makefile +++ b/lib/libfuse/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.2 2013/06/12 22:36:06 tedu Exp $ +# $OpenBSD: Makefile,v 1.3 2013/06/14 20:40:41 syl Exp $ LIB= fuse MAN= fuse.3 -MLINKS= fuse.3 fuse_main.3 \ +MLINKS= fuse.3 fuse_version.3 \ + fuse.3 fuse_main.3 \ fuse.3 fuse_new.3 \ fuse.3 fuse_parse_cmdline.3 \ fuse.3 fuse_mount.3 \ diff --git a/lib/libfuse/fuse.3 b/lib/libfuse/fuse.3 index 18ae910621a..e27da4a44c0 100644 --- a/lib/libfuse/fuse.3 +++ b/lib/libfuse/fuse.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fuse.3,v 1.5 2013/06/12 06:00:54 jmc Exp $ +.\" $OpenBSD: fuse.3,v 1.6 2013/06/14 20:40:41 syl Exp $ .\" .\" Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com> .\" @@ -14,11 +14,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 12 2013 $ +.Dd $Mdocdate: June 14 2013 $ .Dt FUSE 3 .Os .Sh NAME .Nm fuse , +.Nm fuse_version , .Nm fuse_main , .Nm fuse_new , .Nm fuse_parse_cmdline , @@ -37,6 +38,8 @@ .Sh SYNOPSIS .In fuse.h .Ft int +.Fn fuse_version "void" +.Ft int .Fn fuse_main "int argc" "char **argv" "const struct fuse_operations *ops" \ "void *data" .Ft struct fuse * @@ -79,6 +82,9 @@ and passing this function the argument containing all the callbacks of the filesystem. Or you can use all others functions. .Ss FUNCTIONS +.Fn fuse_version +returns the fuse version number. +.Pp .Fn fuse_new returns a .Fa struct fuse diff --git a/lib/libfuse/fuse.c b/lib/libfuse/fuse.c index d3004d094d8..14d74ab1d9a 100644 --- a/lib/libfuse/fuse.c +++ b/lib/libfuse/fuse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse.c,v 1.4 2013/06/12 22:44:42 tedu Exp $ */ +/* $OpenBSD: fuse.c,v 1.5 2013/06/14 20:40:41 syl Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -308,6 +308,12 @@ fuse_parse_cmdline(struct fuse_args *args, char **mp, int *mt, unused int *fg) } int +fuse_version(void) +{ + return (FUSE_VERSION); +} + +int fuse_main(int argc, char **argv, const struct fuse_operations *ops, void *data) { struct fuse *fuse; diff --git a/lib/libfuse/fuse.h b/lib/libfuse/fuse.h index e379e624824..c68cf10d34e 100644 --- a/lib/libfuse/fuse.h +++ b/lib/libfuse/fuse.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse.h,v 1.3 2013/06/04 20:53:26 tedu Exp $ */ +/* $OpenBSD: fuse.h,v 1.4 2013/06/14 20:40:41 syl Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -131,6 +131,7 @@ struct fuse_operations { /* * API prototypes */ +int fuse_version(void); int fuse_main(int, char **, const struct fuse_operations *, void *); struct fuse *fuse_new(struct fuse_chan *, struct fuse_args *, const struct fuse_operations *, size_t, void *); |