[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: eject command fails on cdrom



OK there is a link to hdc - 
lrwxrwxrwx    1 root     root            3 Feb 23 16:48 /dev/cdrom ->hdc

I can mount and unmount the cdrom without any problems, it is just the
eject command that fails.

Running strace eject (when running from /home/riaan) I get the following
output:
execve("/usr/bin/eject", ["eject"], [/* 21 vars */]) = 0
uname({sys="Linux", node="werknet", ...}) = 0
brk(0)                                  = 0x804c368
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40015000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
directory) open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=43532, ...}) = 0
old_mmap(NULL, 43532, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\230\327"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1170812, ...}) = 0
old_mmap(NULL, 1187616, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x40021000
mprotect(0x40139000, 40736, PROT_NONE)  = 0
old_mmap(0x40139000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x117000) = 0x40139000
old_mmap(0x4013f000, 16160, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4013f000
close(3)                                = 0
munmap(0x40016000, 43532)               = 0
brk(0)                                  = 0x804c368
brk(0x804c388)                          = 0x804c388
brk(0x804d000)                          = 0x804d000
open("/dev/cdrom", O_RDONLY|O_NONBLOCK) = -1 EACCES (Permission denied)
open("/mnt/cdrom", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or
directory)
open("/dev/cdroms/cdrom", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file
or directory)
open("/dev/cdroms/cdrom0", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such
file or directory)
open("/dev/rdsk/cdrom", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file
or directory)
open("/dev/dsk/cdrom", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or
directory)
open("./cdrom", O_RDONLY|O_NONBLOCK)    = -1 ENOENT (No such file or
directory)
write(2, "eject: unable to find or open de"..., 50eject: unable to find
or open
device for: `cdrom'
) = 50
_exit(1)                                = ?

Meaning nothing to me...

When running the same strace eject command from / I get:
execve("/usr/bin/eject", ["eject"], [/* 21 vars */]) = 0
uname({sys="Linux", node="werknet", ...}) = 0
brk(0)                                  = 0x804c368
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40015000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
directory) open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=43532, ...}) = 0
old_mmap(NULL, 43532, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\230\327"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1170812, ...}) = 0
old_mmap(NULL, 1187616, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x40021000
mprotect(0x40139000, 40736, PROT_NONE)  = 0
old_mmap(0x40139000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x117000) = 0x40139000
old_mmap(0x4013f000, 16160, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4013f000
close(3)                                = 0
munmap(0x40016000, 43532)               = 0
brk(0)                                  = 0x804c368
brk(0x804c388)                          = 0x804c388
brk(0x804d000)                          = 0x804d000
open("/dev/cdrom", O_RDONLY|O_NONBLOCK) = -1 EACCES (Permission denied)
open("/mnt/cdrom", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or
directory) open("/dev/cdroms/cdrom", O_RDONLY|O_NONBLOCK) = -1 ENOENT
(No such file or directory)
open("/dev/cdroms/cdrom0", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such
file or directory)
open("/dev/rdsk/cdrom", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file
or directory)
open("/dev/dsk/cdrom", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or
directory)
open("./cdrom", O_RDONLY|O_NONBLOCK)    = 3
close(3)                                = 0
readlink("./cdrom", 0xbffff67c, 1024)   = -1 EINVAL (Invalid argument)
open("/etc/mtab", O_RDONLY)             = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=276, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40016000
read(3, "/dev/hda4 / ext2 rw,errors=remou"..., 4096) = 276
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40016000, 4096)                = 0
open("/etc/fstab", O_RDONLY)            = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=550, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40016000
read(3, "# /etc/fstab: static file system"..., 4096) = 550
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40016000, 4096)                = 0
open("./cdrom", O_RDONLY|O_NONBLOCK)    = 3
ioctl(3, 0x5309, 0)                     = -1 ENOTTY (Inappropriate ioctl
for device)
ioctl(3, FIBMAP, 0xbffff974)            = -1 ENOTTY (Inappropriate ioctl
for device)
ioctl(3, FDEJECT, 0)                    = -1 ENOTTY (Inappropriate ioctl
for device)
ioctl(3, SNDCTL_MIDI_MPUMODE, 0xbffffa74) = -1 ENOTTY (Inappropriate
ioctl for device)
write(2, "eject: unable to eject, last err"..., 67eject: unable to
eject, last error: Inappropriate ioctl for device
) = 67
_exit(1)                                = ?

Again it might as well be greek...

Can anybody else perhaps tell me what it means?

TNX
Riaan

 

On Tue, 2002-05-21 at 20:22, Robert_L wrote:
> On Tuesday 21 May 01:25, Riaan Rottier wrote:
> > It doesn't make a difference whether the cdrom is mounted or not I get
> > the same error message.
> >
> > Interesting enough when I issue the command from my home directory
> > instead of the root directory I get the following error:
> >
> > eject: unable to find or open device for: `cdrom'
> >
> > Riaan
> 
> /dev/cdrom here is a link to /dev/hdc (which is the actual device file)
> Do you have a similar link?
> How is the device mounted in /etc/fstab?
> You could also do "strace eject" to see just what the command is doing as it 
> executes.
> all the best,
> Robert_L
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 



-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: