Letters to the Editor
Hi! First off, thanks for Linux Journal. I have a comment about a particular command in the article “Linux Tips: How to move /home to a new hard drive on your Linux system” in December's issue.
cp -r /home/* /mnt
as suggested to copy the home directory does not copy symbolic or hard links correctly. (I am not sure about the other command suggested for I don't have cpio on my system.) If the user has many links, she will find that the “copy” in /mnt takes up more disk space. The following command will copy links correctly:
(cd /home ; tar cf - .) | (cd /mnt ; tar xvf -)
Cheers,Delman Lee email@example.com
We had the same problem in an earlier article, and the same (correct) response. I never use cp -r myself, and for some reason or other did not catch this mistake. Thanks for the note.
The control port which corresponds with printer data port 0x378 is 0x37a, and not 0x380, as described in Kernel Korner, December issue (#8). Why is it required that the example user space printer driver be compiled with optimization turned on? And what level opt?David Morris firstname.lastname@example.org
You are absolutely right; I must have been writing too late at night. Fortunately, this mistake was not propagated into the userlp.c code that was included in the article; there, I let the computer do the arithmetic, so that I couldn't accidentally replace hex arithmetic with decimal arithmetic. The reason I was working in decimal was that I had just been working on the shell script version which I mentioned but didn't include in the article, where I had to do all the arithmetic in decimal. Perhaps that is another good reason not to try to write device drivers as shell scripts.
The reason that the userlp.c program included has to be compiled with optimization (of any level at all) turned on is that all the port I/O functions are defined in the header files as “static inline” functions, a GCC extension is enabled only by turning on optimization. I'm sorry that was not adequately addressed in the article.
Webinar: 8 Signs You’re Beyond Cron
11am CDT, April 29th
Join Linux Journal and Pat Cameron, Director of Automation Technology at HelpSystems, as they discuss the eight primary advantages of moving beyond cron job scheduling. In this webinar, you’ll learn about integrating cron with an enterprise scheduler.Join us!
|Android Candy: Intercoms||Apr 23, 2015|
|"No Reboot" Kernel Patching - And Why You Should Care||Apr 22, 2015|
|Return of the Mac||Apr 20, 2015|
|DevOps: Better Than the Sum of Its Parts||Apr 20, 2015|
|Play for Me, Jarvis||Apr 16, 2015|
|Drupageddon: SQL Injection, Database Abstraction and Hundreds of Thousands of Web Sites||Apr 15, 2015|
- Tips for Optimizing Linux Memory Usage
- "No Reboot" Kernel Patching - And Why You Should Care
- DevOps: Better Than the Sum of Its Parts
- Return of the Mac
- Android Candy: Intercoms
- Drupageddon: SQL Injection, Database Abstraction and Hundreds of Thousands of Web Sites
- Designing Foils with XFLR5
- Non-Linux FOSS: .NET?
- Play for Me, Jarvis