From ad4629bbe95f25b3fb7f6c1fbbe96fd2b8d53f1c Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Thu, 12 Dec 2013 12:29:20 -0600 Subject: [PATCH] vfs_glusterfs: smb_stat_ex_from_stat commenting and cleanup. Change-Id: If1b54e62b4fc2240aa17e5d1eae8f279f2fdfc42 Signed-off-by: Christopher R. Hertel Reviewed-by: Jose A. Rivera Reviewed-by: Ira Cooper --- source3/modules/vfs_glusterfs.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index f9f8ce1406b..6807df7c4ae 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 */ -- 2.11.4.GIT