diff options
author | Amitay Isaacs <amitay@gmail.com> | 2016-05-27 13:32:28 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2016-06-08 10:33:19 +0200 |
commit | 3d3c15232bf7bf337127414d0c0cc639cc290710 (patch) | |
tree | a6982d8d12c1933df890b523211acbdfc4a2f80f /ctdb/common/system_util.c | |
parent | a4ac97d6c073c30c0fdefb8ae7c31d6fa6b29924 (diff) | |
download | samba-3d3c15232bf7bf337127414d0c0cc639cc290710.tar.gz |
ctdb-system: Remove duplicate functions
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/common/system_util.c')
-rw-r--r-- | ctdb/common/system_util.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/ctdb/common/system_util.c b/ctdb/common/system_util.c index 4d56fd3d853..91bd72eecbd 100644 --- a/ctdb/common/system_util.c +++ b/ctdb/common/system_util.c @@ -120,39 +120,6 @@ void reset_scheduler(void) #endif } -void set_nonblocking(int fd) -{ - int v; - - v = fcntl(fd, F_GETFL, 0); - if (v == -1) { - DEBUG(DEBUG_WARNING, ("Failed to get file status flags - %s\n", - strerror(errno))); - return; - } - if (fcntl(fd, F_SETFL, v | O_NONBLOCK) == -1) { - DEBUG(DEBUG_WARNING, ("Failed to set non_blocking on fd - %s\n", - strerror(errno))); - } -} - -void set_close_on_exec(int fd) -{ - int v; - - v = fcntl(fd, F_GETFD, 0); - if (v == -1) { - DEBUG(DEBUG_WARNING, ("Failed to get file descriptor flags - %s\n", - strerror(errno))); - return; - } - if (fcntl(fd, F_SETFD, v | FD_CLOEXEC) != 0) { - DEBUG(DEBUG_WARNING, ("Failed to set close_on_exec on fd - %s\n", - strerror(errno))); - } -} - - bool parse_ipv4(const char *s, unsigned port, struct sockaddr_in *sin) { sin->sin_family = AF_INET; |