Bug 438610 - eject should not only check for removable but also for hotpluggable
eject should not only check for removable but also for hotpluggable
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: eject (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Zdenek Prikryl
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-22 16:52 EDT by Leo Bergolth
Modified: 2008-04-09 01:15 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.1.5-8.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-09 01:13:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Output of lshal -lu `hal-find-by-property --key "block.device" --string "/dev/sdb"` (1.75 KB, text/plain)
2008-03-22 16:52 EDT, Leo Bergolth
no flags Details

  None (edit)
Description Leo Bergolth 2008-03-22 16:52:11 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):
2.1.5-7.fc8

How reproducible:
Try to eject a USB-disk.

Actual results:
# eject /dev/sdb
eject: device "/dev/sdb" doesn't have a removable flag

Expected results:
Should eject the device.

Additional info:
See
http://lists.freedesktop.org/archives/hal/2005-October/003441.html
for an explanation of removable and hotpluggable.

Cheers,
--leo
Comment 1 Leo Bergolth 2008-03-22 16:52:11 EDT
Created attachment 298855 [details]
Output of lshal -lu `hal-find-by-property --key "block.device" --string "/dev/sdb"`
Comment 2 Mike C 2008-03-24 12:57:01 EDT
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.
Comment 3 Zdenek Prikryl 2008-03-26 12:33:29 EDT
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.
Comment 4 Leo Bergolth 2008-03-26 13:22:59 EDT
(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.

Cheers,
--leo
Comment 5 Fedora Update System 2008-04-02 05:02:50 EDT
eject-2.1.5-8.fc8 has been submitted as an update for Fedora 8
Comment 6 Fedora Update System 2008-04-02 05:12:34 EDT
eject-2.1.5-8.fc7 has been submitted as an update for Fedora 7
Comment 7 Fedora Update System 2008-04-09 01:12:57 EDT
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.
Comment 8 Fedora Update System 2008-04-09 01:15:42 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.