From 3552027c8dafcd8713691073955c967c42b5a863 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Sat, 12 Nov 1994 18:01:10 +0000 Subject: Open mcd if cd open fails for default device --- audio/xcdplayer/files/cdrom_freebsd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'audio') diff --git a/audio/xcdplayer/files/cdrom_freebsd.c b/audio/xcdplayer/files/cdrom_freebsd.c index 47a26f8e8eb3..6d164612a4d5 100644 --- a/audio/xcdplayer/files/cdrom_freebsd.c +++ b/audio/xcdplayer/files/cdrom_freebsd.c @@ -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); } -- cgit v1.2.3