1 diff -Naur vobcopy-1.2.0/dvd.c vobcopy-osol/dvd.c
2 --- vobcopy-1.2.0/dvd.c 2009-06-08 23:15:34.000000000 +0300
3 +++ vobcopy-osol/dvd.c 2016-08-07 01:15:43.392524655 +0300
8 - /* title is actually in the device name */
10 - new_title = strstr( device, "d0/" ) + strlen( "d0/" );
11 - strncpy( title, new_title, sizeof(title)-1 );
12 +#include <sys/utsname.h>
13 + struct utsname name;
15 + if ( strcmp(name.release,"5.11") == 0 ) {
18 + struct mnttab mount_entry;
19 + char mnt_mountp[255];
22 + if ( ( mnttab_fp = fopen( "/etc/mnttab", "r" ) ) == NULL )
24 + fprintf( stderr, _(" [Error] Could not open mnttab for searching!\n") );
25 + fprintf( stderr, _(" [Error] error: %s\n"), strerror( errno ) );
28 + mnt_special = malloc( strlen( device ) );
29 + strcpy(mnt_special, device);
30 + strcpy( strstr( mnt_special, "/rdsk/" ), "" );
31 + strcat( mnt_special, "/dsk/" );
32 + strcat( mnt_special, strstr( device, "/rdsk/" ) + strlen( "/rdsk/" ) );
34 + while ( ( mntcheck = getmntent( mnttab_fp, &mount_entry ) ) == 0 )
36 + /* check to see if our path is this entry */
37 + if ( strcmp( mnt_special, mount_entry.mnt_special ) == 0 )
39 + strcpy(title, ( mount_entry.mnt_mountp ) + 7);
45 + fprintf( stderr, _("[Error] Encountered error in reading mnttab file\n") );
46 + fprintf( stderr, _("[Error] error: %s\n"), strerror( errno ) );
49 + else if ( mntcheck == -1 )
51 + fprintf( stderr, _("[Error] Did not find mounted device %s in mnttab!\n"), device );
56 + /* title is actually in the device name */
58 + new_title = strstr( device, "d0/" ) + strlen( "d0/" );
59 + strncpy( title, new_title, strlen(new_title) );
65 title[ last + 1 ] = '\0';
70 for( i=0; i< strlen(title);i++ )
74 strcat( new_device, "/rdsk/" );
76 strstr( mnt_special, "/dsk/" ) + strlen( "/dsk/" ) );
77 - strncpy( device, new_device, sizeof(device)-1 );
78 + strncpy( device, new_device, strlen(new_device)+1 );
82 diff -Naur vobcopy-1.2.0/vobcopy.c vobcopy-osol/vobcopy.c
83 --- vobcopy-1.2.0/vobcopy.c 2009-06-08 23:15:34.000000000 +0300
84 +++ vobcopy-osol/vobcopy.c 2016-08-07 01:15:43.347404608 +0300
87 if ( provided_dvd_name_flag )
88 safestrncpy( dvd_name, provided_dvd_name, sizeof(dvd_name)-1 );
91 get_dvd_name_return = get_dvd_name( dvd_path, dvd_name );
92 fprintf( stderr, _("[Info] Name of the dvd: %s\n"), dvd_name );