From 89b30ef7b5ee1bb73b8efa3ccbb53c229066439e Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 23 Nov 2007 11:15:42 +0100 Subject: [PATCH] Rename mark_fd_nonblock() to mark_fd_nonblocking(). Just to be consistent with mark_fd_blocking(). --- afs.c | 6 +++--- audiod.c | 2 +- client_common.c | 2 +- dccp_recv.c | 2 +- dccp_send.c | 4 ++-- fd.c | 2 +- fd.h | 2 +- gui.c | 4 ++-- gui_common.c | 2 +- http_recv.c | 2 +- http_send.c | 4 ++-- server.c | 4 ++-- signal.c | 4 ++-- stdin.c | 2 +- stdout.c | 2 +- 15 files changed, 22 insertions(+), 22 deletions(-) diff --git a/afs.c b/afs.c index b9243a41..e84d9a88 100644 --- a/afs.c +++ b/afs.c @@ -641,7 +641,7 @@ static int setup_command_socket_or_die(void) PARA_EMERG_LOG("can not listen on socket\n"); exit(EXIT_FAILURE); } - ret = mark_fd_nonblock(socket_fd); + ret = mark_fd_nonblocking(socket_fd); if (ret < 0) { close(socket_fd); return ret; @@ -936,7 +936,7 @@ static void command_post_select(struct sched *s, struct task *t) goto out; } fd = t->ret; - t->ret = mark_fd_nonblock(fd); + t->ret = mark_fd_nonblocking(fd); if (t->ret < 0) { PARA_NOTICE_LOG("%s\n", PARA_STRERROR(-t->ret)); close(fd); @@ -990,7 +990,7 @@ __noreturn void afs_init(uint32_t cookie, int socket_fd) exit(EXIT_FAILURE); } server_socket = socket_fd; - ret = mark_fd_nonblock(server_socket); + ret = mark_fd_nonblocking(server_socket); if (ret < 0) exit(EXIT_FAILURE); PARA_INFO_LOG("server_socket: %d, afs_socket_cookie: %u\n", diff --git a/audiod.c b/audiod.c index 9d8ac94e..dfb61db4 100644 --- a/audiod.c +++ b/audiod.c @@ -869,7 +869,7 @@ static int audiod_get_socket(void) PARA_EMERG_LOG("can not listen on socket\n"); exit(EXIT_FAILURE); /* do not unlink socket */ } - mark_fd_nonblock(fd); + mark_fd_nonblocking(fd); return fd; } diff --git a/client_common.c b/client_common.c index 9574c36f..4266ddb2 100644 --- a/client_common.c +++ b/client_common.c @@ -97,7 +97,7 @@ static int client_connect(struct private_client_data *pcd) if (ret < 0) goto err_out; pcd->status = CL_CONNECTED; - ret = mark_fd_nonblock(pcd->fd); + ret = mark_fd_nonblocking(pcd->fd); if (ret < 0) goto err_out; pcd->task.pre_select = client_pre_select; diff --git a/dccp_recv.c b/dccp_recv.c index 47351afb..f0d7d66e 100644 --- a/dccp_recv.c +++ b/dccp_recv.c @@ -92,7 +92,7 @@ static int dccp_recv_open(struct receiver_node *rn) ret = -E_DCCP_CONNECT; goto err_out; } - mark_fd_nonblock(pdd->fd); + mark_fd_nonblocking(pdd->fd); return 1; err_out: dccp_recv_close(rn); diff --git a/dccp_send.c b/dccp_send.c index 1ea8de25..27623237 100644 --- a/dccp_send.c +++ b/dccp_send.c @@ -78,7 +78,7 @@ static void dccp_post_select(fd_set *rfds, __a_unused fd_set *wfds) dc->fd = ret; para_list_add(&dc->node, &clients); add_close_on_fork_list(dc->fd); - mark_fd_nonblock(dc->fd); + mark_fd_nonblocking(dc->fd); dc->cq = cq_new(DCCP_MAX_PENDING_BYTES); } @@ -109,7 +109,7 @@ static int dccp_open(void) } PARA_DEBUG_LOG("listening on fd %d\n", listen_fd); add_close_on_fork_list(listen_fd); - mark_fd_nonblock(listen_fd); + mark_fd_nonblocking(listen_fd); return 1; } diff --git a/fd.c b/fd.c index b78d266a..0adab0f2 100644 --- a/fd.c +++ b/fd.c @@ -85,7 +85,7 @@ int mark_fd_blocking(int fd) * * \return Standard. */ -int mark_fd_nonblock(int fd) +int mark_fd_nonblocking(int fd) { int flags = fcntl(fd, F_GETFL); if (flags < 0) diff --git a/fd.h b/fd.h index c7aafc67..cdfd1983 100644 --- a/fd.h +++ b/fd.h @@ -9,7 +9,7 @@ int file_exists(const char *); int para_select(int n, fd_set *readfds, fd_set *writefds, struct timeval *timeout_tv); -int mark_fd_nonblock(int fd); +int mark_fd_nonblocking(int fd); int mark_fd_blocking(int fd); void para_fd_set(int fd, fd_set *fds, int *max_fileno); __must_check int para_fgets(char *line, int size, FILE *f); diff --git a/gui.c b/gui.c index 126b40fe..d080946a 100644 --- a/gui.c +++ b/gui.c @@ -986,7 +986,7 @@ static int client_cmd_cmdline(char *cmd) if (ret < 0) return -1; command_pipe = fds[1]; - mark_fd_nonblock(command_pipe); + mark_fd_nonblocking(command_pipe); return send_output(); } @@ -1002,7 +1002,7 @@ static int display_cmd(char *cmd) if (para_exec_cmdline_pid(&cmd_pid, cmd, fds) < 0) return -1; command_pipe = fds[1]; - mark_fd_nonblock(command_pipe); + mark_fd_nonblocking(command_pipe); return send_output(); } diff --git a/gui_common.c b/gui_common.c index 607a88e8..6bd54081 100644 --- a/gui_common.c +++ b/gui_common.c @@ -21,7 +21,7 @@ int para_open_audiod_pipe(char *cmd) int ret = para_exec_cmdline_pid(&pid, cmd, fds); if (ret < 0) return ret; - ret = mark_fd_nonblock(fds[1]); + ret = mark_fd_nonblocking(fds[1]); if (ret > 0) return fds[1]; close(fds[1]); diff --git a/http_recv.c b/http_recv.c index 71aef76a..0a460adf 100644 --- a/http_recv.c +++ b/http_recv.c @@ -190,7 +190,7 @@ static int http_recv_open(struct receiver_node *rn) close(phd->fd); goto err_out; } - mark_fd_nonblock(phd->fd); + mark_fd_nonblocking(phd->fd); phd->status = HTTP_CONNECTED; return 1; err_out: diff --git a/http_send.c b/http_send.c index 7035f279..f3ae608b 100644 --- a/http_send.c +++ b/http_send.c @@ -286,7 +286,7 @@ static void http_post_select(fd_set *rfds, fd_set *wfds) numclients++; para_list_add(&hc->node, &clients); add_close_on_fork_list(hc->fd); - mark_fd_nonblock(hc->fd); + mark_fd_nonblocking(hc->fd); return; err_out: PARA_WARNING_LOG("ignoring connect request from %s (%s)\n", @@ -340,7 +340,7 @@ static int open_tcp_port(int port) self->status = SENDER_OFF; return server_fd; } - ret = mark_fd_nonblock(server_fd); + ret = mark_fd_nonblocking(server_fd); if (ret < 0) { PARA_EMERG_LOG("%s\n", PARA_STRERROR(-ret)); exit(EXIT_FAILURE); diff --git a/server.c b/server.c index 479b6b2d..bb807386 100644 --- a/server.c +++ b/server.c @@ -308,7 +308,7 @@ static unsigned init_network(void) if (ret < 0) goto err; fd = ret; - ret = mark_fd_nonblock(fd); + ret = mark_fd_nonblocking(fd); if (ret < 0) goto err; add_close_on_fork_list(fd); /* child doesn't need the listener */ @@ -363,7 +363,7 @@ static void init_afs(void) } close(afs_server_socket[1]); afs_socket = afs_server_socket[0]; - ret = mark_fd_nonblock(afs_socket); + ret = mark_fd_nonblocking(afs_socket); if (ret < 0) exit(EXIT_FAILURE); add_close_on_fork_list(afs_socket); diff --git a/signal.c b/signal.c index 33449c63..3f3dbf69 100644 --- a/signal.c +++ b/signal.c @@ -40,10 +40,10 @@ int para_signal_init(void) ret = -ERRNO_TO_PARA_ERROR(errno); goto err_out; } - ret = mark_fd_nonblock(signal_pipe[0]); + ret = mark_fd_nonblocking(signal_pipe[0]); if (ret < 0) goto err_out; - ret = mark_fd_nonblock(signal_pipe[1]); + ret = mark_fd_nonblocking(signal_pipe[1]); if (ret < 0) goto err_out; return signal_pipe[0]; diff --git a/stdin.c b/stdin.c index 4b7a962d..649d464b 100644 --- a/stdin.c +++ b/stdin.c @@ -97,6 +97,6 @@ void stdin_set_defaults(struct stdin_task *sit) sit->task.post_select = stdin_post_select; sit->task.event_handler = stdin_default_event_handler; sit->task.private_data = sit; - mark_fd_nonblock(STDIN_FILENO); + mark_fd_nonblocking(STDIN_FILENO); sprintf(sit->task.status, "stdin reader"); } diff --git a/stdout.c b/stdout.c index f39de109..fe188c9a 100644 --- a/stdout.c +++ b/stdout.c @@ -100,6 +100,6 @@ void stdout_set_defaults(struct stdout_task *sot) sot->task.post_select = stdout_post_select; sot->task.event_handler = stdout_default_event_handler; sot->eof = 0; - mark_fd_nonblock(STDOUT_FILENO); + mark_fd_nonblocking(STDOUT_FILENO); sprintf(sot->task.status, "stdout writer"); } -- 2.39.5