Re: SCSI CDROM on 2.2.1

Lenart Gabor (lgb@oxygene.terra.vein.hu)
Mon, 15 Feb 1999 19:44:41 +0100


On Mon, Feb 15, 1999 at 06:28:54PM +0100, Jens Axboe wrote:
> Dan Boger wrote:
> > > strace eject.

I have got similar problem :

root@oxygene:~# strace eject
execve("/usr/bin/eject", ["eject"], [/* 21 vars */]) = 0
brk(0) = 0x804bf40
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 17494, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4000c000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
mmap(0, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40011000
munmap(0x40011000, 4096) = 0
mmap(0, 672900, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40011000
mprotect(0x400a3000, 74884, PROT_NONE) = 0
mmap(0x400a3000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x91000) = 0x400a3000
mmap(0x400aa000, 46212, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400aa000
close(3) = 0
munmap(0x4000c000, 17494) = 0
personality(PER_LINUX) = 0
getpid() = 31274
readlink("/dev/cdrom", "hdc", 1024) = 3
open("/dev/hdc", O_RDONLYSegmentation fault

Without strace it does not segfault, but :

lgb@oxygene:~$ eject
eject: open failed for `/dev/hdc': No medium found

And in syslog :

Feb 13 16:57:21 oxygene kernel: eth0: NE2000 found at 0x300, using IRQ 10.
Feb 15 19:37:36 oxygene kernel: hdc: ATAPI 2X CD-ROM drive, 256kB Cache
Feb 15 19:37:36 oxygene kernel: Uniform CDROM driver Revision: 2.52
Feb 15 19:37:42 oxygene kernel: cdrom: open failed.
Feb 15 19:37:42 oxygene kernel: VFS: Disk change detected on device ide1(22,0)

That was with empty tray.

With inserted CDROM it worked.

readlink("/dev/cdrom", "hdc", 1024) = 3
open("/dev/hdc", O_RDONLY) = 3
brk(0) = 0x804bf40
brk(0x804bfc0) = 0x804bfc0
brk(0x804c000) = 0x804c000
open("/proc/mounts", O_RDONLY) = 4
fstat(4, {st_mode=0, st_size=0, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000c000
read(4, "/dev/root / ext2 rw 0 0\nproc /p"..., 1024) = 304
read(4, "", 1024) = 0
close(4) = 0
munmap(0x4000c000, 4096) = 0
fstat(3, {st_mode=S_IFIFO|S_ISGID|S_ISVTX, st_size=0, ...}) = 0
ioctl(3, FIBMAP, 0x804ba30) = -1 EINVAL (Invalid argument)
ioctl(3, CDROMEJECT, 0x4000b3f0) = 0
close(3) = 0
_exit(0) = ?

That was with Linux 2.2.1 UP.

1.5-6 Debian eject.deb package

---[ LGB/DC ]------------[ University Of Veszprém ]------[ Lénárt Gábor ]---
"The truth is out there" "We're l{ea,i}ving together" "The future is dark."
---[ 88/422022(4602) ]---[ http://lgb.hal.vein.hu ]---------[ 87/477074 ]---

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/