Open mcd if cd open fails for default device

This commit is contained in:
Andrey A. Chernov 1994-11-12 18:01:10 +00:00
parent 5971c8da85
commit 3552027c8d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=373

View File

@ -33,6 +33,7 @@ static int c;
extern char *device;
static char cdrom[] = "/dev/rcd0c";
static char cdrom1[] = "/dev/rmcd0c";
cdrom_info cdi;
char info_filename[256];
@ -95,11 +96,13 @@ cdrom_open() {
if (device != NULL) {
if ((cdrom_fd = open(device, O_RDONLY)) == -1) {
perror("open: ");
perror(device);
return(-1);
}
} else {
if ((cdrom_fd = open(cdrom, O_RDONLY)) == -1) {
if ( (cdrom_fd = open(cdrom, O_RDONLY)) == -1
&& (cdrom_fd = open(cdrom1, O_RDONLY)) == -1
) {
perror("open: ");
return(-1);
}