summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>2013-12-12 12:29:20 -0600
committerKarolin Seeger <kseeger@samba.org>2014-10-26 21:41:08 +0100
commitad4629bbe95f25b3fb7f6c1fbbe96fd2b8d53f1c (patch)
treeab6486a7ae072491eb6da69d7fe21c347d746899 /source3
parent6a2496a1c6d2c2a8e79085c740000d6fd0d02a3a (diff)
downloadsamba-ad4629bbe95f25b3fb7f6c1fbbe96fd2b8d53f1c.tar.gz
vfs_glusterfs: smb_stat_ex_from_stat commenting and cleanup.
Change-Id: If1b54e62b4fc2240aa17e5d1eae8f279f2fdfc42 Signed-off-by: Christopher R. Hertel <crh@samba.org> Reviewed-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Ira Cooper <ira@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_glusterfs.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index f9f8ce1406..6807df7c4a 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -111,8 +111,9 @@ static glfs_fd_t *glfd_fd_clear(int i)
return glfd;
}
-/* Helper to convert stat to stat_ex */
-
+/**
+ * Helper to convert struct stat to struct stat_ex.
+ */
static void smb_stat_ex_from_stat(struct stat_ex *dst, const struct stat *src)
{
ZERO_STRUCTP(dst);
@@ -126,23 +127,17 @@ static void smb_stat_ex_from_stat(struct stat_ex *dst, const struct stat *src)
dst->st_ex_rdev = src->st_rdev;
dst->st_ex_size = src->st_size;
dst->st_ex_atime.tv_sec = src->st_atime;
-#ifdef STAT_HAVE_NSEC
- dst->st_ex_atime.tv_nsec = src->st_atime_nsec;
-#endif
dst->st_ex_mtime.tv_sec = src->st_mtime;
-#ifdef STAT_HAVE_NSEC
- dst->st_ex_mtime.tv_nsec = src->st_mtime_nsec;
-#endif
dst->st_ex_ctime.tv_sec = src->st_ctime;
-#ifdef STAT_HAVE_NSEC
- dst->st_ex_ctime.tv_nsec = src->st_ctime_nsec;
-#endif
dst->st_ex_btime.tv_sec = src->st_mtime;
+ dst->st_ex_blksize = src->st_blksize;
+ dst->st_ex_blocks = src->st_blocks;
#ifdef STAT_HAVE_NSEC
+ dst->st_ex_atime.tv_nsec = src->st_atime_nsec;
+ dst->st_ex_mtime.tv_nsec = src->st_mtime_nsec;
+ dst->st_ex_ctime.tv_nsec = src->st_ctime_nsec;
dst->st_ex_btime.tv_nsec = src->st_mtime_nsec;
#endif
- dst->st_ex_blksize = src->st_blksize;
- dst->st_ex_blocks = src->st_blocks;
}
/* pre-opened glfs_t */