Description of problem: Cannot unmount phone card using "eject". Version-Release number of selected component (if applicable): 2.1.5-18.fc13.i686 How reproducible: Try to eject a USB device. Steps to Reproduce: 1. Plug in a Sony Ericsson phone with internal flash card 2. Do stuff 3. Try to eject (which ends the USB connection) Actual results: Fails with error shown below Expected results: Phone displays a "USB connection ended" message (works fine with an older phone where the mount appears as "PHONECARD" without the space). Additional info: [root@dhcppc1 tmp]# eject sdc umount: /media/PHONE\040CARD: not found eject: unmount of `/media/PHONE\040CARD' failed [root@dhcppc1 tmp]# ls /media PHONE CARD [root@dhcppc1 tmp]# mount ... /dev/sdc1 on /media/PHONE CARD type vfat (rw,nosuid,nodev,uid=500,utf8,shortname=mixed,flush) [root@dhcppc1 tmp]# cat /proc/mounts ... /dev/sdc1 /media/PHONE\040CARD vfat rw,nosuid,nodev,relatime,uid=500,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,utf8,flush,errors=remount-ro 0 0
Works fine when run as "eject sdc1" i.e. referring directly to the partition, so not at all sure what's going on here.
Did you try to unmount it by 'unmount'? What does exactly differ in using 'eject' when compared to 'unmount'?
As I stated above, "eject" differs from "unmount" and "umount" in that it causes the USB device to be "safely removed" ... I have no idea how this works, I just know it does. I tried "umount" and it works fine; but that seems to be because bash's tab-completion correctly escapes the space. I speculate that "eject" is not allowing for the \040 escape in the output from /proc/mounts. I'm disappointed that you're asking *me* for information about how this works, since I'm reporting that it isn't working in this case.
[root@dhcppc1 tmp]# umount /media/PHONE\ CARD [root@dhcppc1 tmp]# eject sdc1 [root@dhcppc1 tmp]# So in fact my first comment was probably incorrect, I'd already unmounted it before I tried again with the eject. But yes, umount worked correctly with no errors. The eject command needs to correctly interpret the escaping applied in /proc/mounts in order to pass correct arguments to umount.
Thanks for the info! I'll check the processing of mount table in eject. (In reply to comment #3) > I'm disappointed that you're asking *me* for information about how this works, > since I'm reporting that it isn't working in this case. I was asking for more info, because I need to figure out some reliable steps to reproduce. Your original steps to reproduce were hard to satisfy for me, as I have no "Sony Ericsson phone with internal flash card" :-)
OK, fair enough. I thought you were complaining I hadn't tested it (I did). I'm sorry for overreacting. Should be possible to test by mounting any removable device on a mount point with a space in it, as far as I can tell. I will try when I get home.
I've tried to reproduce it with a CD-ROM and the space in mount point does not seem to cause any problems to eject: # mkdir 'foo bar' # mount /dev/cdrom 'foo bar' mount: block device /dev/sr0 is write-protected, mounting read-only # grep foo /proc/mounts /dev/sr0 /root/foo\040bar iso9660 ro,relatime 0 0 # eject -v eject: using default device `cdrom' eject: device name is `cdrom' eject: expanded name is `/dev/cdrom' eject: `/dev/cdrom' is a link to `/dev/sr0' eject: `/dev/sr0' is mounted at `/root/foo bar' eject: checking if device "/dev/sr0" has a removable or hotpluggable flag eject: unmounting device `/dev/sr0' from `/root/foo bar' eject: `/dev/sr0' is not a multipartition device eject: trying to eject `/dev/sr0' using CD-ROM eject command eject: CD-ROM eject command succeeded
It only happens when ejecting a device (e.g. "sdc") when a partition of that device is mounted (in this case, /dev/sdc1 on "/media/PHONE CARD"). What other information can I give you?
It looks like a call of DeMangleMount() is missing there: diff --git a/eject.c b/eject.c index 948e2b2..057d2ea 100644 --- a/eject.c +++ b/eject.c @@ -1040,6 +1040,8 @@ static void UnmountDevices(const char *pattern) while (fgets(line, sizeof(line), fp) != 0) { status = sscanf(line, "%1023s %1023s", s1, s2); if (status >= 2) { + DeMangleMount(s1); + DeMangleMount(s2); status = regexec(&preg, s1, 0, 0, 0); if (status == 0) { if (v_option) Unfortunately I have no suitable removable device around at the moment, will check it later today.
eject-2.1.5-18.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/eject-2.1.5-18.fc12
eject-2.1.5-19.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/eject-2.1.5-19.fc13
eject-2.1.5-18.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update eject'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/eject-2.1.5-18.fc12
eject-2.1.5-19.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update eject'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/eject-2.1.5-19.fc13
eject-2.1.5-19.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
eject-2.1.5-18.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.