dll: fuse: setcrtime, setchgtime

This commit is contained in:
Bill Zissimopoulos 2017-11-14 21:55:09 -08:00
parent 3d2de57e9d
commit 48ad297df1
No known key found for this signature in database
GPG Key ID: 3D4F95D52C7B3EA3
2 changed files with 20 additions and 2 deletions

View File

@ -109,8 +109,8 @@ struct fuse_operations
/* _ */ int (*getxtimes)(const char *path, /* _ */ int (*getxtimes)(const char *path,
struct fuse_timespec *bkuptime, struct fuse_timespec *crtime); struct fuse_timespec *bkuptime, struct fuse_timespec *crtime);
/* _ */ int (*setbkuptime)(const char *path, const struct fuse_timespec *tv); /* _ */ int (*setbkuptime)(const char *path, const struct fuse_timespec *tv);
/* _ */ int (*setchgtime)(const char *path, const struct fuse_timespec *tv); /* S */ int (*setchgtime)(const char *path, const struct fuse_timespec *tv);
/* _ */ int (*setcrtime)(const char *path, const struct fuse_timespec *tv); /* S */ int (*setcrtime)(const char *path, const struct fuse_timespec *tv);
/* S */ int (*chflags)(const char *path, uint32_t flags); /* S */ int (*chflags)(const char *path, uint32_t flags);
/* _ */ int (*setattr_x)(const char *path, struct fuse_setattr_x *attr); /* _ */ int (*setattr_x)(const char *path, struct fuse_setattr_x *attr);
/* _ */ int (*fsetattr_x)(const char *path, struct fuse_setattr_x *attr, /* _ */ int (*fsetattr_x)(const char *path, struct fuse_setattr_x *attr,

View File

@ -1316,6 +1316,24 @@ static NTSTATUS fsp_fuse_intf_SetBasicInfo(FSP_FILE_SYSTEM *FileSystem,
return Result; return Result;
} }
if (0 != CreationTime && 0 != f->ops.setcrtime)
{
FspPosixFileTimeToUnixTime(CreationTime, (void *)&tv[0]);
err = f->ops.setcrtime(filedesc->PosixPath, &tv[0]);
Result = fsp_fuse_ntstatus_from_errno(f->env, err);
if (!NT_SUCCESS(Result))
return Result;
}
if (0 != ChangeTime && 0 != f->ops.setchgtime)
{
FspPosixFileTimeToUnixTime(ChangeTime, (void *)&tv[0]);
err = f->ops.setchgtime(filedesc->PosixPath, &tv[0]);
Result = fsp_fuse_ntstatus_from_errno(f->env, err);
if (!NT_SUCCESS(Result))
return Result;
}
return fsp_fuse_intf_GetFileInfoEx(FileSystem, filedesc->PosixPath, &fi, return fsp_fuse_intf_GetFileInfoEx(FileSystem, filedesc->PosixPath, &fi,
&Uid, &Gid, &Mode, FileInfo); &Uid, &Gid, &Mode, FileInfo);
} }