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.
Free DevOps eBooks, Videos, and more!
Regardless of where you are in your DevOps process, Linux Journal can help!
We offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, and advice & help from the expert sources like:
- Linux Journal
- Be a Mechanic...with Android and Linux!
- New Products
- Users, Permissions and Multitenant Sites
- Flexible Access Control with Squid Proxy
- Security in Three Ds: Detect, Decide and Deny
- High-Availability Storage with HA-LVM
- Tighten Up SSH
- DevOps: Everything You Need to Know
- Solving ODEs on Linux
- Non-Linux FOSS: MenuMeters