Red Hat Bugzilla – Bug 438610
eject should not only check for removable but also for hotpluggable
Last modified: 2008-04-09 01:15:42 EDT
Description of problem:
eject-2.1.5-6 and 2.1.5-7 added a check for the removable flag of a device.
Unfortunately, USB disks are marked as not removable but "only" hotpluggable.
Hence, the new version of eject refuses to operate on USB disks.
Version-Release number of selected component (if applicable):
Try to eject a USB-disk.
# eject /dev/sdb
eject: device "/dev/sdb" doesn't have a removable flag
Should eject the device.
for an explanation of removable and hotpluggable.
Created attachment 298855 [details]
Output of lshal -lu `hal-find-by-property --key "block.device" --string "/dev/sdb"`
I presume that this is the origin of the problem I have with a usb drive that is
mounted fine, and has the drive icon on the desktop, in kde in a fully updated
f8 system. If the drive icon is right-clicked and "safely remove" is selected
then you get the nasty crash sound, and although the drive is unmounted it is
not "ejected". This is with eject-2.1.5-7.fc8. Pulling out the usb plug does
then remove the drive icon from the desktop.
A hotpluggable flag, which you can see in your lshal, is set by hal (not the
kernel). Its value is determined only on a type of a bus. It means that if a
device is on usb, pcmcia, ..., then it is automatically hotpluggable.
A question is, if eject should be allowed to eject this kind of devices. Only
what eject does is, that unmount a device. So one can use instead eject umount.
(In reply to comment #3)
> A hotpluggable flag, which you can see in your lshal, is set by hal (not the
> kernel). Its value is determined only on a type of a bus. It means that if a
> device is on usb, pcmcia, ..., then it is automatically hotpluggable.
> A question is, if eject should be allowed to eject this kind of devices. Only
> what eject does is, that unmount a device. So one can use instead eject umount.
Since KDEs kio_media_mounthelper calls eject when removing USB devices and
probably many other existing applications will do similar things, I believe
Redhats version of eject should retain it's upstream behavior. It should
continue to work for hotpluggable devices, even if it effectively only umounts
them, otherwise it will break many applications.
eject-2.1.5-8.fc8 has been submitted as an update for Fedora 8
eject-2.1.5-8.fc7 has been submitted as an update for Fedora 7
eject-2.1.5-8.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.
eject-2.1.5-8.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.