summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorOleksandr Natalenko <oleksandr@natalenko.name>2016-08-09 14:58:08 +0300
committerKaleb KEITHLEY <kkeithle@redhat.com>2016-08-10 04:26:47 -0700
commit09b0ebf75ad2eb76002cd1801ce64f644925af45 (patch)
tree979568f83848d78514d4b10117cdb8d882cc446c /api
parent30019e51ddefc266c939a61d26d324b7ebf3ad95 (diff)
gfapi: use const qualifier for glfs_*timens()
glfs_*timens() functions have the last argument of struct timespec type that is supposed to be const. Now using glfs_*timens() in fops, implemented on top of FUSE library, leads to compiler-time warning about discarding const qualifier. Introducing const qualifier does not break ABI, so let's just fix it. Change-Id: Iea2a1018de7dce67f67a8229671a5978246de800 BUG: 1365506 Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/15119 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs-fops.c8
-rw-r--r--api/src/glfs.h6
2 files changed, 8 insertions, 6 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index a1858b17b8b..dfa26aae82e 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -3103,7 +3103,8 @@ GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_fchown, 3.4.0);
int
-pub_glfs_utimens (struct glfs *fs, const char *path, struct timespec times[2])
+pub_glfs_utimens (struct glfs *fs, const char *path,
+ const struct timespec times[2])
{
int ret = -1;
int valid = 0;
@@ -3125,7 +3126,8 @@ GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_utimens, 3.4.0);
int
-pub_glfs_lutimens (struct glfs *fs, const char *path, struct timespec times[2])
+pub_glfs_lutimens (struct glfs *fs, const char *path,
+ const struct timespec times[2])
{
int ret = -1;
int valid = 0;
@@ -3147,7 +3149,7 @@ GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_lutimens, 3.4.0);
int
-pub_glfs_futimens (struct glfs_fd *glfd, struct timespec times[2])
+pub_glfs_futimens (struct glfs_fd *glfd, const struct timespec times[2])
{
int ret = -1;
int valid = 0;
diff --git a/api/src/glfs.h b/api/src/glfs.h
index c280cb0cc40..21dbc9b85ee 100644
--- a/api/src/glfs.h
+++ b/api/src/glfs.h
@@ -673,14 +673,14 @@ int glfs_fchown (glfs_fd_t *fd, uid_t uid, gid_t gid) __THROW
GFAPI_PUBLIC(glfs_fchown, 3.4.0);
int glfs_utimens (glfs_t *fs, const char *path,
- struct timespec times[2]) __THROW
+ const struct timespec times[2]) __THROW
GFAPI_PUBLIC(glfs_utimens, 3.4.0);
int glfs_lutimens (glfs_t *fs, const char *path,
- struct timespec times[2]) __THROW
+ const struct timespec times[2]) __THROW
GFAPI_PUBLIC(glfs_lutimens, 3.4.0);
-int glfs_futimens (glfs_fd_t *fd, struct timespec times[2]) __THROW
+int glfs_futimens (glfs_fd_t *fd, const struct timespec times[2]) __THROW
GFAPI_PUBLIC(glfs_futimens, 3.4.0);
ssize_t glfs_getxattr (glfs_t *fs, const char *path, const char *name,