Package: dvd+rw-tools
Version: 7.1-14+b2
Severity: normal
Tags: patch

Dear Maintainer,

I was trying to format a BD-R DL disk with a non-default spare
area. To my surprise, my attempt failed with following error:
"- illegal command-line option for this media.". This error
contradicted the upstream documentation which now can be found in
WebArchive at
https://web.archive.org/web/20240805233642/http://fy.chalmers.se/~appro/linux/DVD+RW/Blu-ray/ .

After examinimg the source code and poking with GDB I have found out
that there is code which actually uses the `-ssa` argument with BD-R,
but error happens before reaching that point. After applying fixes
which you can find in the attached patch I was able to successfully
format a BD-R DL disk with non-default spare area and burn data on it
afterwards.

Thank you for the time you are investing in maintaining this software!

Mykhailo Mishchenko

-- System Information:
Debian Release: 13.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.57+deb13-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=uk_UA.UTF-8, LC_CTYPE=uk_UA.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dvd+rw-tools depends on:
ii genisoimage 9:1.1.11-4
ii growisofs 7.1-14+b2
ii libc6 2.41-12
ii libstdc++6 14.2.0-19

dvd+rw-tools recommends no packages.

Versions of packages dvd+rw-tools suggests:
pn cdrskin

-- no debconf information
Description: Allow formatting BD-R disks with `-ssa` argument
 There is a code applying the `-ssa` argument when formatting a BD-R
 disk, but actually using this argument with a BD-R disk was consided
 invalid. Fixing this issue.
 .
 Also fix a related typo in a `-force` flag check.
Author: Mykhailo Mishchenko <[email protected]>
Origin: other
Last-Update: 2025-12-16
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/dvd+rw-format.cpp
+++ b/dvd+rw-format.cpp
@@ -691,17 +691,19 @@ int main (int argc, char *argv[])
 			    "  to insist on -force option upon mode transition.\n");
 	    exit (0);
 	}
-	else if (mmc_profile==041 && !force)
+	else if (mmc_profile==0x41 && !force)
 	{   fprintf (stderr,"- media is blank\n");
-	    fprintf (stderr,"- as BD-R can be pre-formance only once, I've chosen\n"
+	    fprintf (stderr,"- as BD-R can be pre-formatted only once, I've chosen\n"
 			    "  to insist on -force option.\n");
+	    exit (0);
 	}
 	force = 0;
     }
 
     if (((mmc_profile == 0x1A || mmc_profile == 0x2A) && blank)
 	|| (mmc_profile != 0x1A && compat)
-	|| (mmc_profile != 0x12 && mmc_profile != 0x43 && ssa) )
+	|| (mmc_profile != 0x12 && mmc_profile != 0x43
+	    && mmc_profile != 0x41 && ssa) )
     {	fprintf (stderr,"- illegal command-line option for this media.\n");
 	goto offer_options;
     }

Reply via email to