Author: obrien
Date: Wed Aug  7 20:35:26 2013
New Revision: 254073
URL: http://svnweb.freebsd.org/changeset/base/254073

Log:
  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.

Modified:
  head/tools/tools/sysdoc/sysdoc.sh

Modified: head/tools/tools/sysdoc/sysdoc.sh
==============================================================================
--- head/tools/tools/sysdoc/sysdoc.sh   Wed Aug  7 19:56:35 2013        
(r254072)
+++ head/tools/tools/sysdoc/sysdoc.sh   Wed Aug  7 20:35:26 2013        
(r254073)
@@ -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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to