aboutsummaryrefslogtreecommitdiff
path: root/fr_FR.ISO8859-1/books/developers-handbook/driverbasics/chapter.xml
diff options
context:
space:
mode:
Diffstat (limited to 'fr_FR.ISO8859-1/books/developers-handbook/driverbasics/chapter.xml')
-rw-r--r--fr_FR.ISO8859-1/books/developers-handbook/driverbasics/chapter.xml28
1 files changed, 12 insertions, 16 deletions
diff --git a/fr_FR.ISO8859-1/books/developers-handbook/driverbasics/chapter.xml b/fr_FR.ISO8859-1/books/developers-handbook/driverbasics/chapter.xml
index 87e701e170..c99a072421 100644
--- a/fr_FR.ISO8859-1/books/developers-handbook/driverbasics/chapter.xml
+++ b/fr_FR.ISO8859-1/books/developers-handbook/driverbasics/chapter.xml
@@ -8,8 +8,7 @@
Original revision: 1.5
-->
-
-<chapter id="driverbasics">
+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="driverbasics">
<title>Ecrire des pilotes de périphériques pour FreeBSD</title>
<para>Ce chapître a été écrit par &a.murray; avec des sélections
@@ -298,8 +297,8 @@ echo_read(dev_t dev, struct uio *uio, int ioflag)
/* De quelle taille est cette operation read ? Aussi grande que l'utilisateur le veut,
ou aussi grande que les donnees restantes */
- amt = MIN(uio->uio_resid, (echomsg->len - uio->uio_offset &gt; 0) ? echomsg->len - uio->uio_offset : 0);
- if ((err = uiomove(echomsg->msg + uio->uio_offset,amt,uio)) != 0) {
+ amt = MIN(uio-&gt;uio_resid, (echomsg-&gt;len - uio-&gt;uio_offset &gt; 0) ? echomsg-&gt;len - uio-&gt;uio_offset : 0);
+ if ((err = uiomove(echomsg-&gt;msg + uio-&gt;uio_offset,amt,uio)) != 0) {
uprintf("uiomove echoue!\n");
}
@@ -317,12 +316,12 @@ echo_write(dev_t dev, struct uio *uio, int ioflag)
int err = 0;
/* Copie la chaine d'entree de la memoire de l'utilisateur a la memoire du noyau*/
- err = copyin(uio->uio_iov->iov_base, echomsg->msg, MIN(uio->uio_iov->iov_len,BUFFERSIZE));
+ err = copyin(uio-&gt;uio_iov-&gt;iov_base, echomsg-&gt;msg, MIN(uio-&gt;uio_iov-&gt;iov_len,BUFFERSIZE));
/* Maintenant nous avons besoin de terminer la chaine par NULL */
- *(echomsg->msg + MIN(uio->uio_iov->iov_len,BUFFERSIZE)) = 0;
+ *(echomsg-&gt;msg + MIN(uio-&gt;uio_iov-&gt;iov_len,BUFFERSIZE)) = 0;
/* Enregistre la taille */
- echomsg->len = MIN(uio->uio_iov->iov_len,BUFFERSIZE);
+ echomsg-&gt;len = MIN(uio-&gt;uio_iov-&gt;iov_len,BUFFERSIZE);
if (err != 0) {
uprintf("Ecriture echouee: mauvaise adresse!\n");
@@ -345,7 +344,7 @@ DEV_MODULE(echo,echo_loader,NULL);</programlisting>
quelque chose comme :</para>
<screen>
- &prompt.root; echo -n "Test Donnees" > /dev/echo
+ &prompt.root; echo -n "Test Donnees" &gt; /dev/echo
&prompt.root; cat /dev/echo
Test Donnees
</screen>
@@ -354,14 +353,11 @@ DEV_MODULE(echo,echo_loader,NULL);</programlisting>
<para>Informations additionnelles
<itemizedlist>
- <listitem><simpara><ulink
- url="http://www.daemonnews.org/200010/blueprints.html">Dynamic
- Kernel Linker (KLD) Facility Programming Tutorial</ulink> -
- <ulink url="http://www.daemonnews.org">Daemonnews</ulink> October 2000</simpara></listitem>
- <listitem><simpara><ulink
- url="http://www.daemonnews.org/200007/newbus-intro.html">How
- to Write Kernel Drivers with NEWBUS</ulink> - <ulink
- url="http://www.daemonnews.org">Daemonnews</ulink> July
+ <listitem><simpara><link xlink:href="http://www.daemonnews.org/200010/blueprints.html">Dynamic
+ Kernel Linker (KLD) Facility Programming Tutorial</link> -
+ <link xlink:href="http://www.daemonnews.org">Daemonnews</link> October 2000</simpara></listitem>
+ <listitem><simpara><link xlink:href="http://www.daemonnews.org/200007/newbus-intro.html">How
+ to Write Kernel Drivers with NEWBUS</link> - <link xlink:href="http://www.daemonnews.org">Daemonnews</link> July
2000</simpara></listitem>
</itemizedlist>
</para>