Re: CDROM tray eject

James H. Cloos Jr. (cloos@jhcloos.com)
Mon, 1 Apr 1996 02:38:08 -0600


>>>>> "|" == root <root@stimpson.igc.net> writes:

|> The minimalists among you may find the following code to cause
|> your CDROM to eject amusing. It compiles _very_ quickly. Don't
|> forget to make it suid root or run it as root.

|> main() { ioctl(open("/dev/cdrom",0), 0x5309); }

Nah. We minimalists prefer:

perl -e 'open(A,"/dev/cdrom");ioctl(A,0x5309,0);'

:)

-JimC

-- 
James H. Cloos, Jr.	<URL:http://www.jhcloos.com/~cloos/>
cloos@jhcloos.com	Work: cloos@io.com
LPF,Usenix,SAGE,ISOC