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

Perl ioctl/cdio problems



I'm attempting to write a perl script that uses the CDDB library with
the data gathered from a live cd in the drive. It appears that the
best way to do this is to use ioctl in perl, and so that is what I'm
attempting to do. I've worked out a few bugs, however I'm still
getting:

Can't ioctl CDIOREADTOCHEADER: Inappropriate ioctl for device at
./cdrip.pl line 17.

when I try to run the (attached) script. I've put debug printf's in
cdio(1) to make sure that I am using the correct device, and
/dev/rcd0c _does_ seem to be the one that cdio is opening with
opendev(dev, O_RDONLY, OPENDEV_PART, &realdev);

Furthermore, perl's cdio.ph does seem to define the same 'c'/4 ioctl
that sys/cdio.h uses.

Any tips or debug pointers would be appreciated, or even known-good
perl scripts using ioctl on disc devices to confirm that the problem
is my code (at this point I'm not so sure)

thanks,
jeff

-- 
Jeff Bachtel  (root_(_at_)_ISC,TAMU)    http://www.cepheid.org/~jeff
				 [finger jeff_(_at_)_cepheid_(_dot_)_org for PGP key]

[demime 0.98d removed an attachment of type application/x-perl]



Visit your host, monkey.org