summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-01-31 22:39:46 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-01-31 22:39:46 +0000
commita38d8533b3aa82f6262c91f32abc928a5f07c4aa (patch)
tree41a4e0e6536bc62976871cd488d78d7096f55a0d /sys/arch/powerpc
parent90ee86a428707f4f1f502ddab8da4100aa71e976 (diff)
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.
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r--sys/arch/powerpc/powerpc/mem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/powerpc/powerpc/mem.c b/sys/arch/powerpc/powerpc/mem.c
index fc4a3021866..a443c06f9a5 100644
--- a/sys/arch/powerpc/powerpc/mem.c
+++ b/sys/arch/powerpc/powerpc/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.5 2000/01/14 05:42:17 rahnds Exp $ */
+/* $OpenBSD: mem.c,v 1.6 2001/01/31 22:39:43 jason Exp $ */
/* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */
/*
@@ -160,8 +160,9 @@ mmmmap(dev, off, prot)
dev_t dev;
int off, prot;
{
- return EOPNOTSUPP;
+ return (-1);
}
+
/*ARGSUSED*/
int
mmioctl(dev, cmd, data, flags, p)