mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
dll: fuse: implementation checkpoint
This commit is contained in:
parent
7e1906bad5
commit
6910b67982
@ -35,7 +35,6 @@ struct fsp_fuse_core_opt_data
|
||||
set_uid, uid,
|
||||
set_gid, gid,
|
||||
set_attr_timeout, attr_timeout;
|
||||
FILETIME VolumeCreationTime;
|
||||
int set_FileInfoTimeout;
|
||||
int CaseInsensitiveSearch, PersistentAcls,
|
||||
ReparsePoints, NamedStreams,
|
||||
@ -80,9 +79,7 @@ static struct fuse_opt fsp_fuse_core_opts[] =
|
||||
FSP_FUSE_CORE_OPT("SectorSize=%hu", VolumeParams.SectorSize, 4096),
|
||||
FSP_FUSE_CORE_OPT("SectorsPerAllocationUnit=%hu", VolumeParams.SectorsPerAllocationUnit, 1),
|
||||
FSP_FUSE_CORE_OPT("MaxComponentLength=%hu", VolumeParams.MaxComponentLength, 0),
|
||||
FSP_FUSE_CORE_OPT("VolumeCreationTime=%llx", VolumeCreationTime, 0),
|
||||
FSP_FUSE_CORE_OPT("VolumeCreationTimeLo=%x", VolumeCreationTime.dwLowDateTime, 0),
|
||||
FSP_FUSE_CORE_OPT("VolumeCreationTimeHi=%x", VolumeCreationTime.dwHighDateTime, 0),
|
||||
FSP_FUSE_CORE_OPT("VolumeCreationTime=%lli", VolumeParams.VolumeCreationTime, 0),
|
||||
FSP_FUSE_CORE_OPT("VolumeSerialNumber=%lx", VolumeParams.VolumeSerialNumber, 0),
|
||||
FSP_FUSE_CORE_OPT("TransactTimeout=%u", VolumeParams.TransactTimeout, 0),
|
||||
FSP_FUSE_CORE_OPT("IrpTimeout=%u", VolumeParams.IrpTimeout, 0),
|
||||
@ -281,7 +278,8 @@ static NTSTATUS fsp_fuse_svcstart(FSP_SERVICE *Service, ULONG argc, PWSTR *argv)
|
||||
fsp_fuse_get_stat_buf(f->env, &buf, &fspbuf);
|
||||
|
||||
if (0 == f->VolumeParams.VolumeCreationTime)
|
||||
f->VolumeParams.VolumeCreationTime = 0;
|
||||
f->VolumeParams.VolumeCreationTime =
|
||||
Int32x32To64(fspbuf.st_birthtim.tv_sec, 10000000) + 116444736000000000;
|
||||
}
|
||||
|
||||
/* the FSD does not currently limit these VolumeParams fields; do so here! */
|
||||
@ -467,7 +465,6 @@ FSP_FUSE_API struct fuse *fsp_fuse_new(struct fsp_fuse_env *env,
|
||||
if (opt_data.help)
|
||||
return 0;
|
||||
|
||||
opt_data.VolumeParams.VolumeCreationTime = *(PUINT64)&opt_data.VolumeCreationTime;
|
||||
if (!opt_data.set_FileInfoTimeout && opt_data.set_attr_timeout)
|
||||
opt_data.VolumeParams.FileInfoTimeout = opt_data.set_attr_timeout * 1000;
|
||||
opt_data.VolumeParams.CaseSensitiveSearch = !opt_data.CaseInsensitiveSearch;
|
||||
|
@ -26,16 +26,9 @@
|
||||
#define fsp_fuse_opt_match_exact ((const char *)1) /* exact option match */
|
||||
#define fsp_fuse_opt_match_next ((const char *)2) /* option match, value is next arg */
|
||||
|
||||
#if defined(_WIN64)
|
||||
typedef long long strtoint_result_t;
|
||||
#else
|
||||
/* cannot use long long in 32-bit builds because we are missing symbol __allmul */
|
||||
typedef long strtoint_result_t;
|
||||
#endif
|
||||
|
||||
static strtoint_result_t strtoint(const char *p, int base, int is_signed)
|
||||
static long long strtoint(const char *p, int base, int is_signed)
|
||||
{
|
||||
strtoint_result_t v;
|
||||
long long v;
|
||||
int maxdig, maxalp, sign = +1;
|
||||
|
||||
if (is_signed)
|
||||
|
@ -312,11 +312,7 @@ void fuse_opt_parse_test(void)
|
||||
ASSERT(0 == strcmp("WwWw", data.w));
|
||||
ASSERT(1 == data.x);
|
||||
ASSERT((long)040000000001 == data.y);
|
||||
#if defined(_WIN64)
|
||||
ASSERT((long long)0x100000001 == data.z);
|
||||
#else
|
||||
ASSERT(((long long)0x100000001 & 0xffffffff) == data.z);
|
||||
#endif
|
||||
ASSERT(+1234567890 == data.dec);
|
||||
ASSERT(-1234567890 == data.neg);
|
||||
ASSERT(0xABCDEF == data.hex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user