]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-system: Remove duplicate functions
authorAmitay Isaacs <amitay@gmail.com>
Fri, 27 May 2016 03:32:28 +0000 (13:32 +1000)
committerAmitay Isaacs <amitay@samba.org>
Wed, 8 Jun 2016 08:33:19 +0000 (10:33 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/common/system.h
ctdb/common/system_util.c

index 2b469dc1fee154553f1807c6436661156b5effbf..2007814ce3b8dc37eb650884453b7ce5bbbdf1ff 100644 (file)
@@ -47,8 +47,6 @@ int ctdb_get_peer_pid(const int fd, pid_t *peer_pid);
 
 bool set_scheduler(void);
 void reset_scheduler(void);
-void set_nonblocking(int fd);
-void set_close_on_exec(int fd);
 
 bool parse_ipv4(const char *s, unsigned port, struct sockaddr_in *sin);
 bool parse_ip(const char *addr, const char *ifaces, unsigned port,
index 4d56fd3d8532665f2ad03e0bc81a5a0232c49f2f..91bd72eecbdeac1f289f2a3d449b05b8b7271210 100644 (file)
@@ -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;