]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib/gpfswrap: add gpfs_set_times_path() wrapper
authorRalph Boehme <slow@samba.org>
Thu, 5 Aug 2021 10:05:16 +0000 (12:05 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 26 Aug 2021 19:18:31 +0000 (19:18 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14771

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
lib/util/gpfswrap.c
lib/util/gpfswrap.h

index c348ed7c5b8e5b8f29eeb3020aad139fc991ecd1..5cf6d2148e742aa899e7b62940b3d0b063af75f7 100644 (file)
@@ -39,6 +39,9 @@ static int (*gpfs_get_winattrs_fn)(int fd, struct gpfs_winattr *attrs);
 static int (*gpfs_ftruncate_fn)(int fd, gpfs_off64_t length);
 static int (*gpfs_lib_init_fn)(int flags);
 static int (*gpfs_set_times_fn)(int fd, int flags, gpfs_timestruc_t times[4]);
+static int (*gpfs_set_times_path_fn)(char *path,
+                                    int flags,
+                                    gpfs_timestruc_t times[4]);
 static int (*gpfs_quotactl_fn)(const char *pathname,
                               int cmd,
                               int id,
@@ -77,6 +80,7 @@ int gpfswrap_init(void)
        gpfs_ftruncate_fn             = dlsym(l, "gpfs_ftruncate");
        gpfs_lib_init_fn              = dlsym(l, "gpfs_lib_init");
        gpfs_set_times_fn             = dlsym(l, "gpfs_set_times");
+       gpfs_set_times_path_fn        = dlsym(l, "gpfs_set_times_path");
        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");
@@ -213,6 +217,16 @@ int gpfswrap_set_times(int fd, int flags, gpfs_timestruc_t times[4])
        return gpfs_set_times_fn(fd, flags, times);
 }
 
+int gpfswrap_set_times_path(char *path, int flags, gpfs_timestruc_t times[4])
+{
+       if (gpfs_set_times_path_fn == NULL) {
+               errno = ENOSYS;
+               return -1;
+       }
+
+       return gpfs_set_times_path_fn(path, flags, times);
+}
+
 int gpfswrap_quotactl(const char *pathname, int cmd, int id, void *bufp)
 {
        if (gpfs_quotactl_fn == NULL) {
index 138e6ec696e3bbaddfa220967ad8d4fa38ee55a9..764cf686d2e56579dc6fabf5674463c56647b8bf 100644 (file)
@@ -44,6 +44,7 @@ int gpfswrap_get_winattrs(int fd, struct gpfs_winattr *attrs);
 int gpfswrap_ftruncate(int fd, gpfs_off64_t length);
 int gpfswrap_lib_init(int flags);
 int gpfswrap_set_times(int fd, int flags, gpfs_timestruc_t times[4]);
+int gpfswrap_set_times_path(char *path, 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);