diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2001-06-25 00:02:56 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2001-06-25 00:02:56 +0000 |
commit | 3f538dc72c8ae7e4a261f8bf2d4becf66e88517d (patch) | |
tree | b262cb9e8d525198deef3e9ee18bfee7ff5440dd /sbin/pfctl/pfctl.c | |
parent | 7d83caee1620a10da905e3db3b57be77a510deba (diff) |
use only ioctl return values found in errno.h
Diffstat (limited to 'sbin/pfctl/pfctl.c')
-rw-r--r-- | sbin/pfctl/pfctl.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index bca77e75e5f..cf48cb3d3d4 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.5 2001/06/24 23:44:07 art Exp $ */ +/* $OpenBSD: pfctl.c,v 1.6 2001/06/25 00:02:55 dhartmei Exp $ */ /* * Copyright (c) 2001, Daniel Hartmeier @@ -51,23 +51,10 @@ static void usage(char *); static char *load_file(char *, size_t *); int main(int, char *[]); -static char *errormsg[] = { - "invalid operation", /* ERROR_INVALID_OP */ - "packetfilter is running", /* ERROR_ALREADY_RUNNING */ - "packetfilter not running", /* ERROR_NOT_RUNNING */ - "invalid parameters", /* ERROR_INVALID_PARAMETERS */ - "memory allocation failed" /* ERROR_MALLOC */ -}; - static void printerror(char *s) { - char *msg; - if ((errno >= 100) && (errno < MAX_ERROR_NUM)) - msg = errormsg[errno-100]; - else - msg = strerror(errno); - fprintf(stderr, "ERROR: %s: %s\n", s, msg); + fprintf(stderr, "ERROR: %s: %s\n", s, strerror(errno)); return; } |