From 11499a3cce4288c13bb08294fad051f09191e105 Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Wed, 21 Apr 2004 16:43:18 +0000 Subject: Exclusive open(2) on CD device fails if a filesystem has been mounted. Affects at least Solaris 9 and Linux 2.6 (latter according to post by Bastien Nocera). Added support for skipping data track on Solaris. CVS patchset: 6418 CVS date: 2004/04/21 16:43:18 --- src/input/input_cdda.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 5985b36fe..135748ab3 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -20,7 +20,7 @@ * Compact Disc Digital Audio (CDDA) Input Plugin * by Mike Melanson (melanson@pcisys.net) * - * $Id: input_cdda.c,v 1.50 2004/04/10 17:41:44 valtri Exp $ + * $Id: input_cdda.c,v 1.51 2004/04/21 16:43:18 komadori Exp $ */ #ifdef HAVE_CONFIG_H @@ -547,6 +547,13 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) { tocentry.cdte_addr.msf.frame; } + if (tocentry.cdte_ctrl | CDROM_DATA_TRACK) { + toc->ignore_last_track = 1; + } + else { + toc->ignore_last_track = 0; + } + /* fetch the leadout as well */ memset(&tocentry, 0, sizeof(tocentry)); @@ -1746,7 +1753,7 @@ static int cdda_open(cdda_input_plugin_t *this_gen, if (this_gen) this_gen->fd = -1; - fd = open (cdda_device, O_RDONLY|O_EXCL); + fd = open (cdda_device, O_RDONLY); if (fd == -1) { return -1; } -- cgit v1.2.3