summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBastien Nocera <hadess@users.sourceforge.net>2004-01-07 22:21:40 +0000
committerBastien Nocera <hadess@users.sourceforge.net>2004-01-07 22:21:40 +0000
commitffc98f0d9de67cb1447cbc5501ad2293d65d6d40 (patch)
tree960551477e6b9ac3a8b386880c703230f17b8874 /src
parentc7dc2203f2da402c1999e10c99f174b44a6186cd (diff)
downloadxine-lib-ffc98f0d9de67cb1447cbc5501ad2293d65d6d40.tar.gz
xine-lib-ffc98f0d9de67cb1447cbc5501ad2293d65d6d40.tar.bz2
- 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
Diffstat (limited to 'src')
-rw-r--r--src/input/input_cdda.c10
-rw-r--r--src/input/input_vcd.c8
-rw-r--r--src/input/libdvdnav/dvd_input.c2
-rw-r--r--src/input/libdvdnav/vm.c4
4 files changed, 12 insertions, 12 deletions
diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c
index e1bbe11d5..f91b3f99c 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.41 2003/12/14 22:13:22 siggi Exp $
+ * $Id: input_cdda.c,v 1.42 2004/01/07 22:21:40 hadess Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -50,9 +50,9 @@
#define LOG_MODULE "input_cdda"
#define LOG_VERBOSE
-/*
+
#define LOG
-*/
+
#include "xine_internal.h"
#include "xineutils.h"
@@ -1406,7 +1406,7 @@ static char *_cdda_cddb_get_default_location(void) {
* Small sighandler ;-)
*/
static void die(int signal) {
- abort();
+ //abort();
}
/*
@@ -1983,7 +1983,7 @@ static int cdda_open(cdda_input_plugin_t *this_gen,
if (this_gen)
this_gen->fd = -1;
- fd = open (cdda_device, O_RDONLY);
+ fd = open (cdda_device, O_RDONLY|O_EXCL);
if (fd == -1) {
return -1;
}
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,
diff --git a/src/input/libdvdnav/dvd_input.c b/src/input/libdvdnav/dvd_input.c
index 481f086a9..ae332257e 100644
--- a/src/input/libdvdnav/dvd_input.c
+++ b/src/input/libdvdnav/dvd_input.c
@@ -173,7 +173,7 @@ static dvd_input_t file_open(const char *target)
/* Open the device */
#ifndef _MSC_VER
- dev->fd = open(target, O_RDONLY);
+ dev->fd = open(target, O_RDONLY|O_EXCL);
#else
dev->fd = open(target, O_RDONLY | O_BINARY);
#endif
diff --git a/src/input/libdvdnav/vm.c b/src/input/libdvdnav/vm.c
index 334e94523..fc8d9f570 100644
--- a/src/input/libdvdnav/vm.c
+++ b/src/input/libdvdnav/vm.c
@@ -19,7 +19,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: vm.c,v 1.25 2003/12/07 15:34:30 f1rmb Exp $
+ * $Id: vm.c,v 1.26 2004/01/07 22:21:40 hadess Exp $
*
*/
@@ -141,7 +141,7 @@ static void dvd_read_name(char *name, const char *device) {
uint8_t data[DVD_VIDEO_LB_LEN];
/* Read DVD name */
- fd=open(device, O_RDONLY);
+ fd=open(device, O_RDONLY|O_EXCL);
if (fd > 0) {
off = lseek64( fd, 32 * (int64_t) DVD_VIDEO_LB_LEN, SEEK_SET );
if( off == ( 32 * (int64_t) DVD_VIDEO_LB_LEN ) ) {