반응형
cd 롬 꺼내기 예제소스
리눅스 환경에서 다음의 예제로 시디롬을 open 할수있다.
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/cdrom.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
int fd;
fd = open("/dev/cdrom",O_RDWR|O_NDELAY);
ioctl(fd,CDROMEJECT);
return 0;
}
반응형