diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2015-10-16 13:52:28 -0400 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2015-10-28 06:55:04 -0700 |
commit | 063d4ead61ee47433793de81a1c77e0ba69e6e07 (patch) | |
tree | 484f5fe3093d7eec12a282f77e2df496afff6ee2 /xlators/mgmt/glusterd/src/glusterd-op-sm.c | |
parent | 641b3a9164227db52df1aab05795c90d06b315f2 (diff) |
core: use syscall wrappers instead of direct syscalls -- glusterd
various xlators and other components are invoking system calls
directly instead of using the libglusterfs/syscall.[ch] wrappers.
If not using the system call wrappers there should be a comment
in the source explaining why the wrapper isn't used.
Change-Id: I28bf2a5f7730b35914e7ab57fed91e1966b30073
BUG: 1267967
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/12379
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 39c989fa53e..ed8fae1dc4b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -1220,7 +1220,7 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr) /* Checks whether a directory with given option exists or not */ - if (!stat(trash_path, &stbuf)) { + if (!sys_stat (trash_path, &stbuf)) { snprintf (errstr, sizeof (errstr), "Path %s exists", @@ -2487,12 +2487,12 @@ glusterd_op_set_volume (dict_t *dict, char **errstr) for (count = 1; ret != -1 ; count++) { - sprintf (str, "key%d", count); + snprintf (str, sizeof str, "key%d", count); ret = dict_get_str (dict, str, &key); if (ret) break; - sprintf (str, "value%d", count); + snprintf (str, sizeof str, "value%d", count); ret = dict_get_str (dict, str, &value); if (ret) { gf_msg (this->name, GF_LOG_ERROR, 0, |