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/nfs/server/src/nlm4.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlators/nfs/server/src/nlm4.c') diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c index 26c45e089b0..3da3b2d1c05 100644 --- a/xlators/nfs/server/src/nlm4.c +++ b/xlators/nfs/server/src/nlm4.c @@ -15,6 +15,7 @@ #include "nfs.h" #include "mem-pool.h" #include "logging.h" +#include "syscall.h" #include "nfs-fops.h" #include "inode.h" #include "mount3.h" @@ -2505,7 +2506,7 @@ nlm4svc_init(xlator_t *nfsx) instead. This is still a theory but we need to thoroughly test it out. Until then NLM support is non-existent on OSX. */ - ret = unlink (GF_SM_NOTIFY_PIDFILE); + ret = sys_unlink (GF_SM_NOTIFY_PIDFILE); if (ret == -1 && errno != ENOENT) { gf_msg (GF_NLM, GF_LOG_ERROR, errno, NFS_MSG_UNLINK_ERROR, "unable to unlink %s: %d", @@ -2542,7 +2543,7 @@ nlm4svc_init(xlator_t *nfsx) ret = runcmd (KILLALL_CMD, "-9", "rpc.statd", NULL); } - ret = unlink (GF_RPC_STATD_PIDFILE); + ret = sys_unlink (GF_RPC_STATD_PIDFILE); if (ret == -1 && errno != ENOENT) { gf_msg (GF_NLM, GF_LOG_ERROR, errno, NFS_MSG_UNLINK_ERROR, "unable to unlink %s", pid_file); -- cgit