summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-09-20 19:21:01 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-09-20 19:21:01 +0000
commit4e6779828ed94f02e2a2c57a394b1a7d03ce3abc (patch)
tree7250b1166f21605dcdcb8df596789f6448273907
parente392379452c82e38d87959b71852180084b04dca (diff)
Tweak, shorten, use more consistant verbiage.
-rw-r--r--sbin/dhclient/clparse.c5
-rw-r--r--sbin/dhclient/dhclient.c13
-rw-r--r--sbin/dhclient/kroute.c7
-rw-r--r--sbin/dhclient/privsep.c5
4 files changed, 13 insertions, 17 deletions
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c
index 051b2dba211..a47df425cf8 100644
--- a/sbin/dhclient/clparse.c
+++ b/sbin/dhclient/clparse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clparse.c,v 1.128 2017/09/20 16:09:42 krw Exp $ */
+/* $OpenBSD: clparse.c,v 1.129 2017/09/20 19:21:00 krw Exp $ */
/* Parser for dhclient config and lease files. */
@@ -189,8 +189,7 @@ read_client_leases(char *name, struct client_lease_tq *tq)
if (token == EOF)
break;
if (token != TOK_LEASE) {
- log_warnx("%s: corrupt lease file - possible data "
- "loss!", log_procname);
+ log_warnx("%s: expecting lease", log_procname);
break;
}
add_lease(tq, parse_client_lease_statement(cfile, name));
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index e4dc2b958a1..a3bd4bfaf4f 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.508 2017/09/20 18:28:14 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.509 2017/09/20 19:21:00 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -346,7 +346,7 @@ routehandler(struct interface_info *ifi, int routefd)
}
break;
case RTM_DESYNC:
- log_warnx("%s: route socket buffer overflow", log_procname);
+ log_warnx("%s: RTM_DESYNC", log_procname);
break;
case RTM_IFINFO:
ifm = (struct if_msghdr *)rtm;
@@ -369,7 +369,7 @@ routehandler(struct interface_info *ifi, int routefd)
linkstat = interface_status(ifi->name);
if (linkstat != ifi->linkstat) {
#ifdef DEBUG
- log_debug("%s: link state %s -> %s", log_procname,
+ log_debug("%s: link %s -> %s", log_procname,
(ifi->linkstat != 0) ? "up" : "down",
(linkstat != 0) ? "up" : "down");
#endif /* DEBUG */
@@ -1110,7 +1110,7 @@ addressinuse(char *name, struct in_addr address, char *ifname)
int used = 0;
if (getifaddrs(&ifap) != 0) {
- log_warn("%s: addressinuse: getifaddrs", log_procname);
+ log_warn("%s: getifaddrs", log_procname);
return 0;
}
@@ -1150,8 +1150,7 @@ packet_to_lease(struct interface_info *ifi, struct option_data *options)
lease = calloc(1, sizeof(*lease));
if (lease == NULL) {
- log_warnx("%s: lease declined - no memory for lease",
- log_procname);
+ log_warn("%s: lease", log_procname);
return NULL;
}
@@ -2566,7 +2565,7 @@ take_charge(struct interface_info *ifi, int routefd)
fatal("poll(routefd)");
}
if ((fds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) != 0)
- fatal("routefd revents");
+ fatal("routefd: ERR|HUP|NVAL");
if (nfds == 0 || (fds[0].revents & POLLIN) == 0)
continue;
routehandler(ifi, routefd);
diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c
index 4bbc2a38b76..769b5c2d69f 100644
--- a/sbin/dhclient/kroute.c
+++ b/sbin/dhclient/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.152 2017/09/20 18:28:14 krw Exp $ */
+/* $OpenBSD: kroute.c,v 1.153 2017/09/20 19:21:00 krw Exp $ */
/*
* Copyright 2012 Kenneth R Westerback <krw@openbsd.org>
@@ -380,9 +380,8 @@ priv_add_route(char *name, int rdomain, int routefd,
sizeof(destbuf));
strlcpy(maskbuf, inet_ntoa(imsg->netmask),
sizeof(maskbuf));
- log_warn("%s: failed to add route (%s/%s via %s)",
- log_procname, destbuf, maskbuf,
- inet_ntoa(imsg->gateway));
+ log_warn("%s: add route %s/%s via %s", log_procname,
+ destbuf, maskbuf, inet_ntoa(imsg->gateway));
}
}
}
diff --git a/sbin/dhclient/privsep.c b/sbin/dhclient/privsep.c
index 414bb475019..c903a2183ce 100644
--- a/sbin/dhclient/privsep.c
+++ b/sbin/dhclient/privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.c,v 1.70 2017/09/17 21:20:23 krw Exp $ */
+/* $OpenBSD: privsep.c,v 1.71 2017/09/20 19:21:00 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -121,8 +121,7 @@ dispatch_imsg(char *name, int rdomain, int ioctlfd, int routefd,
if (sz > 0) {
resolv_conf = malloc(sz);
if (resolv_conf == NULL)
- log_warnx("%s: no memory for "
- "resolv_conf",
+ log_warn("%s: resolv_conf",
log_procname);
else
strlcpy(resolv_conf,