aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-11-13 02:01:10 +0800
committerache <ache@FreeBSD.org>1994-11-13 02:01:10 +0800
commit5bcb0c82039569586a4171a0ec163f8404de563a (patch)
treecfa67d4e610c2fe6193030e11e5c66f0b4c3924c /audio
parentf46b448796248ade4965281fdf9b7a23dfac2f7f (diff)
downloadfreebsd-ports-gnome-5bcb0c82039569586a4171a0ec163f8404de563a.tar.gz
freebsd-ports-gnome-5bcb0c82039569586a4171a0ec163f8404de563a.tar.zst
freebsd-ports-gnome-5bcb0c82039569586a4171a0ec163f8404de563a.zip
Open mcd if cd open fails for default device
Diffstat (limited to 'audio')
-rw-r--r--audio/xcdplayer/files/cdrom_freebsd.c7
1 files changed, 5 insertions, 2 deletions
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);
}