From 978d10a42b2cfccf6bfc4df1cfad480ac3bbcb3d Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Tue, 15 Jul 2014 17:41:02 +0200 Subject: libfuse: allow setting ctime in ->setattr() --- lib/fuse_lowlevel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/fuse_lowlevel.c') diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index dc27cb5..9131811 100755 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -79,8 +79,10 @@ static void convert_attr(const struct fuse_setattr_in *attr, struct stat *stbuf) stbuf->st_size = attr->size; stbuf->st_atime = attr->atime; stbuf->st_mtime = attr->mtime; + stbuf->st_ctime = attr->ctime; ST_ATIM_NSEC_SET(stbuf, attr->atimensec); ST_MTIM_NSEC_SET(stbuf, attr->mtimensec); + ST_CTIM_NSEC_SET(stbuf, attr->ctimensec); } static size_t iov_length(const struct iovec *iov, size_t count) @@ -1173,7 +1175,8 @@ static void do_setattr(fuse_req_t req, fuse_ino_t nodeid, const void *inarg) FUSE_SET_ATTR_ATIME | FUSE_SET_ATTR_MTIME | FUSE_SET_ATTR_ATIME_NOW | - FUSE_SET_ATTR_MTIME_NOW; + FUSE_SET_ATTR_MTIME_NOW | + FUSE_SET_ATTR_CTIME; req->f->op.setattr(req, nodeid, &stbuf, arg->valid, fi); } else -- cgit v1.2.3