1 --- libdvdnav-0.1.10-org/src/vm.c 2004-05-21 21:32:25.000000000 +0200
2 +++ libdvdnav-0.1.10/src/vm/vm.c 2008-04-15 13:25:33.000000000 +0200
5 #include "dvdnav_internal.h"
7 +#if defined(__linux__)
12 #include <io.h> /* read() */
15 * all off_t are 64bit.
20 uint8_t data[DVD_VIDEO_LB_LEN];
24 if( off == ( 32 * (off_t) DVD_VIDEO_LB_LEN ) ) {
25 off = read( fd, data, DVD_VIDEO_LB_LEN );
27 +#if defined(__linux__)
28 + if (off != ( (off_t) DVD_VIDEO_LB_LEN )) {
30 + mntfile = fopen( MOUNTED, "r" );
33 + while( ( me = getmntent( mntfile ) ) ) {
34 + if( strstr( device, me->mnt_dir ) ) {
35 + fprintf( stderr, "libdvdnav: Attempting to read dvd label from device %s mounted on %s \n", me->mnt_fsname, me->mnt_dir );
36 + fd = open(me->mnt_fsname, O_RDONLY);
42 + off = lseek( fd, 32 * (off_t) DVD_VIDEO_LB_LEN, SEEK_SET );
43 + if( off == ( 32 * (off_t) DVD_VIDEO_LB_LEN ) ) {
44 + off = read( fd, data, DVD_VIDEO_LB_LEN );
50 if (off == ( (off_t) DVD_VIDEO_LB_LEN )) {
51 fprintf(MSG_OUT, "libdvdnav: DVD Title: ");
52 for(i=25; i < 73; i++ ) {