mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
dll: fuse: testing
This commit is contained in:
parent
cf66fc3931
commit
6bc3ec7c8a
@ -85,7 +85,7 @@ FSP_FUSE_API void fsp_fuse_unmount(struct fsp_fuse_env *env,
|
|||||||
FSP_FUSE_API int fsp_fuse_parse_cmdline(struct fsp_fuse_env *env,
|
FSP_FUSE_API int fsp_fuse_parse_cmdline(struct fsp_fuse_env *env,
|
||||||
struct fuse_args *args,
|
struct fuse_args *args,
|
||||||
char **mountpoint, int *multithreaded, int *foreground);
|
char **mountpoint, int *multithreaded, int *foreground);
|
||||||
FSP_FUSE_API NTSTATUS fsp_fuse_ntstatus_from_errno(struct fsp_fuse_env *env,
|
FSP_FUSE_API long fsp_fuse_ntstatus_from_errno(struct fsp_fuse_env *env,
|
||||||
int err);
|
int err);
|
||||||
|
|
||||||
static inline int fuse_version(void)
|
static inline int fuse_version(void)
|
||||||
|
@ -282,7 +282,10 @@ static NTSTATUS fsp_fuse_svcstart(FSP_SERVICE *Service, ULONG argc, PWSTR *argv)
|
|||||||
memset(&stbuf, 0, sizeof stbuf);
|
memset(&stbuf, 0, sizeof stbuf);
|
||||||
err = f->ops.statfs("/", &stbuf);
|
err = f->ops.statfs("/", &stbuf);
|
||||||
if (0 != err)
|
if (0 != err)
|
||||||
|
{
|
||||||
|
Result = fsp_fuse_ntstatus_from_errno(f->env, err);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
if (stbuf.f_frsize > FSP_FUSE_SECTORSIZE_MAX)
|
if (stbuf.f_frsize > FSP_FUSE_SECTORSIZE_MAX)
|
||||||
stbuf.f_frsize = FSP_FUSE_SECTORSIZE_MAX;
|
stbuf.f_frsize = FSP_FUSE_SECTORSIZE_MAX;
|
||||||
@ -299,7 +302,10 @@ static NTSTATUS fsp_fuse_svcstart(FSP_SERVICE *Service, ULONG argc, PWSTR *argv)
|
|||||||
memset(&stbuf, 0, sizeof stbuf);
|
memset(&stbuf, 0, sizeof stbuf);
|
||||||
err = f->ops.getattr("/", (void *)&stbuf);
|
err = f->ops.getattr("/", (void *)&stbuf);
|
||||||
if (0 != err)
|
if (0 != err)
|
||||||
|
{
|
||||||
|
Result = fsp_fuse_ntstatus_from_errno(f->env, err);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
if (0 == f->VolumeParams.VolumeCreationTime)
|
if (0 == f->VolumeParams.VolumeCreationTime)
|
||||||
{
|
{
|
||||||
@ -348,6 +354,7 @@ static NTSTATUS fsp_fuse_svcstart(FSP_SERVICE *Service, ULONG argc, PWSTR *argv)
|
|||||||
|
|
||||||
f->FileSystem->UserContext = f;
|
f->FileSystem->UserContext = f;
|
||||||
FspFileSystemSetOperationGuard(f->FileSystem, fsp_fuse_op_enter, fsp_fuse_op_leave);
|
FspFileSystemSetOperationGuard(f->FileSystem, fsp_fuse_op_enter, fsp_fuse_op_leave);
|
||||||
|
FspFileSystemSetOperationGuardStrategy(f->FileSystem, f->OpGuardStrategy);
|
||||||
FspFileSystemSetDebugLog(f->FileSystem, f->DebugLog);
|
FspFileSystemSetDebugLog(f->FileSystem, f->DebugLog);
|
||||||
|
|
||||||
if (L'\0' != f->MountPoint)
|
if (L'\0' != f->MountPoint)
|
||||||
@ -562,7 +569,7 @@ static int fsp_fuse_loop_internal(struct fsp_fuse_env *env,
|
|||||||
NTSTATUS Result;
|
NTSTATUS Result;
|
||||||
ULONG ExitCode;
|
ULONG ExitCode;
|
||||||
|
|
||||||
FspFileSystemSetOperationGuardStrategy(f->FileSystem, GuardStrategy);
|
f->OpGuardStrategy = GuardStrategy;
|
||||||
|
|
||||||
Result = FspServiceLoop(f->Service);
|
Result = FspServiceLoop(f->Service);
|
||||||
ExitCode = FspServiceGetExitCode(f->Service);
|
ExitCode = FspServiceGetExitCode(f->Service);
|
||||||
|
@ -30,6 +30,7 @@ struct fuse
|
|||||||
struct fuse_operations ops;
|
struct fuse_operations ops;
|
||||||
void *data;
|
void *data;
|
||||||
UINT32 DebugLog;
|
UINT32 DebugLog;
|
||||||
|
FSP_FILE_SYSTEM_OPERATION_GUARD_STRATEGY OpGuardStrategy;
|
||||||
FSP_FSCTL_VOLUME_PARAMS VolumeParams;
|
FSP_FSCTL_VOLUME_PARAMS VolumeParams;
|
||||||
PWSTR MountPoint;
|
PWSTR MountPoint;
|
||||||
FSP_SERVICE *Service;
|
FSP_SERVICE *Service;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user