From owner-svn-doc-head@FreeBSD.ORG Mon Dec 3 13:26:00 2012 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B545A9EE; Mon, 3 Dec 2012 13:26:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 810828FC14; Mon, 3 Dec 2012 13:26:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qB3DQ024038164; Mon, 3 Dec 2012 13:26:00 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qB3DQ0ma038163; Mon, 3 Dec 2012 13:26:00 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212031326.qB3DQ0ma038163@svn.freebsd.org> From: Eitan Adler Date: Mon, 3 Dec 2012 13:26:00 +0000 (UTC) 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 X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Dec 2012 13:26:00 -0000 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 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-<uio_resid, echomsg-<len - uio-<uio_offset); - uio-<uio_offset += amt; - if ((error = uiomove(echomsg-<msg, amt, uio)) != 0) + amt = MIN(uio->uio_resid, echomsg->len - uio->uio_offset); + uio->uio_offset += amt; + if ((error = uiomove(echomsg->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-<uio_offset != 0 && (uio-<uio_offset != echomsg-<len)) + if (uio->uio_offset != 0 && (uio->uio_offset != echomsg->len)) return (EINVAL); /* * This is new message, reset length */ - if (uio-<uio_offset == 0) - echomsg-<len = 0; + if (uio->uio_offset == 0) + echomsg->len = 0; /* NULL charcter should be overriden */ - if (echomsg-<len != 0) - echomsg-<len--; + if (echomsg->len != 0) + echomsg->len--; /* Copy the string in from user memory to kernel memory */ - amt = MIN(uio-<uio_resid, (BUFFERSIZE - echomsg-<len)); + amt = MIN(uio->uio_resid, (BUFFERSIZE - echomsg->len)); - error = uiomove(echomsg-<msg + uio-<uio_offset, amt, uio); + error = uiomove(echomsg->msg + uio->uio_offset, amt, uio); /* Now we need to null terminate, then record the length */ - echomsg-<len += amt + 1; - uio-<uio_offset += amt + 1; - echomsg-<msg[echomsg-<len - 1] = 0; + echomsg->len += amt + 1; + uio->uio_offset += amt + 1; + echomsg->msg[echomsg->len - 1] = 0; if (error != 0) uprintf("Write failed: bad address!\n");