As a result ifstated.c no longer needs err.h.

Index: ifstated.c
===================================================================
RCS file: /cvs/src/usr.sbin/ifstated/ifstated.c,v
retrieving revision 1.56
diff -u -p -r1.56 ifstated.c
--- ifstated.c  24 Jul 2017 12:33:59 -0000      1.56
+++ ifstated.c  3 Aug 2017 23:59:13 -0000
@@ -37,7 +37,6 @@
 #include <signal.h>
 #include <stdint.h>
 #include <syslog.h>
-#include <err.h>
 #include <event.h>
 #include <unistd.h>
 #include <ifaddrs.h>
@@ -102,7 +101,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':
@@ -135,7 +134,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);
        }
 
@@ -147,7 +146,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,
@@ -604,7 +603,7 @@ fetch_ifstate(void)
        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) {

Reply via email to