From 3066a21caafab6305527991de11c8eb43ec0044c Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Thu, 1 Oct 2015 16:31:19 -0400 Subject: core: use syscall wrappers instead of direct syscalls - miscellaneous 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: I1f47820534c890a00b452fa61f7438eb2b3f667c BUG: 1267967 Signed-off-by: Kaleb S. KEITHLEY Reviewed-on: http://review.gluster.org/12276 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/features/marker/src/marker.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'xlators/features/marker/src/marker.c') diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 4e4a280ba31..e579417810f 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -17,6 +17,7 @@ #include "marker-common.h" #include "byte-order.h" #include "syncop.h" +#include "syscall.h" #include @@ -178,7 +179,7 @@ marker_error_handler (xlator_t *this, marker_local_t *local, int32_t op_errno) "Indexing gone corrupt at %s (reason: %s)." " Geo-replication slave content needs to be revalidated", path, strerror (op_errno)); - unlink (priv->timestamp_file); + sys_unlink (priv->timestamp_file); return 0; } @@ -235,7 +236,7 @@ stat_stampfile (xlator_t *this, marker_conf_t *priv, GF_ASSERT (sizeof (priv->volume_uuid_bin) == 16); memcpy (vol_mark->uuid, priv->volume_uuid_bin, 16); - if (stat (priv->timestamp_file, &buf) != -1) { + if (sys_stat (priv->timestamp_file, &buf) != -1) { vol_mark->retval = 0; vol_mark->sec = htonl (buf.st_mtime); vol_mark->usec = htonl (ST_MTIM_NSEC (&buf)/1000); @@ -2101,7 +2102,7 @@ call_from_sp_client_to_reset_tmfile (call_frame_t *frame, /* TODO check whether the O_TRUNC would update the * timestamps on a zero length file on all machies. */ - close (fd); + sys_close (fd); } if (fd != -1 || errno == ENOENT) { -- cgit