diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-02-18 01:47:48 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-02-18 01:47:48 +0000 |
commit | 13a624004009d7d6decbc36a56afb15d938e63ae (patch) | |
tree | 4dcb78632002bc8307f8c2e77b4928d590021d1f /sys/arch/i386 | |
parent | f827bee971d6e9ca07046fa312c9e9b83002fe5d (diff) |
indent
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/mem.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/sys/arch/i386/i386/mem.c b/sys/arch/i386/i386/mem.c index 4b1ec10f896..49a70552e0c 100644 --- a/sys/arch/i386/i386/mem.c +++ b/sys/arch/i386/i386/mem.c @@ -88,16 +88,12 @@ mmopen(dev, flag, mode, p) #endif #ifdef APERTURE case 4: - if (suser(p->p_ucred, &p->p_acflag) != 0) { - return(EPERM); - } - if (!allowaperture) { - return(EPERM); - } + if (suser(p->p_ucred, &p->p_acflag) != 0 || + return (EPERM); + /* authorize only one simultaneous open() */ - if (ap_open_count > 0) { + if (ap_open_count > 0) return(EPERM); - } ap_open_count++; break; #endif @@ -115,9 +111,8 @@ mmclose(dev, flag, mode, p) struct proc *p; { #ifdef APERTURE - if (minor(dev) == 4) { + if (minor(dev) == 4) ap_open_count--; - } #endif return (0); } @@ -243,9 +238,9 @@ mmmmap(dev, off, prot) #ifdef APERTURE /* minor device 4 is aperture driver */ case 4: - if (allowaperture - && (((off >= VGA_START && off <= VGA_END ) - || (unsigned)off > (unsigned)ctob(physmem)))) + if (allowaperture && + (((off >= VGA_START && off <= VGA_END) || + (unsigned)off > (unsigned)ctob(physmem)))) return i386_btop(off); else return -1; |