diff options
Diffstat (limited to 'usr.sbin/ldpd/control.c')
-rw-r--r-- | usr.sbin/ldpd/control.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/ldpd/control.c b/usr.sbin/ldpd/control.c index 85e9fba7050..b6929be0e87 100644 --- a/usr.sbin/ldpd/control.c +++ b/usr.sbin/ldpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.20 2016/05/23 14:57:45 renato Exp $ */ +/* $OpenBSD: control.c,v 1.21 2016/05/23 15:14:07 renato Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -49,7 +49,7 @@ control_init(void) if ((fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0)) == -1) { - log_warn("control_init: socket"); + log_warn("%s: socket", __func__); return (-1); } @@ -59,14 +59,14 @@ control_init(void) if (unlink(LDPD_SOCKET) == -1) if (errno != ENOENT) { - log_warn("control_init: unlink %s", LDPD_SOCKET); + log_warn("%s: unlink %s", __func__, LDPD_SOCKET); close(fd); return (-1); } old_umask = umask(S_IXUSR|S_IXGRP|S_IWOTH|S_IROTH|S_IXOTH); if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) { - log_warn("control_init: bind: %s", LDPD_SOCKET); + log_warn("%s: bind: %s", __func__, LDPD_SOCKET); close(fd); umask(old_umask); return (-1); @@ -74,7 +74,7 @@ control_init(void) umask(old_umask); if (chmod(LDPD_SOCKET, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) == -1) { - log_warn("control_init: chmod"); + log_warn("%s: chmod", __func__); close(fd); (void)unlink(LDPD_SOCKET); return (-1); @@ -90,7 +90,7 @@ control_listen(void) { if (listen(control_fd, CONTROL_BACKLOG) == -1) { - log_warn("control_listen: listen"); + log_warn("%s: listen", __func__); return (-1); } @@ -125,12 +125,12 @@ control_accept(int listenfd, short event, void *bula) accept_pause(); else if (errno != EWOULDBLOCK && errno != EINTR && errno != ECONNABORTED) - log_warn("control_accept: accept"); + log_warn("%s: accept", __func__); return; } if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) { - log_warn("control_accept"); + log_warn(__func__); close(connfd); return; } @@ -175,7 +175,7 @@ control_close(int fd) struct ctl_conn *c; if ((c = control_connbyfd(fd)) == NULL) { - log_warn("control_close: fd %d: not found", fd); + log_warn("%s: fd %d: not found", __func__, fd); return; } @@ -199,7 +199,7 @@ control_dispatch_imsg(int fd, short event, void *bula) int verbose; if ((c = control_connbyfd(fd)) == NULL) { - log_warn("control_dispatch_imsg: fd %d: not found", fd); + log_warn("%s: fd %d: not found", __func__, fd); return; } @@ -278,8 +278,8 @@ control_dispatch_imsg(int fd, short event, void *bula) log_verbose(verbose); break; default: - log_debug("control_dispatch_imsg: " - "error handling imsg %d", imsg.hdr.type); + log_debug("%s: error handling imsg %d", __func__, + imsg.hdr.type); break; } imsg_free(&imsg); |