Linux Device Drivers by Alessandro Rubini This errata page lists errors outstanding in the most recent printing. If you have technical questions or error reports, you can send them to booktech@oreilly.com. Please specify the printing date of your copy. This page was last modified on January 12, 2001. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification <14> Add the following text after the code at the top of the page: Depending on which distribution you are running, you may see an "undefined symbol printk" message at this point. This message implies that your kernel has module versioning enabled. We will get into versioning in ; in the meantime, you can get around this problem by adding the line: # include at the top of your source file. You will need to make this change to the other sample drivers used in this book as well. <29> At the bottom of the page, replace: to avoid corrupting system operation by interacting with hardware whose module has yet to be loaded, and thus has not yet reserved its own I/O ports. with: to avoid the potential risk to damage operation of a running system, by misconfiguring hardware that may live in a location being probed. (35) I noticed a missing ')' on the 9th line. It says '(described in Chapter 15.' {72} In the second line of first (partial) paragraph; Where it says: "issue the command cat /proc/kmesg" it should say: "issue the command cat /proc/kmsg" {169} In the last Paragraph, Mr Rubini introduced the "Digital Resistor" to us. If resistors could store data!? Please replace "1KB" resistor with {LaTeX} "1k/ohmega resistor" {394} In the code sample: if (_IOC_DIR(cmd) & _IOC_READ) { if (!access_ok(VERIFY_WRITE, (void *)arg, size)) retturn -EFAULT; "retturn" should be "return" [389] In the sample code for scull_p_poll; The code for scull_p_poll contains if (left) mask |= POLLOUT | POLLWRNORM; /* writable */ but I think it should be if (left > 1) mask |= POLLOUT | POLLWRNORM; /* writable */ because if left==1 then we *cannot* write without blocking. Also, the comment /* how many bytes left there to be read? */ int left = (dev->rp + dev->buffersize - dev->wp) % dev->buffersize; is wrong; it's how many bytes are left *in the buffer*.