aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/fuse.h57
-rw-r--r--include/fuse_lowlevel.h12
-rw-r--r--lib/fuse.c13
-rw-r--r--lib/fuse_lowlevel.c4
-rw-r--r--lib/helper.c4
5 files changed, 28 insertions, 62 deletions
diff --git a/include/fuse.h b/include/fuse.h
index c0857fd..c94b628 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -882,6 +882,9 @@ struct fuse_context {
*
* Do not call this directly, use fuse_main()
*/
+int fuse_main_real_versioned(int argc, char *argv[],
+ const struct fuse_operations *op, size_t op_size,
+ struct libfuse_version *version, void *user_data);
static inline int fuse_main_real(int argc, char *argv[],
const struct fuse_operations *op,
size_t op_size, void *user_data)
@@ -895,13 +898,6 @@ static inline int fuse_main_real(int argc, char *argv[],
"%s is a libfuse internal function, please use fuse_main()\n",
__func__);
- /* not declared globally, to restrict usage of this function */
- int fuse_main_real_versioned(int argc, char *argv[],
- const struct fuse_operations *op,
- size_t op_size,
- struct libfuse_version *version,
- void *user_data);
-
return fuse_main_real_versioned(argc, argv, op, op_size, &version,
user_data);
}
@@ -960,6 +956,9 @@ static inline int fuse_main_real(int argc, char *argv[],
*
* Example usage, see hello.c
*/
+int fuse_main_real_versioned(int argc, char *argv[],
+ const struct fuse_operations *op, size_t op_size,
+ struct libfuse_version *version, void *user_data);
static inline int fuse_main_fn(int argc, char *argv[],
const struct fuse_operations *op,
void *user_data)
@@ -971,12 +970,6 @@ static inline int fuse_main_fn(int argc, char *argv[],
.padding = 0
};
- /* not declared globally, to restrict usage of this function */
- int fuse_main_real_versioned(int argc, char *argv[],
- const struct fuse_operations *op,
- size_t op_size,
- struct libfuse_version *version,
- void *user_data);
return fuse_main_real_versioned(argc, argv, op, sizeof(*(op)), &version,
user_data);
}
@@ -1000,6 +993,14 @@ static inline int fuse_main_fn(int argc, char *argv[],
*/
void fuse_lib_help(struct fuse_args *args);
+/* Do not call this directly, use fuse_new() instead */
+struct fuse *_fuse_new_30(struct fuse_args *args,
+ const struct fuse_operations *op, size_t op_size,
+ struct libfuse_version *version, void *user_data);
+struct fuse *_fuse_new_31(struct fuse_args *args,
+ const struct fuse_operations *op, size_t op_size,
+ struct libfuse_version *version, void *user_data);
+
/**
* Create a new FUSE filesystem.
*
@@ -1028,22 +1029,10 @@ void fuse_lib_help(struct fuse_args *args);
* @return the created FUSE handle
*/
#if FUSE_USE_VERSION == 30
-struct fuse *_fuse_new_30(struct fuse_args *args,
- const struct fuse_operations *op,
- size_t op_size,
- struct libfuse_version *version,
- void *user_data);
-static inline struct fuse *
-fuse_new_fn(struct fuse_args *args,
- const struct fuse_operations *op, size_t op_size,
- void *user_data)
+static inline struct fuse *fuse_new_fn(struct fuse_args *args,
+ const struct fuse_operations *op,
+ size_t op_size, void *user_data)
{
- /* not declared globally, to restrict usage of this function */
- struct fuse *_fuse_new_30(struct fuse_args *args,
- const struct fuse_operations *op, size_t op_size,
- struct libfuse_version *version,
- void *user_data);
-
struct libfuse_version version = {
.major = FUSE_MAJOR_VERSION,
.minor = FUSE_MINOR_VERSION,
@@ -1054,10 +1043,9 @@ fuse_new_fn(struct fuse_args *args,
return _fuse_new_30(args, op, op_size, &version, user_data);
}
#else /* FUSE_USE_VERSION */
-static inline struct fuse *
-fuse_new_fn(struct fuse_args *args,
- const struct fuse_operations *op, size_t op_size,
- void *user_data)
+static inline struct fuse *fuse_new_fn(struct fuse_args *args,
+ const struct fuse_operations *op,
+ size_t op_size, void *user_data)
{
struct libfuse_version version = {
.major = FUSE_MAJOR_VERSION,
@@ -1066,11 +1054,6 @@ fuse_new_fn(struct fuse_args *args,
.padding = 0
};
- /* not declared globally, to restrict usage of this function */
- struct fuse *_fuse_new_31(struct fuse_args *args,
- const struct fuse_operations *op,
- size_t op_size, struct libfuse_version *version,
- void *user_data);
return _fuse_new_31(args, op, op_size, &version, user_data);
}
#endif
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
index b03b37a..93bcba2 100644
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -2049,6 +2049,12 @@ int fuse_parse_cmdline_312(struct fuse_args *args,
#endif
#endif
+/* Do not call this directly, use fuse_session_new() instead */
+struct fuse_session *
+fuse_session_new_versioned(struct fuse_args *args,
+ const struct fuse_lowlevel_ops *op, size_t op_size,
+ struct libfuse_version *version, void *userdata);
+
/**
* Create a low level session.
*
@@ -2088,12 +2094,6 @@ fuse_session_new_fn(struct fuse_args *args, const struct fuse_lowlevel_ops *op,
.padding = 0
};
- /* not declared globally, to restrict usage of this function */
- struct fuse_session *fuse_session_new_versioned(
- struct fuse_args *args, const struct fuse_lowlevel_ops *op,
- size_t op_size, struct libfuse_version *version,
- void *userdata);
-
return fuse_session_new_versioned(args, op, op_size, &version,
userdata);
}
diff --git a/lib/fuse.c b/lib/fuse.c
index 6c69a68..9335429 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -4924,13 +4924,8 @@ void fuse_stop_cleanup_thread(struct fuse *f)
* through the fuse_new macro
*/
struct fuse *_fuse_new_31(struct fuse_args *args,
- const struct fuse_operations *op,
- size_t op_size, struct libfuse_version *version,
- void *user_data);
-struct fuse *_fuse_new_31(struct fuse_args *args,
- const struct fuse_operations *op,
- size_t op_size, struct libfuse_version *version,
- void *user_data)
+ const struct fuse_operations *op, size_t op_size,
+ struct libfuse_version *version, void *user_data)
{
struct fuse *f;
struct node *root;
@@ -5075,10 +5070,6 @@ out:
}
/* Emulates 3.0-style fuse_new(), which processes --help */
-struct fuse *_fuse_new_30(struct fuse_args *args, const struct fuse_operations *op,
- size_t op_size,
- struct libfuse_version *version,
- void *user_data);
FUSE_SYMVER("_fuse_new_30", "_fuse_new@FUSE_3.0")
struct fuse *_fuse_new_30(struct fuse_args *args,
const struct fuse_operations *op,
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index e3e79d5..d650944 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -3247,10 +3247,6 @@ int fuse_session_receive_buf_internal(struct fuse_session *se,
struct fuse_session *
fuse_session_new_versioned(struct fuse_args *args,
const struct fuse_lowlevel_ops *op, size_t op_size,
- struct libfuse_version *version, void *userdata);
-struct fuse_session *
-fuse_session_new_versioned(struct fuse_args *args,
- const struct fuse_lowlevel_ops *op, size_t op_size,
struct libfuse_version *version, void *userdata)
{
int err;
diff --git a/lib/helper.c b/lib/helper.c
index a1cf98c..a7b2fe0 100644
--- a/lib/helper.c
+++ b/lib/helper.c
@@ -304,10 +304,6 @@ int fuse_daemonize(int foreground)
return 0;
}
-/* Not symboled, as not part of the official API */
-int fuse_main_real_versioned(int argc, char *argv[],
- const struct fuse_operations *op, size_t op_size,
- struct libfuse_version *version, void *user_data);
int fuse_main_real_versioned(int argc, char *argv[],
const struct fuse_operations *op, size_t op_size,
struct libfuse_version *version, void *user_data)