Fix igor nit picks

Approved by:	 bcr (mentor)
This commit is contained in:
Eitan Adler 2013-02-11 13:46:26 +00:00
parent 2c78fe9dfe
commit b161de5a10
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=40942

View file

@ -72,8 +72,7 @@
<indexterm><primary>kernel modules</primary><secondary>unloading</secondary></indexterm> <indexterm><primary>kernel modules</primary><secondary>unloading</secondary></indexterm>
<indexterm><primary>kernel modules</primary><secondary>listing</secondary></indexterm> <indexterm><primary>kernel modules</primary><secondary>listing</secondary></indexterm>
<para>The kld interface is used through the following <para>The kld interface is used through:</para>
privileged commands:</para>
<itemizedlist> <itemizedlist>
<listitem><simpara><command>kldload</command> - loads a new kernel <listitem><simpara><command>kldload</command> - loads a new kernel
@ -135,17 +134,17 @@ DECLARE_MODULE(skeleton, skel_mod, SI_SUB_KLD, SI_ORDER_ANY);</programlisting>
<sect2> <sect2>
<title>Makefile</title> <title>Makefile</title>
<para>FreeBSD provides a makefile include that you can use to <para>FreeBSD provides a makefile include to
quickly compile your kernel addition.</para> quickly compile a kernel addition.</para>
<programlisting>SRCS=skeleton.c <programlisting>SRCS=skeleton.c
KMOD=skeleton KMOD=skeleton
.include &lt;bsd.kmod.mk&gt;</programlisting> .include &lt;bsd.kmod.mk&gt;</programlisting>
<para>Simply running <command>make</command> with this makefile <para>Running <command>make</command> with this makefile
will create a file <filename>skeleton.ko</filename> that can will create a file <filename>skeleton.ko</filename> that can
be loaded into your system by typing: be loaded into the kernel by typing:
<screen>&prompt.root; <userinput>kldload -v ./skeleton.ko</userinput></screen> <screen>&prompt.root; <userinput>kldload -v ./skeleton.ko</userinput></screen>
</para> </para>
</sect2> </sect2>
@ -201,8 +200,8 @@ KMOD=skeleton
the source tree.</para> the source tree.</para>
<para>This simple example pseudo-device remembers whatever values <para>This simple example pseudo-device remembers whatever values
you write to it and can then supply them back to you when you that are written to it and can then echo them back when
read from it.</para> read.</para>
<example> <example>
<title>Example of a Sample Echo Pseudo-Device Driver for <title>Example of a Sample Echo Pseudo-Device Driver for
@ -382,8 +381,7 @@ echo_write(struct cdev *dev __unused, struct uio *uio, int ioflag __unused)
DEV_MODULE(echo,echo_loader,NULL);</programlisting> DEV_MODULE(echo,echo_loader,NULL);</programlisting>
</example> </example>
<para>With this driver loaded you should now be able to type <para>With this driver loaded try:</para>
something like:</para>
<screen>&prompt.root; <userinput>echo -n "Test Data" &gt; /dev/echo</userinput> <screen>&prompt.root; <userinput>echo -n "Test Data" &gt; /dev/echo</userinput>
&prompt.root; <userinput>cat /dev/echo</userinput> &prompt.root; <userinput>cat /dev/echo</userinput>