diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-08-31 17:42:46 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-08-31 17:42:46 +0000 |
commit | 8de80c67d0f54dc8f36ad93547129197b2447c6a (patch) | |
tree | 0556a00de0ab667e7f1eb6af1300e94695c5a968 /sys/arch/vax | |
parent | 1fb6ebfd016dbeb5944a4247652ad063c1fec0d6 (diff) |
Return ENXIO on open of /dev/mem minor devs that don't exist
Diffstat (limited to 'sys/arch/vax')
-rw-r--r-- | sys/arch/vax/vax/mem.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/arch/vax/vax/mem.c b/sys/arch/vax/vax/mem.c index 644c7285eff..43b85dd0290 100644 --- a/sys/arch/vax/vax/mem.c +++ b/sys/arch/vax/vax/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.4 1997/05/29 00:05:23 niklas Exp $ */ +/* $OpenBSD: mem.c,v 1.5 1998/08/31 17:42:44 millert Exp $ */ /* $NetBSD: mem.c,v 1.9 1996/04/08 18:32:48 ragge Exp $ */ /* @@ -74,7 +74,15 @@ mmopen(dev, flag, mode) int flag, mode; { - return (0); + switch (minor(dev)) { + case 0: + case 1: + case 2: + case 12: + return (0); + default: + return (ENXIO); + } } /*ARGSUSED*/ |