Date: Mon, 13 Feb 2012 16:48:49 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r231589 - head/sys/dev/aac Message-ID: <201202131648.q1DGmnID052377@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Mon Feb 13 16:48:49 2012 New Revision: 231589 URL: http://svn.freebsd.org/changeset/base/231589 Log: 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. Modified: head/sys/dev/aac/aac.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Mon Feb 13 16:43:29 2012 (r231588) +++ head/sys/dev/aac/aac.c Mon Feb 13 16:48:49 2012 (r231589) @@ -292,6 +292,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. */ sc->aac_ich.ich_func = aac_startup;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202131648.q1DGmnID052377>