diff options
author | ache <ache@FreeBSD.org> | 1994-11-13 02:01:10 +0800 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-11-13 02:01:10 +0800 |
commit | 5bcb0c82039569586a4171a0ec163f8404de563a (patch) | |
tree | cfa67d4e610c2fe6193030e11e5c66f0b4c3924c /audio | |
parent | f46b448796248ade4965281fdf9b7a23dfac2f7f (diff) | |
download | freebsd-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.c | 7 |
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); } |