changeset 226:bdc6b26da039 src

include O_EXCL patch from Bastien Nocera
author mroi
date Mon, 12 Jan 2004 19:29:53 +0000
parents 9b1b740e3fc9
children 10af49ee5118
files dvdread/dvd_input.c vm/vm.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dvdread/dvd_input.c	Sun Jan 11 21:43:13 2004 +0000
+++ b/dvdread/dvd_input.c	Mon Jan 12 19:29:53 2004 +0000
@@ -173,7 +173,7 @@
   
   /* 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
--- a/vm/vm.c	Sun Jan 11 21:43:13 2004 +0000
+++ b/vm/vm.c	Mon Jan 12 19:29:53 2004 +0000
@@ -141,7 +141,7 @@
     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 ) ) {