Specify the proper usage of the find(1) command, specifically for how to
find an option in the kernel source code.
This commit is contained in:
parent
1ce4052bbc
commit
5753b027cf
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=6141
2 changed files with 18 additions and 16 deletions
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelopts/chapter.sgml,v 1.12 1999/11/06 19:32:39 eivind Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelopts/chapter.sgml,v 1.13 1999/11/07 01:54:49 chris Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="kernelopts">
|
<chapter id="kernelopts">
|
||||||
|
@ -130,13 +130,14 @@ options notyet,notdef</programlisting>
|
||||||
|
|
||||||
<para>Finally, find out which kernel files depend on the new option.
|
<para>Finally, find out which kernel files depend on the new option.
|
||||||
Unless you have just invented your option, and it does not exist
|
Unless you have just invented your option, and it does not exist
|
||||||
anywhere yet, <screen>&prompt.user; <userinput>find /usr/src/sys -name
|
anywhere yet, <screen>
|
||||||
type f | xargs fgrep NEW_OPTION</userinput></screen> is your friend
|
&prompt.user; <userinput>find /usr/src/sys -type f | xargs fgrep NEW_OPTION</userinput>
|
||||||
in finding them. Go and edit all those files, and add <programlisting>
|
</screen>
|
||||||
#include "opt_foo.h"</programlisting> <emphasis>on top</emphasis>,
|
is your friend in finding them. Go and edit all those files, and add
|
||||||
before all the <literal>#include <xxx.h></literal> stuff. This
|
<programlisting>#include "opt_foo.h"</programlisting> <emphasis>on
|
||||||
sequence is most important as the options could override defaults from
|
top</emphasis> before all the <literal>#include <xxx.h></literal> stuff.
|
||||||
the regular include files, if the defaults are of the form
|
This sequence is most important as the options could override defaults
|
||||||
|
from the regular include files, if the defaults are of the form
|
||||||
<programlisting> #ifndef NEW_OPTION #define NEW_OPTION (something)
|
<programlisting> #ifndef NEW_OPTION #define NEW_OPTION (something)
|
||||||
#endif</programlisting> in the regular header.</para>
|
#endif</programlisting> in the regular header.</para>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelopts/chapter.sgml,v 1.12 1999/11/06 19:32:39 eivind Exp $
|
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelopts/chapter.sgml,v 1.13 1999/11/07 01:54:49 chris Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="kernelopts">
|
<chapter id="kernelopts">
|
||||||
|
@ -130,13 +130,14 @@ options notyet,notdef</programlisting>
|
||||||
|
|
||||||
<para>Finally, find out which kernel files depend on the new option.
|
<para>Finally, find out which kernel files depend on the new option.
|
||||||
Unless you have just invented your option, and it does not exist
|
Unless you have just invented your option, and it does not exist
|
||||||
anywhere yet, <screen>&prompt.user; <userinput>find /usr/src/sys -name
|
anywhere yet, <screen>
|
||||||
type f | xargs fgrep NEW_OPTION</userinput></screen> is your friend
|
&prompt.user; <userinput>find /usr/src/sys -type f | xargs fgrep NEW_OPTION</userinput>
|
||||||
in finding them. Go and edit all those files, and add <programlisting>
|
</screen>
|
||||||
#include "opt_foo.h"</programlisting> <emphasis>on top</emphasis>,
|
is your friend in finding them. Go and edit all those files, and add
|
||||||
before all the <literal>#include <xxx.h></literal> stuff. This
|
<programlisting>#include "opt_foo.h"</programlisting> <emphasis>on
|
||||||
sequence is most important as the options could override defaults from
|
top</emphasis> before all the <literal>#include <xxx.h></literal> stuff.
|
||||||
the regular include files, if the defaults are of the form
|
This sequence is most important as the options could override defaults
|
||||||
|
from the regular include files, if the defaults are of the form
|
||||||
<programlisting> #ifndef NEW_OPTION #define NEW_OPTION (something)
|
<programlisting> #ifndef NEW_OPTION #define NEW_OPTION (something)
|
||||||
#endif</programlisting> in the regular header.</para>
|
#endif</programlisting> in the regular header.</para>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue