diff options
author | Christof Schmitt <cs@samba.org> | 2014-12-10 15:40:16 -0700 |
---|---|---|
committer | Christof Schmitt <cs@samba.org> | 2015-03-02 22:31:08 +0100 |
commit | 1907a88a6d4f6fa62a4332cb6e15ff1e6874fc03 (patch) | |
tree | 760835a7c91a77beb62fb737bc11ed946bc71a62 /source3/modules/gpfs.c | |
parent | db01831082f3120649d742b21aaff9c90fd3cdf0 (diff) | |
download | samba-1907a88a6d4f6fa62a4332cb6e15ff1e6874fc03.tar.gz samba-1907a88a6d4f6fa62a4332cb6e15ff1e6874fc03.tar.xz samba-1907a88a6d4f6fa62a4332cb6e15ff1e6874fc03.zip |
gpfs: Introduce wrapper for gpfs_set_times_path
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.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c index b90d42292e..1659f5b32f 100644 --- a/source3/modules/gpfs.c +++ b/source3/modules/gpfs.c @@ -189,6 +189,17 @@ int gpfswrap_lib_init(int flags) return gpfs_lib_init_fn(flags); } +int gpfswrap_set_times_path(char *pathname, int flags, + gpfs_timestruc_t times[4]) +{ + if (gpfs_set_times_path_fn == NULL) { + errno = ENOSYS; + return -1; + } + + return gpfs_set_times_path_fn(pathname, flags, times); +} + bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, uint32 share_access) { @@ -350,11 +361,6 @@ int smbd_gpfs_set_times_path(char *path, struct smb_file_time *ft) int flags = 0; int rc; - if (!gpfs_set_times_path_fn) { - errno = ENOSYS; - return -1; - } - ZERO_ARRAY(gpfs_times); timespec_to_gpfs_time(ft->atime, gpfs_times, 0, &flags); timespec_to_gpfs_time(ft->mtime, gpfs_times, 1, &flags); @@ -366,9 +372,9 @@ int smbd_gpfs_set_times_path(char *path, struct smb_file_time *ft) return 0; } - rc = gpfs_set_times_path_fn(path, flags, gpfs_times); + rc = gpfswrap_set_times_path(path, flags, gpfs_times); - if (rc != 0) { + if (rc != 0 && errno != ENOSYS) { DEBUG(1,("gpfs_set_times() returned with error %s\n", strerror(errno))); } |