1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00
freebsd-ports/sysutils/dvd+rw-tools/files/patch-growisofs__mmc.cpp
Kubilay Kocak b960cf7da0 sysutils/dvd+rw-tools: Fix issue appending more than 25gb on BD-R DL discs
While burning ISO Multisession BD-R 50G growisofs reports no space left while
24G+ are available.

Backport a fix from Debian [1] to address the issue.

While I'm here, document description and origins of both patches [1][2] that
apply to same source file, for our future selves, and to avoid confusion
as both chunks reference the same variable.

[1] https://bugs.debian.org/615978
[2] https://bugs.debian.org/713016

PR:		230493
Submitted by:	Masachika ISHIZUKA <ish amail plala or jp>
Approved by:	portmgr (implicit, unmaintained port)
Obtained from:	Debian [1]
MFH:		2018Q3
2018-08-10 10:05:19 +00:00

27 lines
784 B
C++

# Cannot append data to BD-R DL used more than 25gb
# https://bugs.freebsd.org/230493 via http://bugs.debian.org/615978
#
# growisofs error: close session failed when burning 25gb blu-ray disc
# https://bugs.freebsd.org/198991 via http://bugs.debian.org/713016
--- growisofs_mmc.cpp.orig 2008-03-04 17:47:49 UTC
+++ growisofs_mmc.cpp
@@ -410,7 +410,7 @@ static unsigned int get_2k_capacity (Scsi_Command &cmd
}
nwa = 0;
- if (buf[7]&1 && !bdr_plus_pow) // NWA_V
+ if (buf[7]&1) // NWA_V
{ nwa = buf[12]<<24;
nwa |= buf[13]<<16;
nwa |= buf[14]<<8;
@@ -755,6 +755,8 @@ static void bd_r_format (Scsi_Command &cmd)
exit (FATAL_START(errno));
wait_for_unit (cmd);
+
+ bdr_plus_pow = 1;
cmd[0] = 0x35; // FLUSH CACHE
cmd[9] = 0;