summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPino Toscano <toscano.pino@tiscali.it>2013-03-22 16:25:10 +0100
committerPino Toscano <toscano.pino@tiscali.it>2013-03-22 16:25:10 +0100
commit70bf9589f3718ee6162eb7f0320f44a743b80b6d (patch)
treee0d32cededd86db23f169af466b2efd51be8754f /src/main.c
parentdefdeff585f61dbc7cff2ea6cfa5cfc66288b6a5 (diff)
Remove support for FUSE compatibility < 25
While the default FUSE_USE_VERSION is 21, compatibility versions below 25 are rarely (if at all) used; keeping support for them is not worth, especially than they require a number of special casings all around (different fuse_operations and fuse_file_info). * src/fuse_i.h (fuse_ops_compat22, fuse_ops_compat2): Remove. (FUSE_OP_HAVE, FUSE_OP_CALL): Use only fuse_ops25. (FUSE_OP_HAVE22, FUSE_OP_CALL22): Remove. (NN_INFO, NN_INFO_APPLY): Use only info25. (struct netnode): Remove field 'compat22' in field union 'info'. * src/main.c (fuse_ops_compat22, fuse_ops_compat2, fuse_main_compat2) (fuse_main_compat2, fuse_main_real_compat22, fuse_new_compat2) (fuse_new_compat22, fuse_mount_compat22): Remove. * src/netfs.c (netfs_attempt_statfs, netfs_attempt_sync, netfs_attempt_write) (netfs_attempt_read, fuse_get_inode, get_dirents_getdir, get_dirents_readdir) (netfs_get_dirents): Use only FUSE_OP_CALL and FUSE_OP_HAVE. (get_dirents_getdir_helper_compat): Remove. * src/netnode.c (fuse_sync_filesystem): Use only FUSE_OP_CALL and NN_INFO.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c87
1 files changed, 0 insertions, 87 deletions
diff --git a/src/main.c b/src/main.c
index e9a402f7d..d6e082f89 100644
--- a/src/main.c
+++ b/src/main.c
@@ -33,8 +33,6 @@ int netfs_maxsymlinks = 12;
struct _libfuse_params libfuse_params = { 0 };
/* pointer to the fuse_operations structure of this translator process */
-const struct fuse_operations_compat22 *fuse_ops_compat22 = NULL;
-const struct fuse_operations_compat2 *fuse_ops_compat2 = NULL;
const struct fuse_operations *fuse_ops25 = NULL;
__thread struct fuse_context *libfuse_ctx;
@@ -249,35 +247,6 @@ fuse_parse_argv(int argc, char *argv[])
-/* Main function of FUSE. (compatibility one for old Fuse API) */
-int
-fuse_main_compat2(int argc, char *argv[],
- const struct fuse_operations_compat2 *op)
-{
- fuse_parse_argv(argc, argv);
-
- int fd = fuse_mount_compat22(argv[0], NULL);
- return (libfuse_params.disable_mt ? fuse_loop : fuse_loop_mt)
- (fuse_new_compat2(fd, NULL, op));
-}
-
-
-
-/* Main function of FUSE.
- * named fuse_main_real, since originial fuse.h defines a macro renaming it */
-int
-fuse_main_real_compat22(int argc, char *argv[],
- const struct fuse_operations_compat22 *op,
- size_t op_size)
-{
- fuse_parse_argv(argc, argv);
-
- int fd = fuse_mount_compat22(argv[0], NULL);
- return (libfuse_params.disable_mt ? fuse_loop : fuse_loop_mt)
- (fuse_new_compat22(fd, NULL, op, op_size));
-}
-
-
int
fuse_main_real(int argc, char *argv[], const struct fuse_operations *op,
size_t op_size)
@@ -299,28 +268,6 @@ int fuse_main(void)
/* Create a new FUSE filesystem, actually there's nothing for us to do
- * on the Hurd.
- *
- * (Compatibility function for the old Fuse API)
- */
-struct fuse *
-fuse_new_compat2(int fd, const char *opts,
- const struct fuse_operations_compat2 *op)
-{
- if(fd != FUSE_MAGIC)
- return NULL;
-
- if(fuse_parse_opts(opts))
- return NULL;
-
- fuse_ops_compat2 = op;
-
- return (void *) FUSE_MAGIC; /* we don't have a fuse structure, sorry. */
-}
-
-
-
-/* Create a new FUSE filesystem, actually there's nothing for us to do
* on the Hurd. Hmm.
*/
struct fuse *
@@ -350,31 +297,6 @@ fuse_new(int fd, struct fuse_args *args,
}
-/* Create a new FUSE filesystem, actually there's nothing for us to do
- * on the Hurd.
- */
-struct fuse *
-fuse_new_compat22(int fd, const char *opts,
- const struct fuse_operations_compat22 *op, size_t op_size)
-{
- (void) op_size; /* FIXME, see what the real Fuse library does with
- * this argument */
-
- if(fd != FUSE_MAGIC)
- return NULL;
-
- if(fuse_parse_opts(opts))
- return NULL;
-
- fuse_ops_compat22 = op;
-
- if(op->init)
- fsys_privdata = op->init();
-
- return (void *) FUSE_MAGIC; /* we don't have a fuse structure, sorry. */
-}
-
-
/* Create a new mountpoint for our fuse filesystem, i.e. do the netfs
* initialization stuff ...
*/
@@ -393,15 +315,6 @@ fuse_mount(const char *mountpoint, struct fuse_args *args)
}
-int
-fuse_mount_compat22(const char *mountpoint, const char *opts)
-{
- if(fuse_parse_opts(opts))
- return 0;
-
- return fuse_bootstrap(mountpoint);
-}
-
static int
fuse_bootstrap(const char *mountpoint)
{