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/libdvdnav/vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/input/libdvdnav/vm.c') 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 ) ) { -- cgit v1.2.3