remmina: update to 1.4.37
[oi-userland.git] / components / encumbered / vobcopy / patches / vobcopy.patch
blobe41df4ee4c736425b7d90009eb345a7d165130b8
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
4 @@ -25,10 +25,55 @@
7 #if defined( __sun )
8 - /* title is actually in the device name */
9 - char *new_title;
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;
14 + uname(&name);
15 + if ( strcmp(name.release,"5.11") == 0 ) {
16 + FILE *mnttab_fp;
17 + int mntcheck;
18 + struct mnttab mount_entry;
19 + char mnt_mountp[255];
20 + char *mnt_special;
22 + if ( ( mnttab_fp = fopen( "/etc/mnttab", "r" ) ) == NULL )
23 + {
24 + fprintf( stderr, _(" [Error] Could not open mnttab for searching!\n") );
25 + fprintf( stderr, _(" [Error] error: %s\n"), strerror( errno ) );
26 + return -1;
27 + }
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 )
35 + {
36 + /* check to see if our path is this entry */
37 + if ( strcmp( mnt_special, mount_entry.mnt_special ) == 0 )
38 + {
39 + strcpy(title, ( mount_entry.mnt_mountp ) + 7);
40 + break;
41 + }
42 + }
43 + if ( mntcheck > 0 )
44 + {
45 + fprintf( stderr, _("[Error] Encountered error in reading mnttab file\n") );
46 + fprintf( stderr, _("[Error] error: %s\n"), strerror( errno ) );
47 + return -1;
48 + }
49 + else if ( mntcheck == -1 )
50 + {
51 + fprintf( stderr, _("[Error] Did not find mounted device %s in mnttab!\n"), device );
52 + return -1;
53 + }
54 + }
55 + else {
56 + /* title is actually in the device name */
57 + char *new_title;
58 + new_title = strstr( device, "d0/" ) + strlen( "d0/" );
59 + strncpy( title, new_title, strlen(new_title) );
60 + }
61 #else
62 int filehandle = 0;
63 int i = 0, last = 0;
64 @@ -89,7 +134,7 @@
65 title[ last + 1 ] = '\0';
67 #endif
69 + int i;
70 for( i=0; i< strlen(title);i++ )
72 if( title[i] == ' ')
73 @@ -222,7 +267,7 @@
74 strcat( new_device, "/rdsk/" );
75 strcat( new_device,
76 strstr( mnt_special, "/dsk/" ) + strlen( "/dsk/" ) );
77 - strncpy( device, new_device, sizeof(device)-1 );
78 + strncpy( device, new_device, strlen(new_device)+1 );
79 free( mnt_special );
80 free( new_device );
81 mounted = TRUE;
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
85 @@ -736,7 +736,7 @@
87 if ( provided_dvd_name_flag )
88 safestrncpy( dvd_name, provided_dvd_name, sizeof(dvd_name)-1 );
89 - else
90 + else
91 get_dvd_name_return = get_dvd_name( dvd_path, dvd_name );
92 fprintf( stderr, _("[Info] Name of the dvd: %s\n"), dvd_name );