summaryrefslogtreecommitdiffstats
path: root/source3/modules/gpfs.c
diff options
context:
space:
mode:
authorChristof Schmitt <cs@samba.org>2014-12-10 15:56:30 -0700
committerChristof Schmitt <cs@samba.org>2015-03-02 22:31:08 +0100
commit38a89f23f1ac5e317266c66d6c08c31213afeb54 (patch)
tree1e79515fc15bf0ddc377503dd7732d47da6c4322 /source3/modules/gpfs.c
parenta5ca63b266bd11c2523463bcd20a1a638afea845 (diff)
downloadsamba-38a89f23f1ac5e317266c66d6c08c31213afeb54.tar.gz
samba-38a89f23f1ac5e317266c66d6c08c31213afeb54.tar.xz
samba-38a89f23f1ac5e317266c66d6c08c31213afeb54.zip
gpfs: Move smbd_gpfs_set_times_path to vfs_gpfs.c
Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
Diffstat (limited to 'source3/modules/gpfs.c')
-rw-r--r--source3/modules/gpfs.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c
index 4b9b7757f3..d05fe50ce6 100644
--- a/source3/modules/gpfs.c
+++ b/source3/modules/gpfs.c
@@ -228,41 +228,3 @@ int gpfswrap_getfilesetid(char *pathname, char *name, int *idp)
return gpfs_getfilesetid_fn(pathname, name, idp);
}
-
-static void timespec_to_gpfs_time(struct timespec ts, gpfs_timestruc_t *gt,
- int idx, int *flags)
-{
- if (!null_timespec(ts)) {
- *flags |= 1 << idx;
- gt[idx].tv_sec = ts.tv_sec;
- gt[idx].tv_nsec = ts.tv_nsec;
- DEBUG(10, ("Setting GPFS time %d, flags 0x%x\n", idx, *flags));
- }
-}
-
-int smbd_gpfs_set_times_path(char *path, struct smb_file_time *ft)
-{
- gpfs_timestruc_t gpfs_times[4];
- int flags = 0;
- int rc;
-
- ZERO_ARRAY(gpfs_times);
- timespec_to_gpfs_time(ft->atime, gpfs_times, 0, &flags);
- timespec_to_gpfs_time(ft->mtime, gpfs_times, 1, &flags);
- /* No good mapping from LastChangeTime to ctime, not storing */
- timespec_to_gpfs_time(ft->create_time, gpfs_times, 3, &flags);
-
- if (!flags) {
- DEBUG(10, ("nothing to do, return to avoid EINVAL\n"));
- return 0;
- }
-
- rc = gpfswrap_set_times_path(path, flags, gpfs_times);
-
- if (rc != 0 && errno != ENOSYS) {
- DEBUG(1,("gpfs_set_times() returned with error %s\n",
- strerror(errno)));
- }
-
- return rc;
-}