Eject can't find second CD/DVD drive

Bug #1748503 reported by david braun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eject (Ubuntu)
New
Undecided
Unassigned

Bug Description

My machine has two CD/DVD drives. Entering "eject -v -X sr0" finds the first drive. Entering "eject -v -X sr1" sorta finds the second drive but not really. Here's the output for both.

$ eject -v -X sr0
eject: device name is `sr0'
eject: expanded name is `/dev/sr0'
eject: `/dev/sr0' is not mounted
eject: `/dev/sr0' is not a mount point
eject: listing CD-ROM speed
eject: saving original speed 48
48
eject: restored original speed 48
$ eject -v -X sr1
eject: device name is `sr1'
eject: expanded name is `/dev/sr1'
eject: `/dev/sr1' is not mounted
eject: `/dev/sr1' is not a mount point
eject: listing CD-ROM speed
eject: error while finding CD-ROM name
$

Actually ejecting the drive with "eject sr0" or "eject sr1" works fine. Running the command under strace shows an attempt to open "/dev/sr" which is probably wrong.

$ strace eject -v -X sr1
execve("/usr/bin/eject", ["eject", "-v", "-X", "sr1"], [/* 66 vars */]) = 0
brk(NULL) = 0x55a4775a0000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
  .
  .
  .
geteuid() = 1000
open("/dev/sr1", O_RDWR|O_NONBLOCK) = 3
open("/proc/sys/dev/cdrom/info", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(4, "CD-ROM information, Id: cdrom.c "..., 1024) = 476
readlink("/dev/sr", 0x7ffc1f7cede8, 4095) = -1 ENOENT (No such file or directory)
write(2, "eject: error while finding CD-RO"..., 39eject: error while finding CD-ROM name
) = 39
lseek(4, -406, SEEK_CUR) = 70
exit_group(1) = ?
+++ exited with 1 +++
$

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: eject 2.1.5+deb1+cvs20081104-13.1ubuntu0.16.04.1
ProcVersionSignature: Ubuntu 4.13.0-32.35~16.04.1-generic 4.13.13
Uname: Linux 4.13.0-32-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Feb 9 12:42:30 2018
EcryptfsInUse: Yes
InstallationDate: Installed on 2018-01-30 (9 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
SourcePackage: eject
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
david braun (braunster) wrote :
Revision history for this message
david braun (braunster) wrote :

Here is the strace output for "eject -v -X sr0" for comparison

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.