diff options
author | 2011-07-02 22:20:07 +0000 | |
---|---|---|
committer | 2011-07-02 22:20:07 +0000 | |
commit | b8d5a5fb3cd18b5becb179d749e65fc04a659093 (patch) | |
tree | a14bf2c9e20868318f34cb59c7793894408769bf /sys/dev/acpi/acpi.c | |
parent | Per recommandation in the the sparc docs, use unlocked reads when (diff) | |
download | wireguard-openbsd-b8d5a5fb3cd18b5becb179d749e65fc04a659093.tar.xz wireguard-openbsd-b8d5a5fb3cd18b5becb179d749e65fc04a659093.zip |
kqueue attach functions should return an errno or 0, not a plain 1. Fix
the obvious cases to return EINVAL and ENXIO.
ok tedu deraadt
Diffstat (limited to 'sys/dev/acpi/acpi.c')
-rw-r--r-- | sys/dev/acpi/acpi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 231f34b3f83..c8bd966430f 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.226 2011/06/24 19:47:49 naddy Exp $ */ +/* $OpenBSD: acpi.c,v 1.227 2011/07/02 22:20:07 nicm Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -2632,7 +2632,7 @@ acpikqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &acpiread_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = sc; @@ -2667,6 +2667,6 @@ acpiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) int acpikqfilter(dev_t dev, struct knote *kn) { - return (1); + return (ENXIO); } #endif /* SMALL_KERNEL */ |