diff options
author | rob <rob@cvs.openbsd.org> | 2017-08-08 14:09:39 +0000 |
---|---|---|
committer | rob <rob@cvs.openbsd.org> | 2017-08-08 14:09:39 +0000 |
commit | 81f8e168510293ffbff6ec24ea66adf497414184 (patch) | |
tree | 14936f40ea2d40721042f339d7f79db30bc7c4f2 /usr.sbin/ifstated/ifstated.c | |
parent | 53ba93879ddf5dc8ac4e9eac301f5510dd1b4dbc (diff) |
Consistent use of log.c, and removal of err.h include. Makes ifstated
configtest output the same as other networking daemons.
Ok jca@
Diffstat (limited to 'usr.sbin/ifstated/ifstated.c')
-rw-r--r-- | usr.sbin/ifstated/ifstated.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.sbin/ifstated/ifstated.c b/usr.sbin/ifstated/ifstated.c index 73ef7f7f413..d536da825e4 100644 --- a/usr.sbin/ifstated/ifstated.c +++ b/usr.sbin/ifstated/ifstated.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifstated.c,v 1.57 2017/08/06 19:27:54 rob Exp $ */ +/* $OpenBSD: ifstated.c,v 1.58 2017/08/08 14:09:38 rob Exp $ */ /* * Copyright (c) 2004 Marco Pfatschbacher <mpf@openbsd.org> @@ -37,7 +37,6 @@ #include <signal.h> #include <stdint.h> #include <syslog.h> -#include <err.h> #include <errno.h> #include <event.h> #include <unistd.h> @@ -103,7 +102,7 @@ main(int argc, char *argv[]) break; case 'D': if (cmdline_symset(optarg) < 0) - errx(1, "could not parse macro definition %s", + fatalx("could not parse macro definition %s", optarg); break; case 'f': @@ -136,7 +135,7 @@ main(int argc, char *argv[]) if (opts & IFSD_OPT_NOACTION) { if ((newconf = parse_config(configfile, opts)) == NULL) exit(1); - warnx("configuration OK"); + fprintf(stderr, "configuration OK\n"); exit(0); } @@ -148,7 +147,7 @@ main(int argc, char *argv[]) log_setverbose(opts & IFSD_OPT_VERBOSE); if ((rt_fd = socket(PF_ROUTE, SOCK_RAW, 0)) < 0) - err(1, "no routing socket"); + fatal("no routing socket"); rtfilter = ROUTE_FILTER(RTM_IFINFO); if (setsockopt(rt_fd, PF_ROUTE, ROUTE_MSGFILTER, @@ -615,7 +614,7 @@ fetch_ifstate(int do_eval) struct ifaddrs *ifap, *ifa; if (getifaddrs(&ifap) != 0) - err(1, "getifaddrs"); + fatal("getifaddrs"); for (ifa = ifap; ifa; ifa = ifa->ifa_next) { if (ifa->ifa_addr->sa_family == AF_LINK) { |