diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2001-06-26 11:17:32 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2001-06-26 11:17:32 +0000 |
commit | a991b24d5f824b641f4584d39873dbbcf667b29b (patch) | |
tree | 4e5209b5a970359fad8fa855a3d55af43c53b8ec /sys | |
parent | 6b0a0f3664879ec2a633952a8be1c69001e33845 (diff) |
more suitable error values when DIOCSTART/STOP fail; peters@telia.net
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index ab85fa95319..15e7445899b 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.48 2001/06/26 06:58:28 markus Exp $ */ +/* $OpenBSD: pf.c,v 1.49 2001/06/26 11:17:31 dhartmei Exp $ */ /* * Copyright (c) 2001, Daniel Hartmeier @@ -608,7 +608,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) case DIOCSTART: if (pf_status.running) - error = EINVAL; + error = EEXIST; else { u_int32_t states = pf_status.states; bzero(&pf_status, sizeof(struct pf_status)); @@ -621,7 +621,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) case DIOCSTOP: if (!pf_status.running) - error = EINVAL; + error = ENOENT; else { pf_status.running = 0; printf("pf: stopped\n"); |