diff options
author | Samuel Cabrero <scabrero@samba.org> | 2021-04-13 14:38:08 +0200 |
---|---|---|
committer | Samuel Cabrero <scabrero@sn-devel-184> | 2021-04-19 12:28:30 +0000 |
commit | 28174fc1e7cd9861df710a55c180635f616178f0 (patch) | |
tree | 788cf3150b373db841a399aaf97d2a418264ab37 /lib/util | |
parent | 7125279a1e0f97ea9a9a7232720fa5b6b4a6b04a (diff) | |
download | samba-28174fc1e7cd9861df710a55c180635f616178f0.tar.gz |
gpfswrap: Add wrapper for gpfs_set_times()
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/gpfswrap.c | 12 | ||||
-rw-r--r-- | lib/util/gpfswrap.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/util/gpfswrap.c b/lib/util/gpfswrap.c index 14118cbf53c..f515e064999 100644 --- a/lib/util/gpfswrap.c +++ b/lib/util/gpfswrap.c @@ -40,6 +40,7 @@ static int (*gpfs_ftruncate_fn)(int fd, gpfs_off64_t length); static int (*gpfs_lib_init_fn)(int flags); static int (*gpfs_set_times_path_fn)(char *pathname, int flags, gpfs_timestruc_t times[4]); +static int (*gpfs_set_times_fn)(int fd, int flags, gpfs_timestruc_t times[4]); static int (*gpfs_quotactl_fn)(const char *pathname, int cmd, int id, @@ -78,6 +79,7 @@ int gpfswrap_init(void) gpfs_ftruncate_fn = dlsym(l, "gpfs_ftruncate"); gpfs_lib_init_fn = dlsym(l, "gpfs_lib_init"); gpfs_set_times_path_fn = dlsym(l, "gpfs_set_times_path"); + gpfs_set_times_fn = dlsym(l, "gpfs_set_times"); gpfs_quotactl_fn = dlsym(l, "gpfs_quotactl"); gpfs_init_trace_fn = dlsym(l, "gpfs_init_trace"); gpfs_query_trace_fn = dlsym(l, "gpfs_query_trace"); @@ -215,6 +217,16 @@ int gpfswrap_set_times_path(char *pathname, int flags, return gpfs_set_times_path_fn(pathname, flags, times); } +int gpfswrap_set_times(int fd, int flags, gpfs_timestruc_t times[4]) +{ + if (gpfs_set_times_fn == NULL) { + errno = ENOSYS; + return -1; + } + + return gpfs_set_times_fn(fd, flags, times); +} + int gpfswrap_quotactl(const char *pathname, int cmd, int id, void *bufp) { if (gpfs_quotactl_fn == NULL) { diff --git a/lib/util/gpfswrap.h b/lib/util/gpfswrap.h index f62d690ac06..80ebbb18219 100644 --- a/lib/util/gpfswrap.h +++ b/lib/util/gpfswrap.h @@ -45,6 +45,7 @@ int gpfswrap_ftruncate(int fd, gpfs_off64_t length); int gpfswrap_lib_init(int flags); int gpfswrap_set_times_path(char *pathname, int flags, gpfs_timestruc_t times[4]); +int gpfswrap_set_times(int fd, int flags, gpfs_timestruc_t times[4]); int gpfswrap_quotactl(const char *pathname, int cmd, int id, void *bufp); int gpfswrap_init_trace(void); int gpfswrap_query_trace(void); |