mode_t umask;
};
-#if (defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS))
/**
* The real main function
*
* Do not call this directly, use fuse_main()
*/
-int fuse_main_real(int argc, char *argv[], const struct fuse_operations *op,
- size_t op_size, struct libfuse_version *version,
- void *user_data);
-#else
-int fuse_main_real_317(int argc, char *argv[], const struct fuse_operations *op,
- size_t op_size, struct libfuse_version *version, void *user_data);
-#define fuse_main_real(argc, argv, op, op_size, version, user_data) \
- fuse_main_real_317(argc, argv, op, op_size, version, user_data);
-#endif
+static inline int fuse_main_real(int argc, char *argv[],
+ const struct fuse_operations *op,
+ size_t op_size, void *user_data)
+{
+ struct libfuse_version version = { .major = FUSE_MAJOR_VERSION,
+ .minor = FUSE_MINOR_VERSION,
+ .hotfix = FUSE_HOTFIX_VERSION,
+ .padding = 0 };
+
+ fuse_log(FUSE_LOG_ERR,
+ "%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_317(int argc, char *argv[],
+ const struct fuse_operations *op, size_t op_size,
+ struct libfuse_version *version,
+ void *user_data);
+
+ return fuse_main_real_317(argc, argv, op, op_size, &version, user_data);
+}
/**
* Main function of FUSE.
.hotfix = FUSE_HOTFIX_VERSION,
.padding = 0
};
- return fuse_main_real(argc, argv, op, sizeof(*(op)), &version,
- user_data);
+
+ /* not declared globally, to restrict usage of this function */
+ int fuse_main_real_317(int argc, char *argv[],
+ const struct fuse_operations *op, size_t op_size,
+ struct libfuse_version *version,
+ void *user_data);
+ return fuse_main_real_317(argc, argv, op, sizeof(*(op)), &version,
+ user_data);
}
/* ----------------------------------------------------------- *
#include "libfuse_config.h"
#include <stddef.h>
+#include <stdint.h>
struct fuse_args;
struct fuse_cmdline_opts;
return fuse_session_custom_io_30(se, io, fd);
}
-int fuse_main_real_30(int argc, char *argv[], const struct fuse_operations *op,
- size_t op_size, void *user_data);
-int fuse_main_real(int argc, char *argv[], const struct fuse_operations *op,
- size_t op_size, void *user_data);
-int fuse_main_real(int argc, char *argv[], const struct fuse_operations *op,
- size_t op_size, void *user_data)
-{
- return fuse_main_real_30(argc, argv, op, op_size, user_data);
-}
-
struct fuse_session *fuse_session_new_30(struct fuse_args *args,
const struct fuse_lowlevel_ops *op,
size_t op_size, void *userdata);
return fuse_session_new_30(args, op, op_size, userdata);
}
-#endif
-
+#endif /* LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS */
+int fuse_main_real_30(int argc, char *argv[], const struct fuse_operations *op,
+ size_t op_size, void *user_data);
+int fuse_main_real(int argc, char *argv[], const struct fuse_operations *op,
+ size_t op_size, void *user_data);
+int fuse_main_real(int argc, char *argv[], const struct fuse_operations *op,
+ size_t op_size, void *user_data)
+{
+ return fuse_main_real_30(argc, argv, op, op_size, user_data);
+}
FUSE_3.17 {
global:
+ fuse_main_real_317;
#if !defined(LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS)
_fuse_session_new_317;
_fuse_new_317;
- fuse_main_real_317;
#endif
fuse_passthrough_open;
fuse_passthrough_close;
return 0;
}
+/* Not symboled, as not part of the official API */
int fuse_main_real_317(int argc, char *argv[], const struct fuse_operations *op,
- size_t op_size, struct libfuse_version *version, void *user_data);
-FUSE_SYMVER("fuse_main_real_317", "fuse_main_real@@FUSE_3.17")
+ size_t op_size, struct libfuse_version *version,
+ void *user_data);
int fuse_main_real_317(int argc, char *argv[], const struct fuse_operations *op,
size_t op_size, struct libfuse_version *version, void *user_data)
{
return res;
}
+/* Not symboled, as not part of the official API */
int fuse_main_real_30(int argc, char *argv[], const struct fuse_operations *op,
size_t op_size, void *user_data);
-FUSE_SYMVER("fuse_main_real_30", "fuse_main_real@FUSE_3.0")
int fuse_main_real_30(int argc, char *argv[], const struct fuse_operations *op,
size_t op_size, void *user_data)
{
struct libfuse_version version = { 0 };
-
return fuse_main_real_317(argc, argv, op, op_size, &version, user_data);
}