summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2013-08-07 20:35:26 +0000
committerobrien <obrien@FreeBSD.org>2013-08-07 20:35:26 +0000
commit13df08437f4fa4822c3552d4b9f0467015f361d5 (patch)
tree711eada569e3155318a1e33c455b14dd3cfc5565 /tools
parent9481e259bba3a39043f2dff6baacf69597661b3a (diff)
downloadFreeBSD-src-13df08437f4fa4822c3552d4b9f0467015f361d5.zip
FreeBSD-src-13df08437f4fa4822c3552d4b9f0467015f361d5.tar.gz
Improve the sysctl symbol extraction from the kernel so that it find more
(all?) sysctl's. Previously some where missed, depending on how they were defined.
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/sysdoc/sysdoc.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/tools/sysdoc/sysdoc.sh b/tools/tools/sysdoc/sysdoc.sh
index c428174..b07c53d 100644
--- a/tools/tools/sysdoc/sysdoc.sh
+++ b/tools/tools/sysdoc/sysdoc.sh
@@ -88,7 +88,7 @@ EOF
# tunables in our tunables.mdoc file and generate
# the final 'inner circle' of our manual page.
markup_create() {
- sort < _names | \
+ sort -u < _names | \
xargs -n 1 /bin/sh ./sysctl.sh \
> markup.file \
2> tunables.TODO
@@ -238,9 +238,13 @@ if [ -z "$LOCATION" ] ;
&& for x in `find $LOCATION -name '*.kld'` \
$LOCATION/kernel; \
do nm $x | \
- grep ' sysctl___' | uniq | \
- sed 's/sysctl___//g' | sed 's/_/./g' | \
- awk {'print $3'} > _names;
+ sed -n '/sysctl___/ {
+ 's/[\.a-z_]*sysctl___//g'
+ 's/_/./g'
+ p
+ }' | \
+ awk {'print $3'} | \
+ sort -u > _names;
done;
markup_create
page_create
OpenPOWER on IntegriCloud