Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern If we don't have a pseudo-device, we don't need the...
details: https://anonhg.NetBSD.org/src/rev/40072abf1438
branches: trunk
changeset: 340054:40072abf1438
user: christos <christos%NetBSD.org@localhost>
date: Fri Aug 21 06:50:56 2015 +0000
description:
If we don't have a pseudo-device, we don't need the attach function.
diffstat:
sys/kern/kern_ksyms.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r df8b9e799b83 -r 40072abf1438 sys/kern/kern_ksyms.c
--- a/sys/kern/kern_ksyms.c Fri Aug 21 06:37:09 2015 +0000
+++ b/sys/kern/kern_ksyms.c Fri Aug 21 06:50:56 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_ksyms.c,v 1.77 2015/08/20 09:45:45 christos Exp $ */
+/* $NetBSD: kern_ksyms.c,v 1.78 2015/08/21 06:50:56 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.77 2015/08/20 09:45:45 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.78 2015/08/21 06:50:56 christos Exp $");
#if defined(_KERNEL) && defined(_KERNEL_OPT)
#include "opt_ddb.h"
@@ -209,11 +209,19 @@
/*
* The "attach" is in reality done in ksyms_init().
*/
+#if NKSYMS >= 1
+/*
+ * ksyms can be loaded even if the kernel has a missing "pseudo-device ksyms"
+ * statement because ddb and modules require it. Fixing it properly requires
+ * fixing config to warn about required, but missing preudo-devices. For now,
+ * if we don't have the pseudo-device we don't need the attach function; this
+ * is fine, as it does nothing.
+ */
void
ksymsattach(int arg)
{
-
}
+#endif
void
ksyms_init(void)
Home |
Main Index |
Thread Index |
Old Index