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-<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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212031326.qB3DQ0ma038163>