mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-01 08:22:59 -05:00
dll: fuse3: fuse2to3 implementation
This commit is contained in:
@ -759,6 +759,11 @@ FSP_FUSE_API struct fuse_context *fsp_fuse_get_context(struct fsp_fuse_env *env)
|
||||
return context;
|
||||
}
|
||||
|
||||
struct fuse_context *fsp_fuse_get_context_internal(void)
|
||||
{
|
||||
return TlsGetValue(fsp_fuse_tlskey);
|
||||
}
|
||||
|
||||
FSP_FUSE_API int32_t fsp_fuse_ntstatus_from_errno(struct fsp_fuse_env *env,
|
||||
int err)
|
||||
{
|
||||
|
@ -1617,7 +1617,8 @@ exit:
|
||||
return Result;
|
||||
}
|
||||
|
||||
static int fsp_fuse_intf_AddDirInfo(void *buf, const char *name,
|
||||
/* !static: used by fuse2to3 */
|
||||
int fsp_fuse_intf_AddDirInfo(void *buf, const char *name,
|
||||
const struct fuse_stat *stbuf, fuse_off_t off)
|
||||
{
|
||||
struct fuse_dirhandle *dh = buf;
|
||||
|
@ -25,9 +25,9 @@
|
||||
#define FSP_FUSE_LIBRARY_NAME LIBRARY_NAME "-FUSE"
|
||||
|
||||
#define FSP_FUSE_HDR_FROM_CONTEXT(c) \
|
||||
(struct fsp_fuse_context_header *)((PUINT8)(c) - sizeof(struct fsp_fuse_context_header))
|
||||
((struct fsp_fuse_context_header *)((PUINT8)(c) - sizeof(struct fsp_fuse_context_header)))
|
||||
#define FSP_FUSE_CONTEXT_FROM_HDR(h) \
|
||||
(struct fuse_context *)((PUINT8)(h) + sizeof(struct fsp_fuse_context_header))
|
||||
((struct fuse_context *)((PUINT8)(h) + sizeof(struct fsp_fuse_context_header)))
|
||||
|
||||
#define FSP_FUSE_HAS_SYMLINKS(f) ((f)->has_symlinks)
|
||||
|
||||
@ -61,6 +61,7 @@ struct fuse
|
||||
struct fsp_fuse_context_header
|
||||
{
|
||||
char *PosixPath;
|
||||
struct fuse3 *fuse3;
|
||||
__declspec(align(MEMORY_ALLOCATION_ALIGNMENT)) UINT8 ContextBuf[];
|
||||
};
|
||||
|
||||
@ -89,6 +90,9 @@ NTSTATUS fsp_fuse_op_enter(FSP_FILE_SYSTEM *FileSystem,
|
||||
NTSTATUS fsp_fuse_op_leave(FSP_FILE_SYSTEM *FileSystem,
|
||||
FSP_FSCTL_TRANSACT_REQ *Request, FSP_FSCTL_TRANSACT_RSP *Response);
|
||||
|
||||
int fsp_fuse_intf_AddDirInfo(void *buf, const char *name,
|
||||
const struct fuse_stat *stbuf, fuse_off_t off);
|
||||
|
||||
extern FSP_FILE_SYSTEM_INTERFACE fsp_fuse_intf;
|
||||
|
||||
NTSTATUS fsp_fuse_get_token_uidgid(
|
||||
@ -135,4 +139,6 @@ static inline void fsp_fuse_obj_free(void *obj)
|
||||
hdr->dtor(hdr);
|
||||
}
|
||||
|
||||
struct fuse_context *fsp_fuse_get_context_internal(void);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user