]> Pileus Git - ~andy/sunrise/blob - sys-fs/fuseiso/files/fuseiso-20070708-largerthan4gb.patch
sys-fs/fuseiso: New ebuild fixing issues with large isos as described in msg 17 in...
[~andy/sunrise] / sys-fs / fuseiso / files / fuseiso-20070708-largerthan4gb.patch
1 Index: src/isofs.c
2 ===================================================================
3 --- src/isofs.c (Revision 5)
4 +++ src/isofs.c (Arbeitskopie)
5 @@ -178,7 +178,7 @@
6                          context.data_size = isonum_723(context.pd.logical_block_size);
7                          
8                          if(!context.block_size) {
9 -                            fprintf(stderr, "init: wrong block data size %d, using default 2048\n", context.data_size);
10 +                            fprintf(stderr, "init: wrong block data size %Lu, using default 2048\n", context.data_size);
11                              context.data_size = 2048;
12                          };
13                          
14 @@ -324,7 +324,7 @@
15      
16      if(context.block_size != 2048) {
17          // report unusual data block size
18 -        printf("Data block size: %d\n", context.block_size);
19 +        printf("Data block size: %Lu\n", context.block_size);
20      };
21      
22      char buf[129];
23 @@ -479,7 +479,7 @@
24      };
25      size_t len = read(context.fd, buf, context.data_size);
26      if(len != context.data_size) {
27 -        fprintf(stderr, "isofs_read_raw_block: can`t read full block, read only %d bytes from offset %d, %d required; errno %d, message %s\n", 
28 +        fprintf(stderr, "isofs_read_raw_block: can`t read full block, read only %d bytes from offset %d, %Lu required; errno %d, message %s\n", 
29              len, (int) off, context.data_size, errno, strerror(errno));
30          fprintf(stderr, "isofs_read_raw_block: huh? reading zeros beyond file end? someone want to save a penny?\n");
31          memset(buf + len, 0, context.data_size - len);
32 Index: src/isofs.h
33 ===================================================================
34 --- src/isofs.h (Revision 5)
35 +++ src/isofs.h (Arbeitskopie)
36 @@ -38,9 +38,9 @@
37      struct iso_directory_record *root;
38      int file_offset; // offset to begin of useful data (for .nrg files)
39      int id_offset; // offset to CD001 inside file
40 -    size_t block_size; // raw block size
41 -    size_t block_offset; // offset from block start to data
42 -    size_t data_size; // data size inside block 
43 +    off_t block_size; // raw block size
44 +    off_t block_offset; // offset from block start to data
45 +    off_t data_size; // data size inside block 
46      int susp; // parse susp entries
47      int susp_skip; // skip bytes from susp SP entry
48      int joliet_level; // joliet extension level (1, 2 or 3)