aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/fuse_common.h')
-rw-r--r--include/fuse_common.h50
1 files changed, 31 insertions, 19 deletions
diff --git a/include/fuse_common.h b/include/fuse_common.h
index 0b0ea4c..054c618 100644
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -1107,28 +1107,40 @@ void fuse_loop_cfg_convert(struct fuse_loop_config *config,
struct fuse_loop_config_v1 *v1_conf);
#endif
+/**
+ * Set a feature flag in the want_ext field of fuse_conn_info.
+ *
+ * @param conn connection information
+ * @param flag feature flag to be set
+ * @return true if the flag was set, false if the flag is not supported
+ */
+bool fuse_set_feature_flag(struct fuse_conn_info *conn, uint64_t flag);
-static inline bool fuse_set_feature_flag(struct fuse_conn_info *conn,
- uint64_t flag)
-{
- if (conn->capable_ext & flag) {
- conn->want_ext |= flag;
- return true;
- }
- return false;
-}
+/**
+ * Unset a feature flag in the want_ext field of fuse_conn_info.
+ *
+ * @param conn connection information
+ * @param flag feature flag to be unset
+ */
+void fuse_unset_feature_flag(struct fuse_conn_info *conn, uint64_t flag);
+
+/**
+ * Get the value of a feature flag in the want_ext field of fuse_conn_info.
+ *
+ * @param conn connection information
+ * @param flag feature flag to be checked
+ * @return true if the flag is set, false otherwise
+ */
+bool fuse_get_feature_flag(struct fuse_conn_info *conn, uint64_t flag);
+
+/*
+ * DO NOT USE: Not part of public API, for internal test use only.
+ * The function signature or any use of it is not guaranteeed to
+ * remain stable. And neither are results of what this function does.
+ */
+int fuse_convert_to_conn_want_ext(struct fuse_conn_info *conn);
-static inline void fuse_unset_feature_flag(struct fuse_conn_info *conn,
- uint64_t flag)
-{
- conn->want_ext &= ~flag;
-}
-static inline bool fuse_get_feature_flag(struct fuse_conn_info *conn,
- uint64_t flag)
-{
- return conn->capable_ext & flag ? true : false;
-}
/* ----------------------------------------------------------- *
* Compatibility stuff *