/* makedvdpluswork.c: A program for dealing with pesky DVD drives that * have "random" compatability with DVD+R(W) media. * Copyright (C) 2006 Segin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #if defined(__AS386_16__) && !defined(__FORCE_ELKS_ANYWAYS__) # error Not for ELKS/MS-DOS. #endif #define _BITS_PTHREADTYPES_H 1 #include #include #include #include #include #include #if !defined(__BCC__) # include #endif #if !defined(CDROMEJECT) # define CDROMEJECT 0x5309 /* Ejects the cdrom media */ #endif #if !defined(CDROMCLOSETRAY) # define CDROMCLOSETRAY 0x5319 #endif #if !defined(CDROM_DRIVE_STATUS) # define CDROM_DRIVE_STATUS 0x5326 #endif #if !defined(CDS_NO_INFO) # define CDS_NO_INFO 0 /* if not implemented */ #endif #if !defined(CDS_NO_DISC) # define CDS_NO_DISC 1 #endif #if !defined(CDS_TRAY_OPEN) # define CDS_TRAY_OPEN 2 #endif #if !defined(CDS_DRIVE_NOT_READY) # define CDS_DRIVE_NOT_READY 3 #endif #if !defined(CDS_DISC_OK) # define CDS_DISC_OK 4 #endif int main(int argc, char **argv) { int fd, x, y=0, ret, is_read; char *tmp, *tmp2, *src; if (argc == 1) { src = "/dev/dvd"; y = 1; goto startloop; } else { src = argv[1]; } for(x=0; x