Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/rpi add machdep.serial sysctl for getting bo...
details: https://anonhg.NetBSD.org/src/rev/a0712ab60296
branches: trunk
changeset: 784452:a0712ab60296
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Jan 28 19:47:02 2013 +0000
description:
add machdep.serial sysctl for getting board serial number
diffstat:
sys/arch/evbarm/rpi/rpi_machdep.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r 13d89aa2232f -r a0712ab60296 sys/arch/evbarm/rpi/rpi_machdep.c
--- a/sys/arch/evbarm/rpi/rpi_machdep.c Mon Jan 28 19:31:14 2013 +0000
+++ b/sys/arch/evbarm/rpi/rpi_machdep.c Mon Jan 28 19:47:02 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rpi_machdep.c,v 1.31 2013/01/25 13:32:21 jmcneill Exp $ */
+/* $NetBSD: rpi_machdep.c,v 1.32 2013/01/28 19:47:02 jmcneill Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.31 2013/01/25 13:32:21 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.32 2013/01/28 19:47:02 jmcneill Exp $");
#include "opt_evbarm_boardtype.h"
@@ -45,6 +45,7 @@
#include <sys/param.h>
#include <sys/device.h>
#include <sys/termios.h>
+#include <sys/sysctl.h>
#include <sys/bus.h>
#include <net/if_ether.h>
@@ -787,3 +788,15 @@
}
#endif
}
+
+SYSCTL_SETUP(sysctl_machdep_rpi, "sysctl machdep subtree setup (rpi)")
+{
+ sysctl_createv(clog, 0, NULL, NULL,
+ CTLFLAG_PERMANENT, CTLTYPE_NODE, "machdep", NULL,
+ NULL, 0, NULL, 0, CTL_MACHDEP, CTL_EOL);
+
+ sysctl_createv(clog, 0, NULL, NULL,
+ CTLFLAG_PERMANENT|CTLFLAG_READONLY|CTLFLAG_HEX|CTLFLAG_PRIVATE,
+ CTLTYPE_QUAD, "serial", NULL, NULL, 0,
+ &vb.vbt_serial.sn, 0, CTL_MACHDEP, CTL_CREATE, CTL_EOL);
+}
Home |
Main Index |
Thread Index |
Old Index