From 8de80c67d0f54dc8f36ad93547129197b2447c6a Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 31 Aug 1998 17:42:46 +0000 Subject: Return ENXIO on open of /dev/mem minor devs that don't exist --- sys/arch/sun3/sun3/mem.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'sys/arch/sun3') diff --git a/sys/arch/sun3/sun3/mem.c b/sys/arch/sun3/sun3/mem.c index a8924da66b1..0fcec58ac60 100644 --- a/sys/arch/sun3/sun3/mem.c +++ b/sys/arch/sun3/sun3/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.6 1997/02/10 11:53:11 downsj Exp $ */ +/* $OpenBSD: mem.c,v 1.7 1998/08/31 17:42:42 millert Exp $ */ /* $NetBSD: mem.c,v 1.19 1995/08/08 21:09:01 gwr Exp $ */ /* @@ -78,7 +78,23 @@ mmopen(dev, flag, mode, p) struct proc *p; { - return (0); + switch (minor(dev)) { + case 0: + case 1: + case 2: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + return (0); + default: + return (ENXIO); + } } /*ARGSUSED*/ -- cgit v1.2.3