mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 08:53:01 -05:00
dll: fuse3: testing
This commit is contained in:
parent
4a653a8bc0
commit
0d819eb800
@ -1427,7 +1427,8 @@ static NTSTATUS fsp_fuse_intf_SetFileSize(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fsp_fuse_intf_CanDeleteAddDirInfo(void *buf, const char *name,
|
/* !static: used by fuse2to3 */
|
||||||
|
int fsp_fuse_intf_CanDeleteAddDirInfo(void *buf, const char *name,
|
||||||
const struct fuse_stat *stbuf, fuse_off_t off)
|
const struct fuse_stat *stbuf, fuse_off_t off)
|
||||||
{
|
{
|
||||||
struct fuse_dirhandle *dh = buf;
|
struct fuse_dirhandle *dh = buf;
|
||||||
|
@ -90,6 +90,8 @@ NTSTATUS fsp_fuse_op_enter(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
NTSTATUS fsp_fuse_op_leave(FSP_FILE_SYSTEM *FileSystem,
|
NTSTATUS fsp_fuse_op_leave(FSP_FILE_SYSTEM *FileSystem,
|
||||||
FSP_FSCTL_TRANSACT_REQ *Request, FSP_FSCTL_TRANSACT_RSP *Response);
|
FSP_FSCTL_TRANSACT_REQ *Request, FSP_FSCTL_TRANSACT_RSP *Response);
|
||||||
|
|
||||||
|
int fsp_fuse_intf_CanDeleteAddDirInfo(void *buf, const char *name,
|
||||||
|
const struct fuse_stat *stbuf, fuse_off_t off);
|
||||||
int fsp_fuse_intf_AddDirInfo(void *buf, const char *name,
|
int fsp_fuse_intf_AddDirInfo(void *buf, const char *name,
|
||||||
const struct fuse_stat *stbuf, fuse_off_t off);
|
const struct fuse_stat *stbuf, fuse_off_t off);
|
||||||
|
|
||||||
|
@ -235,6 +235,13 @@ static int fuse2to3_opendir(const char *path, struct fuse_file_info *fi)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int fuse2to3_candel_filldir(void *buf, const char *name,
|
||||||
|
const struct fuse_stat *stbuf, fuse_off_t off,
|
||||||
|
enum fuse3_fill_dir_flags flags)
|
||||||
|
{
|
||||||
|
return fsp_fuse_intf_CanDeleteAddDirInfo(buf, name, 0, off);
|
||||||
|
}
|
||||||
|
|
||||||
static int fuse2to3_filldir(void *buf, const char *name,
|
static int fuse2to3_filldir(void *buf, const char *name,
|
||||||
const struct fuse_stat *stbuf, fuse_off_t off,
|
const struct fuse_stat *stbuf, fuse_off_t off,
|
||||||
enum fuse3_fill_dir_flags flags)
|
enum fuse3_fill_dir_flags flags)
|
||||||
@ -251,8 +258,17 @@ static int fuse2to3_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
|
|||||||
struct fuse_dirhandle *dh = buf;
|
struct fuse_dirhandle *dh = buf;
|
||||||
struct fuse3_file_info fi3;
|
struct fuse3_file_info fi3;
|
||||||
fuse2to3_fi3from2(&fi3, fi);
|
fuse2to3_fi3from2(&fi3, fi);
|
||||||
int res = f3->ops.readdir(path, buf, &fuse2to3_filldir, off, &fi3,
|
int res;
|
||||||
|
if (fsp_fuse_intf_CanDeleteAddDirInfo == filler)
|
||||||
|
res = f3->ops.readdir(path, buf, &fuse2to3_candel_filldir, off, &fi3, 0);
|
||||||
|
else if (fsp_fuse_intf_AddDirInfo == filler)
|
||||||
|
res = f3->ops.readdir(path, buf, &fuse2to3_filldir, off, &fi3,
|
||||||
dh->ReaddirPlus ? FUSE_READDIR_PLUS : 0);
|
dh->ReaddirPlus ? FUSE_READDIR_PLUS : 0);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FspDebugLog("fuse2to3_readdir = -ENOSYS (internal error: unknown filler)\n");
|
||||||
|
res = -ENOSYS_(f3->fuse->env);
|
||||||
|
}
|
||||||
fuse2to3_fi2from3(fi, &fi3);
|
fuse2to3_fi2from3(fi, &fi3);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user