From 3a7c00ec0c156123c47b53ec1cd7ead001fa4dfb Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Sat, 3 Feb 2007 23:32:47 +0000 Subject: Add filesystem stacking support to high level API --- lib/fuse_lowlevel.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'lib/fuse_lowlevel.c') diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index 682c503..28468df 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -75,11 +75,9 @@ static void convert_stat(const struct stat *stbuf, struct fuse_attr *attr) attr->atime = stbuf->st_atime; attr->mtime = stbuf->st_mtime; attr->ctime = stbuf->st_ctime; -#ifdef FUSE_STAT_HAS_NANOSEC - attr->atimensec = ST_ATIM(stbuf).tv_nsec; - attr->mtimensec = ST_MTIM(stbuf).tv_nsec; - attr->ctimensec = ST_CTIM(stbuf).tv_nsec; -#endif + attr->atimensec = ST_ATIM_NSEC(stbuf); + attr->mtimensec = ST_MTIM_NSEC(stbuf); + attr->ctimensec = ST_CTIM_NSEC(stbuf); } static void convert_attr(const struct fuse_setattr_in *attr, struct stat *stbuf) @@ -90,10 +88,8 @@ 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; -#ifdef FUSE_STAT_HAS_NANOSEC - ST_ATIM(stbuf).tv_nsec = attr->atimensec; - ST_MTIM(stbuf).tv_nsec = attr->mtimensec; -#endif + ST_ATIM_NSEC_SET(stbuf, attr->atimensec); + ST_MTIM_NSEC_SET(stbuf, attr->mtimensec); } static size_t iov_length(const struct iovec *iov, size_t count) -- cgit v1.2.3