From 2099cc875a4d20ab1bb12b1c33da16c95968e202 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Thu, 1 Oct 2015 16:28:58 -0400 Subject: core: use syscall wrappers instead of direct syscalls - libglusterfs 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: Ieeca2d36adbc884e4cfa0026dba40df70310d40b BUG: 1267967 Signed-off-by: Kaleb S. KEITHLEY Reviewed-on: http://review.gluster.org/12275 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Jeff Darcy --- libglusterfs/src/graph.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libglusterfs/src/graph.c') diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c index ed12b1c0e7f..2e290bb20a1 100644 --- a/libglusterfs/src/graph.c +++ b/libglusterfs/src/graph.c @@ -15,6 +15,7 @@ #include #include "defaults.h" #include +#include "syscall.h" #include "libglusterfs-messages.h" @@ -834,13 +835,13 @@ glusterfs_volfile_reconfigure (int oldvollen, FILE *newvolfile_fp, /*Calling unlink so that when the file is closed or program *terminates the tempfile is deleted. */ - u_ret = unlink(temp_file); + u_ret = sys_unlink(temp_file); if (u_ret < 0) { gf_msg ("glusterfsd-mgmt", GF_LOG_ERROR, errno, LG_MSG_TMPFILE_DELETE_FAILED, "Temporary file" " delete failed."); - close (file_desc); + sys_close (file_desc); goto out; } -- cgit