Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Aug 2013 20:35:27 +0000 (UTC)
From:      "David E. O'Brien" <obrien@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254073 - head/tools/tools/sysdoc
Message-ID:  <201308072035.r77KZRlJ084551@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308072035.r77KZRlJ084551>