Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2012 13:26:00 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r40255 - head/en_US.ISO8859-1/books/arch-handbook/driverbasics
Message-ID:  <201212031326.qB3DQ0ma038163@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Mon Dec  3 13:26:00 2012
New Revision: 40255
URL: http://svnweb.freebsd.org/changeset/doc/40255

Log:
  Correct dumb error on my part:  -< and -> are two different sets of
  characters.
  
  Submitted by:	Chip Senkbeil <chip.senkbeil@gmail.com>
  Approved by:	bcr (mentor)

Modified:
  head/en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml

Modified: head/en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml	Mon Dec  3 09:47:18 2012	(r40254)
+++ head/en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.xml	Mon Dec  3 13:26:00 2012	(r40255)
@@ -327,9 +327,9 @@ echo_read(struct cdev *dev __unused, str
 	 * or as big as the remaining data
 	 */
 
-	amt = MIN(uio-&lt;uio_resid, echomsg-&lt;len - uio-&lt;uio_offset);
-	uio-&lt;uio_offset += amt;
-	if ((error = uiomove(echomsg-&lt;msg, amt, uio)) != 0)
+	amt = MIN(uio-&gt;uio_resid, echomsg-&gt;len - uio-&gt;uio_offset);
+	uio-&gt;uio_offset += amt;
+	if ((error = uiomove(echomsg-&gt;msg, amt, uio)) != 0)
 		uprintf("uiomove failed!\n");
 
 	return (error);
@@ -351,28 +351,28 @@ echo_write(struct cdev *dev __unused, st
 	 * We either write from the beginning or are appending -- do
 	 * not allow random access.
 	 */
-	if (uio-&lt;uio_offset != 0 && (uio-&lt;uio_offset != echomsg-&lt;len))
+	if (uio-&gt;uio_offset != 0 && (uio-&gt;uio_offset != echomsg-&gt;len))
 		return (EINVAL);
 
 	/*
 	 * This is new message, reset length
 	 */
-	if (uio-&lt;uio_offset == 0)
-		echomsg-&lt;len = 0;
+	if (uio-&gt;uio_offset == 0)
+		echomsg-&gt;len = 0;
 
 	/* NULL charcter should be overriden */
-	if (echomsg-&lt;len != 0)
-		echomsg-&lt;len--;
+	if (echomsg-&gt;len != 0)
+		echomsg-&gt;len--;
 
 	/* Copy the string in from user memory to kernel memory */
-	amt = MIN(uio-&lt;uio_resid, (BUFFERSIZE - echomsg-&lt;len));
+	amt = MIN(uio-&gt;uio_resid, (BUFFERSIZE - echomsg-&gt;len));
 
-	error = uiomove(echomsg-&lt;msg + uio-&lt;uio_offset, amt, uio);
+	error = uiomove(echomsg-&gt;msg + uio-&gt;uio_offset, amt, uio);
 
 	/* Now we need to null terminate, then record the length */
-	echomsg-&lt;len += amt + 1;
-	uio-&lt;uio_offset += amt + 1;
-	echomsg-&lt;msg[echomsg-&lt;len - 1] = 0;
+	echomsg-&gt;len += amt + 1;
+	uio-&gt;uio_offset += amt + 1;
+	echomsg-&gt;msg[echomsg-&gt;len - 1] = 0;
 
 	if (error != 0)
 		uprintf("Write failed: bad address!\n");



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