From a38d8533b3aa82f6262c91f32abc928a5f07c4aa Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Wed, 31 Jan 2001 22:39:46 +0000 Subject: based on art's sparc patch: mmap should return -1 on failure, not EOPNOTSUPP. As it was now, an mmap of /dev/mem always returned page 45. --- sys/arch/hp300/dev/grf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/arch/hp300/dev/grf.c') diff --git a/sys/arch/hp300/dev/grf.c b/sys/arch/hp300/dev/grf.c index ce31812cbd1..81559ec8aff 100644 --- a/sys/arch/hp300/dev/grf.c +++ b/sys/arch/hp300/dev/grf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grf.c,v 1.7 1998/03/06 17:24:11 millert Exp $ */ +/* $OpenBSD: grf.c,v 1.8 2001/01/31 22:39:41 jason Exp $ */ /* $NetBSD: grf.c,v 1.25 1997/04/02 22:37:30 scottr Exp $ */ /* @@ -680,7 +680,7 @@ iommap(dev, addrp) if (grfdebug & (GDB_MMAP|GDB_IOMAP)) printf("iommap(%d): addr %p\n", curproc->p_pid, *addrp); #endif - return(EINVAL); + return(-1); } int @@ -785,7 +785,7 @@ grflckmmap(dev, addrp) printf("grflckmmap(%d): addr %p\n", p->p_pid, *addrp); #endif - return(EINVAL); + return(-1); } int -- cgit v1.2.3