From 1423dcd65a4f7b9d7102285d3bc2468ebe104c26 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 13 Feb 2012 16:48:49 +0000 Subject: [PATCH] Add a sysctl to report the firmware build number. Some older firmware versions have issues that can be worked around by avoiding certain operations. Add a sysctl dev.aac.#.firmware_build to make it easy for scripts or userland tools to detect the firmware version. --- sys/dev/aac/aac.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 68854ae885e1..9f315b6307b7 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -291,6 +291,15 @@ aac_attach(struct aac_softc *sc) */ aac_describe_controller(sc); + /* + * Add sysctls. + */ + SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->aac_dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(sc->aac_dev)), + OID_AUTO, "firmware_build", CTLFLAG_RD, + &sc->aac_revision.buildNumber, 0, + "firmware build number"); + /* * Register to probe our containers later. */