From d166b798529dab4538054d0b68797c0cc17f34de Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 28 Mar 2012 12:48:00 +1100 Subject: build: Remove sys_open wrapper --- source3/lib/pidfile.c | 4 ++-- source3/lib/popt_common.c | 2 +- source3/lib/system.c | 9 --------- 3 files changed, 3 insertions(+), 12 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/pidfile.c b/source3/lib/pidfile.c index 469ddbd95f..f1c89ebaf3 100644 --- a/source3/lib/pidfile.c +++ b/source3/lib/pidfile.c @@ -66,7 +66,7 @@ pid_t pidfile_pid(const char *program_name) SAFE_FREE(name); - fd = sys_open(pidFile, O_NONBLOCK | O_RDONLY, 0644); + fd = open(pidFile, O_NONBLOCK | O_RDONLY, 0644); if (fd == -1) { SAFE_FREE(pidFile); return 0; @@ -147,7 +147,7 @@ void pidfile_create(const char *program_name) exit(1); } - fd = sys_open(pidFile_name, O_NONBLOCK | O_CREAT | O_WRONLY | O_EXCL, + fd = open(pidFile_name, O_NONBLOCK | O_CREAT | O_WRONLY | O_EXCL, 0644); if (fd == -1) { DEBUG(0,("ERROR: can't open %s: Error was %s\n", pidFile_name, diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c index 0c8f691c25..3bcee1c8d7 100644 --- a/source3/lib/popt_common.c +++ b/source3/lib/popt_common.c @@ -375,7 +375,7 @@ static void get_password_file(struct user_auth_info *auth_info) sscanf(p, "%d", &fd); close_it = false; } else if ((p = getenv("PASSWD_FILE")) != NULL) { - fd = sys_open(p, O_RDONLY, 0); + fd = open(p, O_RDONLY, 0); spec = SMB_STRDUP(p); if (fd < 0) { fprintf(stderr, "Error opening PASSWD_FILE %s: %s\n", diff --git a/source3/lib/system.c b/source3/lib/system.c index b12def5929..f22215d2a1 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -584,15 +584,6 @@ int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OF #endif } -/******************************************************************* - An open() wrapper. -********************************************************************/ - -int sys_open(const char *path, int oflag, mode_t mode) -{ - return open(path, oflag, mode); -} - /******************************************************************* An fopen() wrapper. ********************************************************************/ -- cgit