diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-04-02 14:09:21 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-04-02 14:09:21 +0000 |
commit | 6d48a9dd6b3ed66b78114ddeb70f1ead5b431454 (patch) | |
tree | 8f42ced079bbaa36147ae77e5021614b91442f99 | |
parent | 57b9503f277fa1510823acc56151b73ed9b5709d (diff) |
better error handling
-rw-r--r-- | sbin/pfctl/pfctl.c | 11 |
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); |