tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
refuse: fuse_setup 26 incompatibility
hi,
fuse_setup changed between API version 2.5 and 2.6. Our librefuse
always presents the 2.5 interface, even when the application requests
2.6. The attached diff implements the 2.6 version and interface
selection based on FUSE_USE_VERSION.
Okay to commit?
yours,
dillo
Index: fuse.h
===================================================================
RCS file: /cvsroot/src/lib/librefuse/fuse.h,v
retrieving revision 1.20
diff -u -r1.20 fuse.h
--- fuse.h 14 Jan 2008 20:46:11 -0000 1.20
+++ fuse.h 4 Jul 2008 09:15:13 -0000
@@ -162,8 +162,8 @@
void fuse_unmount(const char *, struct fuse_chan *);
-struct fuse *fuse_setup(int, char **, const struct fuse_operations *,
- size_t, char **, int *, int *);
+struct fuse *fuse_setup_real(int, char **, const struct fuse_operations *,
+ size_t, char **, int *, int *, void *);
void fuse_teardown(struct fuse *, char *);
#if FUSE_USE_VERSION == 22
@@ -175,9 +175,15 @@
#if FUSE_USE_VERSION >= 26
#define fuse_main(argc, argv, op, arg) \
fuse_main_real(argc, argv, op, sizeof(*(op)), arg)
+#define fuse_setup(argc, argv, ops, size, mountpoint, multithreaded,
user_data)\
+ fuse_setup_real((argc), (argv), (ops), (size), (mountpoint), \
+ (multithreaded), NULL, (user_data))
#else
#define fuse_main(argc, argv, op) \
fuse_main_real(argc, argv, op, sizeof(*(op)), NULL)
+#define fuse_setup(argc, argv, ops, size, mountpoint, multithreaded, fd)\
+ fuse_setup_real((argc), (argv), (ops), (size), (mountpoint), \
+ (multithreaded), (fd), NULL)
#endif
#ifdef __cplusplus
Index: refuse.c
===================================================================
RCS file: /cvsroot/src/lib/librefuse/refuse.c,v
retrieving revision 1.88
diff -u -r1.88 refuse.c
--- refuse.c 14 Jan 2008 16:07:00 -0000 1.88
+++ refuse.c 4 Jul 2008 09:15:14 -0000
@@ -365,8 +365,9 @@
/* this function exposes struct fuse to userland */
struct fuse *
-fuse_setup(int argc, char **argv, const struct fuse_operations *ops,
- size_t size, char **mountpoint, int *multithreaded, int *fd)
+fuse_setup_real(int argc, char **argv, const struct fuse_operations *ops,
+ size_t size, char **mountpoint, int *multithreaded, int *fd,
+ void *user_data)
{
struct fuse_chan *fc;
struct fuse_args *args;
@@ -397,7 +398,7 @@
}
fc = fuse_mount(*mountpoint = argv[i], args);
- fuse = fuse_new(fc, args, ops, size, NULL);
+ fuse = fuse_new(fc, args, ops, size, user_data);
fuse_opt_free_args(args);
free(args);
Home |
Main Index |
Thread Index |
Old Index