diff options
author | emaste <emaste@FreeBSD.org> | 2012-02-13 16:48:49 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2012-02-13 16:48:49 +0000 |
commit | 94af630d707982c73e40dcbf9d4b70bfbc049047 (patch) | |
tree | 82937ebde29da529e1a1514a5221e696085a658d /sys/dev/aac | |
parent | ba096335bf7b58f4644641e38c058502f57e67ee (diff) | |
download | FreeBSD-src-94af630d707982c73e40dcbf9d4b70bfbc049047.zip FreeBSD-src-94af630d707982c73e40dcbf9d4b70bfbc049047.tar.gz |
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.
Diffstat (limited to 'sys/dev/aac')
-rw-r--r-- | sys/dev/aac/aac.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 68854ae..9f315b6 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -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; |