Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Fix return value of nommap.
details: https://anonhg.NetBSD.org/src/rev/b1c4cf32b24f
branches: trunk
changeset: 349634:b1c4cf32b24f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Dec 16 23:35:04 2016 +0000
description:
Fix return value of nommap.
diffstat:
sys/kern/subr_devsw.c | 16 ++++++++++++++--
sys/sys/conf.h | 4 ++--
2 files changed, 16 insertions(+), 4 deletions(-)
diffs (52 lines):
diff -r e17382e036da -r b1c4cf32b24f sys/kern/subr_devsw.c
--- a/sys/kern/subr_devsw.c Fri Dec 16 23:34:46 2016 +0000
+++ b/sys/kern/subr_devsw.c Fri Dec 16 23:35:04 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_devsw.c,v 1.35 2016/12/09 19:13:47 nat Exp $ */
+/* $NetBSD: subr_devsw.c,v 1.36 2016/12/16 23:35:04 riastradh Exp $ */
/*-
* Copyright (c) 2001, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.35 2016/12/09 19:13:47 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.36 2016/12/16 23:35:04 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_dtrace.h"
@@ -1054,3 +1054,15 @@
return D_OTHER;
return d->d_flag & D_TYPEMASK;
}
+
+/*
+ * nommap(dev, off, prot)
+ *
+ * mmap routine that always fails, for non-mmappable devices.
+ */
+paddr_t
+nommap(dev_t dev, off_t off, int prot)
+{
+
+ return (paddr_t)-1;
+}
diff -r e17382e036da -r b1c4cf32b24f sys/sys/conf.h
--- a/sys/sys/conf.h Fri Dec 16 23:34:46 2016 +0000
+++ b/sys/sys/conf.h Fri Dec 16 23:35:04 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.h,v 1.149 2016/12/09 19:13:47 nat Exp $ */
+/* $NetBSD: conf.h,v 1.150 2016/12/16 23:35:04 riastradh Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -134,7 +134,7 @@
#define nostop ((dev_type_stop((*)))enodev)
#define notty NULL
#define nopoll seltrue
-#define nommap ((dev_type_mmap((*)))enodev)
+paddr_t nommap(dev_t, off_t, int);
#define nodump ((dev_type_dump((*)))enodev)
#define nosize NULL
#define nokqfilter seltrue_kqfilter
Home |
Main Index |
Thread Index |
Old Index