summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-snapshot.c
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2014-05-15 00:15:52 -0700
committerAnand Avati <avati@redhat.com>2014-05-17 11:52:53 -0700
commitaa85de4be3f96a140a69170330293bfdfa3d24e7 (patch)
tree8ae6a10aa4b850492aa3cd109db5150e63aa9667 /xlators/mgmt/glusterd/src/glusterd-snapshot.c
parentf4a391e5a44950b0468af082255b9f5abf52b10b (diff)
contrib: Cross platform fixes after recent commits
- provide a getment_r () version which behaves as re-entrant with some caveats for NetBSD/OSX specific. - some apparent warning issues fixed, always use PRI* format specification avoid using %ld i.e not portable Change-Id: Ib3d1a73b426e38b436b356355b97db0104a1a4a5 BUG: 1089172 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7722 Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index e47f85f7ff4..e4aa838acaf 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -1272,7 +1272,7 @@ glusterd_snap_create_pre_val_use_rsp_dict (dict_t *dst, dict_t *src)
}
snprintf (key, sizeof (key),
- "vol%ld.brick%ld.status", i+1, brick_order);
+ "vol%"PRId64".brick%"PRId64".status", i+1, brick_order);
ret = dict_get_int32 (src, key, &brick_online);
if (ret) {
gf_log (this->name, GF_LOG_ERROR, "failed to "
@@ -1700,7 +1700,7 @@ glusterd_snapshot_create_prevalidate (dict_t *dict, char **op_errstr,
goto out;
}
- snprintf (key, sizeof (key), "vol%ld.brick%ld.status",
+ snprintf (key, sizeof (key), "vol%"PRId64".brick%"PRId64".status",
i, brick_order);
ret = glusterd_add_brick_status_to_dict (rsp_dict,
@@ -3720,7 +3720,7 @@ glusterd_add_brick_to_snap_volume (dict_t *dict, dict_t *rsp_dict,
GF_ASSERT (snap_vol);
GF_ASSERT (original_brickinfo);
- snprintf (key, sizeof(key), "vol%ld.origin_brickpath%d",
+ snprintf (key, sizeof(key), "vol%"PRId64".origin_brickpath%d",
volcount, brick_count);
ret = dict_set_dynstr_with_alloc (dict, key, original_brickinfo->path);
if (ret) {