Desktop drive icon fix

There was a little problem that shows up sometimes. I only get it with the 2.6.25.16 kernel, but perhaps it could happen with others.

Sometimes I plug in a USB drive, but no icon appears on the desktop. The LED on the drive flashes, so it is getting recognised, and Pmount sees it okay.

What I found is that 'pup_event_frontend_d' scans /sys/block periodically to look for drives added or removed, and if a new one then reads /proc/partitions. However, sometimes the kernel updates /sys/block but then takes a bit to long to update /proc/partitions. My script reads /proc/partitions a bit too soon. I found that the delay can be over half a second sometimes.

I fixed it, not with a fixed sleep but with a little loop that waits for /proc/partitions to be updated.


Posted on 10 Jul 2009, 24:15


Comments:

Posted on 11 Jul 2009, 11:47 by wombat01
woof
Barry this sometimes happens with the 2.6.21.7 kernel, both in Puppy 4.1.2 and 4.2.