forked from mirrors/nixpkgs
94 lines
2.9 KiB
Diff
94 lines
2.9 KiB
Diff
|
diff -ur dvd+rw-tools-7.1-orig/growisofs.c dvd+rw-tools-7.1/growisofs.c
|
||
|
--- dvd+rw-tools-7.1-orig/growisofs.c 2008-03-04 10:15:03.000000000 +0100
|
||
|
+++ dvd+rw-tools-7.1/growisofs.c 2009-09-06 22:39:33.000000000 +0200
|
||
|
@@ -535,7 +535,7 @@
|
||
|
*/
|
||
|
int get_mmc_profile (void *fd);
|
||
|
int plusminus_r_C_parm (void *fd,char *C_parm);
|
||
|
-pwrite64_t poor_mans_setup (void *fd,off64_t leadout);
|
||
|
+pwrite64_t poor_mans_setup (void *fd,off64_t leadout,unsigned int lbreak);
|
||
|
char *plusminus_locale ();
|
||
|
int __1x ();
|
||
|
/*
|
||
|
@@ -2447,7 +2447,7 @@
|
||
|
goto out;
|
||
|
}
|
||
|
if (!progress.final) progress.final = tracksize;
|
||
|
- tracksize = layer_break*CD_BLOCK*2;
|
||
|
+ //tracksize = layer_break*CD_BLOCK*2;
|
||
|
}
|
||
|
}
|
||
|
else if (capacity > outoff)
|
||
|
@@ -2648,7 +2648,7 @@
|
||
|
* further details on poor_mans_setup
|
||
|
*/
|
||
|
pwrite64_method = poor_mans_setup (ioctl_handle,
|
||
|
- outoff+tracksize);
|
||
|
+ outoff+tracksize, (unsigned int)layer_break);
|
||
|
}
|
||
|
|
||
|
if (!progress.final)
|
||
|
diff -ur dvd+rw-tools-7.1-orig/growisofs_mmc.cpp dvd+rw-tools-7.1/growisofs_mmc.cpp
|
||
|
--- dvd+rw-tools-7.1-orig/growisofs_mmc.cpp 2008-03-04 18:47:49.000000000 +0100
|
||
|
+++ dvd+rw-tools-7.1/growisofs_mmc.cpp 2009-09-06 20:52:46.000000000 +0200
|
||
|
@@ -1612,7 +1612,7 @@
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
-static void plus_r_dl_split (Scsi_Command &cmd,off64_t size)
|
||
|
+static void plus_r_dl_split (Scsi_Command &cmd,off64_t size,unsigned int lbreak)
|
||
|
{ int err;
|
||
|
unsigned int blocks,split;
|
||
|
unsigned char dvd_20[4+8];
|
||
|
@@ -1644,10 +1644,17 @@
|
||
|
" use single layer media for this recording\n"),
|
||
|
exit (FATAL_START(EMEDIUMTYPE));
|
||
|
|
||
|
- blocks /= 16;
|
||
|
- blocks += 1;
|
||
|
- blocks /= 2;
|
||
|
- blocks *= 16;
|
||
|
+ if (lbreak)
|
||
|
+ {
|
||
|
+ blocks=lbreak;
|
||
|
+ }
|
||
|
+ else
|
||
|
+ {
|
||
|
+ blocks /= 16;
|
||
|
+ blocks += 1;
|
||
|
+ blocks /= 2;
|
||
|
+ blocks *= 16;
|
||
|
+ }
|
||
|
|
||
|
fprintf (stderr,"%s: splitting layers at %u blocks\n",
|
||
|
ioctl_device,blocks);
|
||
|
@@ -2010,7 +2017,7 @@
|
||
|
typedef ssize_t (*pwrite64_t)(int,const void *,size_t,off64_t);
|
||
|
|
||
|
extern "C"
|
||
|
-pwrite64_t poor_mans_setup (void *fd,off64_t leadout)
|
||
|
+pwrite64_t poor_mans_setup (void *fd,off64_t leadout,unsigned int lbreak)
|
||
|
{ Scsi_Command cmd(ioctl_handle=fd);
|
||
|
int err,profile=mmc_profile&0xFFFF;
|
||
|
|
||
|
@@ -2059,7 +2066,7 @@
|
||
|
case 0x2B: // DVD+R Double Layer
|
||
|
plusminus_pages_setup(cmd,profile);
|
||
|
if (profile==0x2B && next_track==1 && dvd_compat && leadout)
|
||
|
- plus_r_dl_split (cmd,leadout);
|
||
|
+ plus_r_dl_split (cmd,leadout,lbreak);
|
||
|
atexit (plus_r_finalize);
|
||
|
if (next_wr_addr)
|
||
|
{ atsignals (no_r_finalize);
|
||
|
diff -ur dvd+rw-tools-7.1-orig/transport.hxx dvd+rw-tools-7.1/transport.hxx
|
||
|
--- dvd+rw-tools-7.1-orig/transport.hxx 2008-03-01 11:34:43.000000000 +0100
|
||
|
+++ dvd+rw-tools-7.1/transport.hxx 2009-09-06 20:53:53.000000000 +0200
|
||
|
@@ -9,6 +9,7 @@
|
||
|
#if defined(__unix) || defined(__unix__)
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
+#include <limits.h>
|
||
|
#include <unistd.h>
|
||
|
#include <string.h>
|
||
|
#include <sys/types.h>
|