Module Name: src Committed By: jmcneill Date: Mon Jan 28 19:47:03 UTC 2013
Modified Files: src/sys/arch/evbarm/rpi: rpi_machdep.c Log Message: add machdep.serial sysctl for getting board serial number To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbarm/rpi/rpi_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/evbarm/rpi/rpi_machdep.c diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.31 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.32 --- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.31 Fri Jan 25 13:32:21 2013 +++ src/sys/arch/evbarm/rpi/rpi_machdep.c Mon Jan 28 19:47:02 2013 @@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: rpi_machdep. #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 @@ rpi_device_register(device_t dev, void * } #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); +}