diff options
author | Pino Toscano <toscano.pino@tiscali.it> | 2013-03-24 16:46:37 +0100 |
---|---|---|
committer | Pino Toscano <toscano.pino@tiscali.it> | 2013-03-24 16:46:37 +0100 |
commit | cd50c0de1db93520000bfb907caf07e51aa6cec5 (patch) | |
tree | 255e199b8840d670293ef947e2e713920dd583dd /src/fuse_i.h | |
parent | 9483570dadbe5675dbae5c0e8447225e8e880825 (diff) |
Fix context and user data handling at init time
Make sure, using an helper function, to have an existing context before calling
the init fuse operation. Also, the USER_DATA arg of fuse_new must be set as
new PRIVATE_DATA in the fuse context before calling the init fuse operation.
* src/fuse_i.h (struct iouser): New forward declaration.
(struct fuse): Remove field 'user_data'.
(update_context_struct): New function.
* src/main.c (fuse_new): Update LIBFUSE_CTX correctly before and after calling
init.
* src/netfs.c (refresh_context_struct): Call refresh_context_struct.
(update_context_struct): New function, mostly derived from
refresh_context_struct. Update CTX->FUSE and CTX->PRIVATE_DATA correctly.
Diffstat (limited to 'src/fuse_i.h')
-rw-r--r-- | src/fuse_i.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fuse_i.h b/src/fuse_i.h index 49c4c0639..472bc6503 100644 --- a/src/fuse_i.h +++ b/src/fuse_i.h @@ -22,6 +22,8 @@ # include "fuse_compat.h" #endif +struct iouser; + /* write out message to stderr, that some routine is not yet implemented, * thus misbehaviour must be accepted. */ #define NOT_IMPLEMENTED() \ @@ -36,7 +38,6 @@ struct fuse { struct fuse_operations ops; } op; struct fuse_conn_info conn; - void *user_data; void *private_data; }; @@ -58,6 +59,8 @@ extern struct fuse *libfuse_fuse; extern __thread struct fuse_context *libfuse_ctx; +extern void update_context_struct(struct iouser *cred, struct fuse *fuse); + /***************************************************************************** *** netnodes (in memory representation of libfuse's files or directories) *** *****************************************************************************/ |