archrelease: copy trunk to extra-x86_64
[arch-packages.git] / dvd+rw-tools / trunk / dvd+rw-tools-7.1-layerbreaksetup.patch
blob7636f8393df2c98366bcfad1c38b9be365389e6f
1 diff -ur dvd+rw-tools-7.1-orig/growisofs.c dvd+rw-tools-7.1/growisofs.c
2 --- dvd+rw-tools-7.1-orig/growisofs.c 2008-03-04 10:15:03.000000000 +0100
3 +++ dvd+rw-tools-7.1/growisofs.c 2009-09-06 22:39:33.000000000 +0200
4 @@ -535,7 +535,7 @@
5 */
6 int get_mmc_profile (void *fd);
7 int plusminus_r_C_parm (void *fd,char *C_parm);
8 -pwrite64_t poor_mans_setup (void *fd,off64_t leadout);
9 +pwrite64_t poor_mans_setup (void *fd,off64_t leadout,unsigned int lbreak);
10 char *plusminus_locale ();
11 int __1x ();
13 @@ -2447,7 +2447,7 @@
14 goto out;
16 if (!progress.final) progress.final = tracksize;
17 - tracksize = layer_break*CD_BLOCK*2;
18 + //tracksize = layer_break*CD_BLOCK*2;
21 else if (capacity > outoff)
22 @@ -2648,7 +2648,7 @@
23 * further details on poor_mans_setup
25 pwrite64_method = poor_mans_setup (ioctl_handle,
26 - outoff+tracksize);
27 + outoff+tracksize, (unsigned int)layer_break);
30 if (!progress.final)
31 diff -ur dvd+rw-tools-7.1-orig/growisofs_mmc.cpp dvd+rw-tools-7.1/growisofs_mmc.cpp
32 --- dvd+rw-tools-7.1-orig/growisofs_mmc.cpp 2008-03-04 18:47:49.000000000 +0100
33 +++ dvd+rw-tools-7.1/growisofs_mmc.cpp 2009-09-06 20:52:46.000000000 +0200
34 @@ -1612,7 +1612,7 @@
35 return 0;
38 -static void plus_r_dl_split (Scsi_Command &cmd,off64_t size)
39 +static void plus_r_dl_split (Scsi_Command &cmd,off64_t size,unsigned int lbreak)
40 { int err;
41 unsigned int blocks,split;
42 unsigned char dvd_20[4+8];
43 @@ -1644,10 +1644,17 @@
44 " use single layer media for this recording\n"),
45 exit (FATAL_START(EMEDIUMTYPE));
47 - blocks /= 16;
48 - blocks += 1;
49 - blocks /= 2;
50 - blocks *= 16;
51 + if (lbreak)
52 + {
53 + blocks=lbreak;
54 + }
55 + else
56 + {
57 + blocks /= 16;
58 + blocks += 1;
59 + blocks /= 2;
60 + blocks *= 16;
61 + }
63 fprintf (stderr,"%s: splitting layers at %u blocks\n",
64 ioctl_device,blocks);
65 @@ -2010,7 +2017,7 @@
66 typedef ssize_t (*pwrite64_t)(int,const void *,size_t,off64_t);
68 extern "C"
69 -pwrite64_t poor_mans_setup (void *fd,off64_t leadout)
70 +pwrite64_t poor_mans_setup (void *fd,off64_t leadout,unsigned int lbreak)
71 { Scsi_Command cmd(ioctl_handle=fd);
72 int err,profile=mmc_profile&0xFFFF;
74 @@ -2059,7 +2066,7 @@
75 case 0x2B: // DVD+R Double Layer
76 plusminus_pages_setup(cmd,profile);
77 if (profile==0x2B && next_track==1 && dvd_compat && leadout)
78 - plus_r_dl_split (cmd,leadout);
79 + plus_r_dl_split (cmd,leadout,lbreak);
80 atexit (plus_r_finalize);
81 if (next_wr_addr)
82 { atsignals (no_r_finalize);
83 diff -ur dvd+rw-tools-7.1-orig/transport.hxx dvd+rw-tools-7.1/transport.hxx
84 --- dvd+rw-tools-7.1-orig/transport.hxx 2008-03-01 11:34:43.000000000 +0100
85 +++ dvd+rw-tools-7.1/transport.hxx 2009-09-06 20:53:53.000000000 +0200
86 @@ -9,6 +9,7 @@
87 #if defined(__unix) || defined(__unix__)
88 #include <stdio.h>
89 #include <stdlib.h>
90 +#include <limits.h>
91 #include <unistd.h>
92 #include <string.h>
93 #include <sys/types.h>