diff options
| author | bjh21 <bjh21@NetBSD.org> | 2006-11-11 17:28:16 +0000 |
|---|---|---|
| committer | bjh21 <bjh21@NetBSD.org> | 2006-11-11 17:28:16 +0000 |
| commit | 7cd2ca16b5a8da5bfc09903012e08fe638e557b4 (patch) | |
| tree | 711bb2b0b916f79140777f180d6a3a22edc992c6 /sys/dev/wscons | |
| parent | 7acb866d02f45b3da9d33d104240181e3d519f02 (diff) | |
COMPAT_10 implies COMPAT_11, so there's no need to test both.
Also collapse two tightly-nested #ifs into one.
Diffstat (limited to 'sys/dev/wscons')
| -rw-r--r-- | sys/dev/wscons/wsdisplay_compat_usl.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/wscons/wsdisplay_compat_usl.c b/sys/dev/wscons/wsdisplay_compat_usl.c index ebb4837c98e..66121d30d22 100644 --- a/sys/dev/wscons/wsdisplay_compat_usl.c +++ b/sys/dev/wscons/wsdisplay_compat_usl.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay_compat_usl.c,v 1.35 2006/10/12 01:32:06 christos Exp $ */ +/* $NetBSD: wsdisplay_compat_usl.c,v 1.36 2006/11/11 17:28:16 bjh21 Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsdisplay_compat_usl.c,v 1.35 2006/10/12 01:32:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay_compat_usl.c,v 1.36 2006/11/11 17:28:16 bjh21 Exp $"); #include "opt_compat_freebsd.h" #include "opt_compat_netbsd.h" @@ -405,17 +405,14 @@ wsdisplay_usl_ioctl2(struct wsdisplay_softc *sc, struct wsscreen *scr, #undef d case KDENABIO: -#if defined(__i386__) -#if defined(COMPAT_10) || defined(COMPAT_11) || defined(COMPAT_FREEBSD) +#if defined(__i386__) && (defined(COMPAT_11) || defined(COMPAT_FREEBSD)) if (kauth_authorize_machdep(l->l_cred, KAUTH_MACHDEP_X86, KAUTH_REQ_MACHDEP_X86_IOPL, NULL, NULL, NULL) != 0) return (EPERM); #endif -#endif /* FALLTHRU */ case KDDISABIO: -#if defined(__i386__) -#if defined(COMPAT_10) || defined(COMPAT_11) || defined(COMPAT_FREEBSD) +#if defined(__i386__) && (defined(COMPAT_11) || defined(COMPAT_FREEBSD)) { /* XXX NJWLWP */ struct trapframe *fp = (struct trapframe *)curlwp->l_md.md_regs; @@ -425,7 +422,6 @@ wsdisplay_usl_ioctl2(struct wsdisplay_softc *sc, struct wsscreen *scr, fp->tf_eflags &= ~PSL_IOPL; } #endif -#endif return (0); case KDSETRAD: /* XXX ignore for now */ |
