summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2003-04-02 14:09:20 +0000
committerhenning <henning@openbsd.org>2003-04-02 14:09:20 +0000
commit7f50bff0d4a533780187cbc42a124f014155f937 (patch)
tree2cbc328497b25d6c37569ef941fa59d3a486aa4e
parentbetter error message (diff)
downloadwireguard-openbsd-7f50bff0d4a533780187cbc42a124f014155f937.tar.xz
wireguard-openbsd-7f50bff0d4a533780187cbc42a124f014155f937.zip
better error handling
-rw-r--r--sbin/pfctl/pfctl.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 57a55b2e440..bee90f3c8c2 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl.c,v 1.164 2003/04/02 14:07:38 henning Exp $ */
+/* $OpenBSD: pfctl.c,v 1.165 2003/04/02 14:09:20 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -946,13 +946,12 @@ pfctl_add_altq(struct pfctl *pf, struct pf_altq *a)
if ((pf->opts & PF_OPT_NOACTION) == 0) {
if (ioctl(pf->dev, DIOCADDALTQ, pf->paltq)) {
if (errno == ENXIO)
- fprintf(stderr,
- "qtype not configured\n");
+ errx(1, "qtype not configured\n");
else if (errno == ENODEV)
- fprintf(stderr,
- "%s: driver does not support "
+ errx(1, "%s: driver does not support "
"altq\n", a->ifname);
- err(1, "DIOCADDALTQ");
+ else
+ err(1, "DIOCADDALTQ");
}
}
pfaltq_store(&pf->paltq->altq);