Hotplug zip/ls120, /dev/hd* optical

I have now got nice hotplugging of the desktop icons. When I insert a LS120 or CD disc, the desktop icon appears. Eject it and the icon disappears.

For optical drives, this hotplugging was working, but only for /dev/sr* drives. I have now extended that support to /dev/hd* optical drives (the old IDE drivers, as used in the "conservative" kernel).

I found out how to detect if a LS120 diskette is inserted, but only when /proc/ide exists. That is, only when the old IDE driver is used, not the new PATA driver. I haven't tested on a Zip drive yet. This detection is only for internal IDE "floppy" drives.

Note, I can check /proc/partitions to see when a LS120/Zip inserted, but only if it has a partition. My test LS120 diskette is a "superfloppy", and my code examines /proc/ide/<drive>/identify to detect an insertion or removal. However, the code can use /proc/partitions as a fallback for /dev/sd* LS120/Zip drives -- after all, nearly all Zip drives will have a partition.

Posted on 17 Aug 2008, 16:35


No comments posted yet.