Re: Is there any module to get the cdrom infomation?
- From: cmic <cmic@xxxxxxxxxxxx>
- Date: Wed, 30 Jul 2008 05:22:57 -0700 (PDT)
Hello
On 29 juil, 04:35, "lofenee" <lofe...@xxxxxxxxx> wrote:
I want to check whether a cdrom node under /dev actually exists.
maybe ioctl could help ?
(quick and dirty, sorry ...)
.....
open(CDROM, "< /dev/cdrom");
$media = ioctl(CDROM, 0x5327, $status='');
close(CDROM);
if($media eq 101) {
#media is present whith info
....
}
Regards
--
michel marcon aka cmic
.
- Prev by Date: Re: Is there any module to get the cdrom infomation?
- Next by Date: FAQ 4.28 How do I change the Nth occurrence of something?
- Previous by thread: Re: Is there any module to get the cdrom infomation?
- Next by thread: How to find ioctl.ph - is my version of perl busted?
- Index(es):
Relevant Pages
|