aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fuse_i.h')
-rw-r--r--lib/fuse_i.h38
1 files changed, 7 insertions, 31 deletions
diff --git a/lib/fuse_i.h b/lib/fuse_i.h
index bf5e2ca..718fa14 100644
--- a/lib/fuse_i.h
+++ b/lib/fuse_i.h
@@ -85,6 +85,13 @@ struct fuse_session {
/* true if reading requests from /dev/fuse are handled internally */
bool buf_reallocable;
+
+ /*
+ * conn->want and conn_want_ext options set by libfuse , needed
+ * to correctly convert want to want_ext
+ */
+ uint32_t conn_want;
+ uint64_t conn_want_ext;
};
struct fuse_chan {
@@ -227,34 +234,3 @@ int fuse_loop_cfg_verify(struct fuse_loop_config *config);
/* room needed in buffer to accommodate header */
#define FUSE_BUFFER_HEADER_SIZE 0x1000
-/**
- * Get the wanted capability flags, converting from old format if necessary
- */
-static inline int convert_to_conn_want_ext(struct fuse_conn_info *conn,
- uint64_t want_ext_default,
- uint32_t want_default)
-{
- /*
- * Convert want to want_ext if necessary.
- * For the high level interface this function might be called
- * twice, once from the high level interface and once from the
- * low level interface. Both, with different want_ext_default and
- * want_default values. In order to suppress a failure for the
- * second call, we check if the lower 32 bits of want_ext are
- * already set to the value of want.
- */
- if (conn->want != want_default &&
- fuse_lower_32_bits(conn->want_ext) != conn->want) {
- if (conn->want_ext != want_ext_default)
- return -EINVAL;
-
- /* high bits from want_ext, low bits from want */
- conn->want_ext = fuse_higher_32_bits(conn->want_ext) |
- conn->want;
- }
-
- /* ensure there won't be a second conversion */
- conn->want = fuse_lower_32_bits(conn->want_ext);
-
- return 0;
-}