eject -X sets speed to maximum

Bug #136971 reported by Ralph Corderoy
8
Affects Status Importance Assigned to Milestone
eject (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: eject

`eject -x 0' sets the speed to maximum. `eject -X' is meant to list the available speeds. However, it also leaves the speed set to maximum. This can cause problems if you've deliberately set it to a low speed, list the available speeds, and then burn a CD; you're burning on the maximum speed without realising. It's apparent from the source that the bug exists; ListSpeedCdrom() sets the speed to maximum in order to find out the limit for the loop which tries speed 1, 2, 3, etc., in turn.

Either eject(1) needs altering to match reality or, really the correct solution, eject needs to restore the current speed after setting it to all the possible ones with a warning in the manual that it changes the speed and an interrupted eject may leave the speed at a random setting.

Tags: patch
Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Setting to Confirmed because I think the bug is apparent from the source.

Changed in eject:
status: New → Confirmed
Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

This looks pretty straightforward. Here's a debdiff which saves, then restores the CD-ROM speed. It'll print an error if it can't restore it.

My CD drive doesn't support multiple speeds, so you'll have to let me know if this works. (It doesn't make it *stop* working on mine, at least.) Attached find a debdiff; I'll have a test package uploaded to my PPA shortly.

Changed in eject:
status: Confirmed → In Progress
Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

The fixed package is uploaded to my PPA; let me know if you have any trouble installing or using it.

https://launchpad.net/~adam-buchbinder/+archive

Information on how to use PPAs is here:

https://help.launchpad.net/Packaging/PPA#Installing%20software%20from%20a%20PPA

Thank you in advance for testing, and please let me know what you think.

Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

Did this patch fix your issue? I'd like to submit it upstream if you can confirm it working.

Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Adam, https://help.launchpad.net/Packaging/PPA/InstallingSoftware isn't clear whether as a 8.04/Hardy user I can use an 8.10/Intrepid PPA. Do you know?

Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

9.10 still has this bug. I've downgraded 9.10's eject package to Adam's
PPA and, with the -v option, it shows it saving and restoring the speed
set at the start of the -X processing. The patch also looks sane and
correct. Adam, let me know if this isn't sufficient for you to submit
upstream. Thanks for the fix.

Revision history for this message
Nigel Babu (nigelbabu) wrote :

If you could provide an updated patch for this bug, it would be great.

tags: added: patch-needswork
Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

The actual code patch isn't any different; I pasted it into a temporary file and applied it with 'patch'; the changes to the Debian control and changelog files were what needed to be updated. Attached find a debdiff against Lucid.

tags: added: patch
removed: patch-needswork
Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

Additionally, a version for Lucid with that patch applied is now in my PPA. Ralph, thanks for letting me know the patch is good; I'll send it upstream shortly.

Changed in eject (Ubuntu):
status: In Progress → Confirmed
Revision history for this message
Nigel Babu (nigelbabu) wrote :

Any news on this? Have you been able to send this upstream?

Revision history for this message
Nicolas DERIVE (kalon33) wrote :

Fixed in latest Debian Unstable package, now synced into oneiric. Will be in next release !

eject (2.1.5+deb1+cvs20081104-8) unstable; urgency=low

  * Bump Standards-Version to 3.9.1:
    - Use kfreebsd-any in Build-Depends
  * Convert debian/rules to use dh
  * Apply patch to avoid -X side-effects by Adam Buchbinder.
    Fixes Ubuntu bug #136971
  * Import openSUSE patches by Anna Bernáthová:
    - use CDROM_DRIVE_STATUS in toggle (bnc#374526)
    - check host_status and driver_status when using SG_IO (bnc#358033)

  * Program translations:
    - Slovenian (Andrej Znidarsic). Closes: #603674
    - Portuguese (Américo Monteiro). Closes: #567898

 -- Frank Lichtenheld <email address hidden> Sat, 19 Feb 2011 19:47:14 +0100

Changed in eject (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.