From ffc98f0d9de67cb1447cbc5501ad2293d65d6d40 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 7 Jan 2004 22:21:40 +0000 Subject: - use O_EXCL when opening the CD device so that we're sure no other application will try and touch it CVS patchset: 6009 CVS date: 2004/01/07 22:21:40 --- src/input/input_vcd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/input/input_vcd.c') diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c index 7f19d4239..a78bdde00 100644 --- a/src/input/input_vcd.c +++ b/src/input/input_vcd.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_vcd.c,v 1.71 2003/12/14 22:13:23 siggi Exp $ + * $Id: input_vcd.c,v 1.72 2004/01/07 22:21:40 hadess Exp $ * */ @@ -830,7 +830,7 @@ static int vcd_plugin_open (input_plugin_t *this_gen) { char *filename; int fd; - fd = open (cls->device, O_RDONLY); + fd = open (cls->device, O_RDONLY|O_EXCL); if (fd == -1) { return 0; } @@ -957,7 +957,7 @@ static xine_mrl_t **vcd_class_get_dir (input_class_t *this_gen, const char *file return NULL; - fd = open (this->device, O_RDONLY); + fd = open (this->device, O_RDONLY|O_EXCL); if (fd == -1) { xprintf (this->xine, XINE_VERBOSITY_LOG, @@ -1033,7 +1033,7 @@ static char ** vcd_class_get_autoplay_list (input_class_t *this_gen, int *num_fi int i, fd; - fd = open (this->device, O_RDONLY); + fd = open (this->device, O_RDONLY|O_EXCL); if (fd == -1) { xprintf (this->xine, XINE_VERBOSITY_LOG, -- cgit v1.2.3