diff options
author | Sebastian Benoit <benno@cvs.openbsd.org> | 2017-05-28 10:37:27 +0000 |
---|---|---|
committer | Sebastian Benoit <benno@cvs.openbsd.org> | 2017-05-28 10:37:27 +0000 |
commit | 120ac24ece602fd611a09767fb2fd6cfdae37556 (patch) | |
tree | 7c7b87f711f1841b3adb1f9c77b567f3a87d23e3 /usr.sbin | |
parent | 1554a9c1fa7b5b881cd575696bf16883dde100c7 (diff) |
use __func__ in log messages.
From Hiltjo Posthuma hiltjo -AT codemadness -DOT- org, thanks!
ok florian, claudio
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/httpd/config.c | 8 | ||||
-rw-r--r-- | usr.sbin/httpd/httpd.c | 6 | ||||
-rw-r--r-- | usr.sbin/httpd/httpd.h | 8 | ||||
-rw-r--r-- | usr.sbin/httpd/proc.c | 10 |
4 files changed, 16 insertions, 16 deletions
diff --git a/usr.sbin/httpd/config.c b/usr.sbin/httpd/config.c index b8eee8c3505..4dcf433f676 100644 --- a/usr.sbin/httpd/config.c +++ b/usr.sbin/httpd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.51 2017/03/25 17:25:34 claudio Exp $ */ +/* $OpenBSD: config.c,v 1.52 2017/05/28 10:37:26 benno Exp $ */ /* * Copyright (c) 2011 - 2015 Reyk Floeter <reyk@openbsd.org> @@ -305,9 +305,9 @@ config_settls(struct httpd *env, struct server *srv) } if (srv_conf->tls_ocsp_staple_len != 0) { - DPRINTF("%s: sending ocsp staple \"%s[%u]\" to %s fd %d", __func__, - srv_conf->name, srv_conf->id, ps->ps_title[PROC_SERVER], - srv->srv_s); + DPRINTF("%s: sending ocsp staple \"%s[%u]\" to %s fd %d", + __func__, srv_conf->name, srv_conf->id, + ps->ps_title[PROC_SERVER], srv->srv_s); memset(&tls, 0, sizeof(tls)); tls.id = srv_conf->id; diff --git a/usr.sbin/httpd/httpd.c b/usr.sbin/httpd/httpd.c index 40464012814..6d1d1ff34fe 100644 --- a/usr.sbin/httpd/httpd.c +++ b/usr.sbin/httpd/httpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: httpd.c,v 1.66 2017/04/04 20:16:09 claudio Exp $ */ +/* $OpenBSD: httpd.c,v 1.67 2017/05/28 10:37:26 benno Exp $ */ /* * Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org> @@ -791,7 +791,7 @@ socket_rlimit(int maxfd) struct rlimit rl; if (getrlimit(RLIMIT_NOFILE, &rl) == -1) - fatal("socket_rlimit: failed to get resource limit"); + fatal("%s: failed to get resource limit", __func__); log_debug("%s: max open files %llu", __func__, rl.rlim_max); /* @@ -803,7 +803,7 @@ socket_rlimit(int maxfd) else rl.rlim_cur = MAXIMUM(rl.rlim_max, (rlim_t)maxfd); if (setrlimit(RLIMIT_NOFILE, &rl) == -1) - fatal("socket_rlimit: failed to set resource limit"); + fatal("%s: failed to set resource limit", __func__); } char * diff --git a/usr.sbin/httpd/httpd.h b/usr.sbin/httpd/httpd.h index 6cf2412bf44..94e13c6c13e 100644 --- a/usr.sbin/httpd/httpd.h +++ b/usr.sbin/httpd/httpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: httpd.h,v 1.131 2017/03/25 17:25:34 claudio Exp $ */ +/* $OpenBSD: httpd.h,v 1.132 2017/05/28 10:37:26 benno Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org> @@ -451,7 +451,7 @@ TAILQ_HEAD(serverauth, auth); struct server_tls_ticket { uint32_t tt_id; - uint32_t tt_keyrev; + uint32_t tt_keyrev; unsigned char tt_key[TLS_TICKET_KEY_SIZE]; }; @@ -646,8 +646,8 @@ int server_writeheader_http(struct client *clt, struct kv *, void *); int server_headers(struct client *, void *, int (*)(struct client *, struct kv *, void *), void *); int server_writeresponse_http(struct client *); -int server_response_http(struct client *, unsigned int, struct media_type *, - off_t, time_t); +int server_response_http(struct client *, unsigned int, + struct media_type *, off_t, time_t); void server_reset_http(struct client *); void server_close_http(struct client *); int server_response(struct httpd *, struct client *); diff --git a/usr.sbin/httpd/proc.c b/usr.sbin/httpd/proc.c index 7ddc01e8462..cd387a17903 100644 --- a/usr.sbin/httpd/proc.c +++ b/usr.sbin/httpd/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.36 2017/01/17 22:10:55 krw Exp $ */ +/* $OpenBSD: proc.c,v 1.37 2017/05/28 10:37:26 benno Exp $ */ /* * Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org> @@ -505,7 +505,7 @@ proc_sig_handler(int sig, short event, void *arg) /* ignore */ break; default: - fatalx("proc_sig_handler: unexpected signal"); + fatalx("%s: unexpected signal", __func__); /* NOTREACHED */ } } @@ -545,9 +545,9 @@ proc_run(struct privsep *ps, struct privsep_proc *p, root = pw->pw_dir; if (chroot(root) == -1) - fatal("proc_run: chroot"); + fatal("%s: chroot", __func__); if (chdir("/") == -1) - fatal("proc_run: chdir(\"/\")"); + fatal("%s: chdir(\"/\")", __func__); privsep_process = p->p_id; @@ -556,7 +556,7 @@ proc_run(struct privsep *ps, struct privsep_proc *p, if (setgroups(1, &pw->pw_gid) || setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) || setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) - fatal("proc_run: cannot drop privileges"); + fatal("%s: cannot drop privileges", __func__); event_init(); |