Doubt in CDROM Ejecting Program

Prashant Shah pshah.mumbai at gmail.com
Sat Nov 26 13:53:30 EST 2011


Hi,

On Sat, Nov 26, 2011 at 10:33 PM, Niamathullah sharief
<newbiesha at gmail.com> wrote:
> I am having code for ejecting CDROM in my Linux system. This is code
>
> CDROM is ejecting fine. ie its opening. But i don't know how to make my
> CDROM to close. Even if i run these program again its not closing. Can
> anyone help me..

if (ioctl(cdrom, CDROMCLOSETRAY) < 0) {
          printf("Could not close cdrom tray\n");
}

Regards.



More information about the Kernelnewbies mailing list