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/alpha/alpha/mem.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sys/arch/alpha') diff --git a/sys/arch/alpha/alpha/mem.c b/sys/arch/alpha/alpha/mem.c index b4719ee0c93..8591825be1c 100644 --- a/sys/arch/alpha/alpha/mem.c +++ b/sys/arch/alpha/alpha/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.7 1997/06/05 23:21:11 deraadt Exp $ */ +/* $OpenBSD: mem.c,v 1.8 1998/08/31 17:42:25 millert Exp $ */ /* $NetBSD: mem.c,v 1.10 1996/11/13 21:13:10 cgd Exp $ */ /* @@ -71,7 +71,15 @@ mmopen(dev, flag, mode, p) struct proc *p; { - return (0); + switch (minor(dev)) { + case 0: + case 1: + case 2: + case 12: + return (0); + default: + return (ENXIO); + } } /*ARGSUSED*/ -- cgit v1.2.3