unplugging devices safely?
lou_g at softhome.net
lou_g at softhome.net
Sat Nov 13 12:21:49 PST 2004
Martin Pitt writes:
> Hi lou!
>
> lou_g at softhome.net [2004-11-12 18:20 -0700]:
>> Ok, so i was playing around with my ipod and HAL, when it comes to
>> unplugging i just usually unplug (even when do not disconnect is flashing)
>> as long as there is no disk activity (indicated by an icon on ipod screen).
>> so i plugged it in, hotplug saw it, loaded modulespassed it to hal and hal
>> opened nautillus (via gvm) (or however it works).
>> I then unplugged it (as described above) and checked th eloaded modules,
>> they still listed the firewire modules used for the ipod (i assuemd they'd
>> get unloaded when the kernel noticed it had disappeared).
>> then i did "lshal | grep info.product to get anice list of all my hardware
>> HAL see's and noticed the ipod was still in the list (even though it was
>> not pluggged).
>>
>> So my question is, is there a specific way to safely remove hardware so
>> everything know's it's gone, if not, is there a planned system?
>
> Right now it _theoretically_ works to do "eject /dev/sda2" (or
> whichever device it is), this will really shutdown the link and make
> the "busy" message on the iPod disappear. "eject" in fact also works
> much better than just "unmount" on other USB/FireWire devices. I. e.
> the LED on my USB memory stick goes off when I eject it, which gives
> novice users a more comfortable feeling :-)
>
> I have a patch ready which would implement ejecting throughout GNOME,
> see
>
> https://bugzilla.ubuntulinux.org/show_bug.cgi?id=2134
>
> The only drawback is that there is currently a kernel flaw which
> prevents this approach. With some devices eject/hal/whatever just
> hangs when ejecting a device. This can be reproduced particularly well
> with iPods, so YMMV. See
>
> https://bugzilla.ubuntulinux.org/show_bug.cgi?id=1891
>
> for the relevant bug report.
>
> Martin
AAHHHHH, that does work very nicely, shame the kde Kio slave 'devices'
doesn't support ejecting disks.. :(
But none the less, a small script in kicker for whenever i want to eject the
ipod and we're away.. :D
Thanks alot
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list