diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-02-14 22:46:54 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-02-14 22:46:54 +0000 |
commit | e59a9de7dc98d1072138134e7ad04e029ac8d616 (patch) | |
tree | 9b4d942a72f91edd2098a1a249dc2cda01b50f6a /sbin/dhclient/dispatch.c | |
parent | df510596c9e4d14cafde3ebaebd45153e0be0b68 (diff) |
fatalx() prepends 'fatal in _progname:'. So eliminate redundant
'; exiting' suffix used by old style logging.
Eliminate an extra log message before fatal()'ing out with a summary
message.
Diffstat (limited to 'sbin/dhclient/dispatch.c')
-rw-r--r-- | sbin/dhclient/dispatch.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index 9c47b7bb8e7..b903cb4fd9a 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.115 2017/02/12 15:53:15 krw Exp $ */ +/* $OpenBSD: dispatch.c,v 1.116 2017/02/14 22:46:53 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -193,8 +193,7 @@ dispatch(struct interface_info *ifi) log_warnx("%s; restarting", strsignal(quit)); exit (0); } else if (quit != INTERNALSIG) { - log_warnx("%s; exiting", strsignal(quit)); - exit(1); + fatalx("%s", strsignal(quit)); } } @@ -207,12 +206,12 @@ packethandler(struct interface_info *ifi) ssize_t result; if ((result = receive_packet(ifi, &from, &hfrom)) == -1) { - log_warn("%s receive_packet failed", ifi->name); ifi->errors++; - if (ifi->errors > 20) { - fatalx("%s too many receive_packet failures; exiting", + if (ifi->errors > 20) + fatalx("%s too many receive_packet failures", ifi->name); - } + else + log_warn("%s receive_packet failed", ifi->name); return; } ifi->errors = 0; |