Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/kern Pull up rev 1.74:
details: https://anonhg.NetBSD.org/src/rev/9f0959630c96
branches: netbsd-1-5
changeset: 488628:9f0959630c96
user: simonb <simonb%NetBSD.org@localhost>
date: Sat Jul 22 04:38:14 2000 +0000
description:
Pull up rev 1.74:
Add a KERN_CONSDEV sysctl that returns cn_tab->cn_dev (if cn_tab is not
NULL).
diffstat:
sys/kern/kern_sysctl.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (40 lines):
diff -r 1bb4ecb54b0f -r 9f0959630c96 sys/kern/kern_sysctl.c
--- a/sys/kern/kern_sysctl.c Sat Jul 22 04:36:19 2000 +0000
+++ b/sys/kern/kern_sysctl.c Sat Jul 22 04:38:14 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sysctl.c,v 1.73.2.1 2000/07/14 18:10:51 thorpej Exp $ */
+/* $NetBSD: kern_sysctl.c,v 1.73.2.2 2000/07/22 04:38:14 simonb Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -85,6 +85,8 @@
#include <sys/shm.h>
#endif
+#include <dev/cons.h>
+
#if defined(DDB)
#include <ddb/ddbvar.h>
#endif
@@ -266,6 +268,7 @@
int error, level, inthostid;
int old_autonicetime;
int old_vnodes;
+ dev_t consdev;
/* All sysctl names at this level, except for a few, are terminal. */
switch (name[0]) {
@@ -462,6 +465,13 @@
#endif
case KERN_MSGBUF:
return (sysctl_msgbuf(oldp, oldlenp));
+ case KERN_CONSDEV:
+ if (cn_tab != NULL)
+ consdev = cn_tab->cn_dev;
+ else
+ consdev = NODEV;
+ return (sysctl_rdstruct(oldp, oldlenp, newp, &consdev,
+ sizeof consdev));
default:
return (EOPNOTSUPP);
}
Home |
Main Index |
Thread Index |
Old Index