Blame SOURCES/brasero-3.12.2-fix-bdr-flags.patch

ef6a7e
From a2cca499d8b7e4b8ca7030e0656f6c57e98beb88 Mon Sep 17 00:00:00 2001
ef6a7e
From: Bastien Nocera <hadess@hadess.net>
ef6a7e
Date: Thu, 9 Sep 2021 15:09:35 +0200
ef6a7e
Subject: [PATCH 1/4] libbrasero-media: Fix memset() warning
ef6a7e
MIME-Version: 1.0
ef6a7e
Content-Type: text/plain; charset=UTF-8
ef6a7e
Content-Transfer-Encoding: 8bit
ef6a7e
ef6a7e
libbrasero-media/scsi-read-track-information.c: In function ‘brasero_read_track_info’:
ef6a7e
libbrasero-media/scsi-read-track-information.c:116:33: warning: argument to ‘sizeof’ in ‘memset’ call is the same pointer type ‘BraseroScsiTrackInfo *’ {aka ‘struct _BraseroScsiTrackInfo *’} as the destination; expected ‘BraseroScsiTrackInfo’ {aka ‘struct _BraseroScsiTrackInfo’} or an explicit length [-Wsizeof-pointer-memaccess]
ef6a7e
  116 |         memset (&hdr, 0, sizeof (info));
ef6a7e
      |                                 ^
ef6a7e
---
ef6a7e
 libbrasero-media/scsi-read-track-information.c | 2 +-
ef6a7e
 1 file changed, 1 insertion(+), 1 deletion(-)
ef6a7e
ef6a7e
diff --git a/libbrasero-media/scsi-read-track-information.c b/libbrasero-media/scsi-read-track-information.c
ef6a7e
index 37644f25..6f6274ad 100644
ef6a7e
--- a/libbrasero-media/scsi-read-track-information.c
ef6a7e
+++ b/libbrasero-media/scsi-read-track-information.c
ef6a7e
@@ -113,7 +113,7 @@ brasero_read_track_info (BraseroRdTrackInfoCDB *cdb,
ef6a7e
 
ef6a7e
 	/* first ask the drive how long should the data be and then ... */
ef6a7e
 	datasize = 4;
ef6a7e
-	memset (&hdr, 0, sizeof (info));
ef6a7e
+	memset (&hdr, 0, sizeof (hdr));
ef6a7e
 	BRASERO_SET_16 (cdb->alloc_len, datasize);
ef6a7e
 	res = brasero_scsi_command_issue_sync (cdb, &hdr, datasize, error);
ef6a7e
 	if (res)
ef6a7e
-- 
ef6a7e
GitLab
ef6a7e
ef6a7e
ef6a7e
From 45dee052e1c3d636fd1c6d32f6320e33163ee05d Mon Sep 17 00:00:00 2001
ef6a7e
From: Bastien Nocera <hadess@hadess.net>
ef6a7e
Date: Thu, 9 Sep 2021 22:44:58 +0200
ef6a7e
Subject: [PATCH 2/4] libbrasero-burn: Better log for
ef6a7e
 brasero_check_flags_for_drive()
ef6a7e
ef6a7e
Print some debug when flags don't match.
ef6a7e
---
ef6a7e
 libbrasero-burn/burn-basics.c | 20 +++++++++++++++-----
ef6a7e
 1 file changed, 15 insertions(+), 5 deletions(-)
ef6a7e
ef6a7e
diff --git a/libbrasero-burn/burn-basics.c b/libbrasero-burn/burn-basics.c
ef6a7e
index 2bfe7fde..f4c3a9f0 100644
ef6a7e
--- a/libbrasero-burn/burn-basics.c
ef6a7e
+++ b/libbrasero-burn/burn-basics.c
ef6a7e
@@ -118,24 +118,34 @@ brasero_check_flags_for_drive (BraseroDrive *drive,
ef6a7e
 	media = brasero_medium_get_status (medium);
ef6a7e
 	if (flags & BRASERO_BURN_FLAG_DUMMY) {
ef6a7e
 		/* This is always FALSE */
ef6a7e
-		if (media & BRASERO_MEDIUM_PLUS)
ef6a7e
+		if (media & BRASERO_MEDIUM_PLUS) {
ef6a7e
+			BRASERO_BURN_LOG ("Drive does not support BRASERO_MEDIUM_PLUS flag");
ef6a7e
 			return FALSE;
ef6a7e
+		}
ef6a7e
 
ef6a7e
 		if (media & BRASERO_MEDIUM_DVD) {
ef6a7e
-			if (!brasero_medium_can_use_dummy_for_sao (medium))
ef6a7e
+			if (!brasero_medium_can_use_dummy_for_sao (medium)) {
ef6a7e
+				BRASERO_BURN_LOG ("Drive does not support using dummy for SAO");
ef6a7e
 				return FALSE;
ef6a7e
+			}
ef6a7e
 		}
ef6a7e
 		else if (flags & BRASERO_BURN_FLAG_DAO) {
ef6a7e
-			if (!brasero_medium_can_use_dummy_for_sao (medium))
ef6a7e
+			if (!brasero_medium_can_use_dummy_for_sao (medium)) {
ef6a7e
+				BRASERO_BURN_LOG ("Drive does not support using dummy for DAO");
ef6a7e
 				return FALSE;
ef6a7e
+			}
ef6a7e
 		}
ef6a7e
-		else if (!brasero_medium_can_use_dummy_for_tao (medium))
ef6a7e
+		else if (!brasero_medium_can_use_dummy_for_tao (medium)) {
ef6a7e
+			BRASERO_BURN_LOG ("Drive does not support using dummy for TAO");
ef6a7e
 			return FALSE;
ef6a7e
+		}
ef6a7e
 	}
ef6a7e
 
ef6a7e
 	if (flags & BRASERO_BURN_FLAG_BURNPROOF) {
ef6a7e
-		if (!brasero_medium_can_use_burnfree (medium))
ef6a7e
+		if (!brasero_medium_can_use_burnfree (medium)) {
ef6a7e
+			BRASERO_BURN_LOG ("Drive does not support burnproof/burnfree");
ef6a7e
 			return FALSE;
ef6a7e
+		}
ef6a7e
 	}
ef6a7e
 
ef6a7e
 	return TRUE;
ef6a7e
-- 
ef6a7e
GitLab
ef6a7e
ef6a7e
ef6a7e
From 52137beac620cf34541698a3d0222f5e169eba85 Mon Sep 17 00:00:00 2001
ef6a7e
From: Bastien Nocera <hadess@hadess.net>
ef6a7e
Date: Thu, 9 Sep 2021 23:45:03 +0200
ef6a7e
Subject: [PATCH 3/4] libbrasero-burn: Fix
ef6a7e
 BRASERO_PLUGIN_ADD_STANDARD_BD_R_FLAGS
ef6a7e
ef6a7e
The macro was never used and was missing an opening parenthesis.
ef6a7e
---
ef6a7e
 libbrasero-burn/brasero-plugin-registration.h | 2 +-
ef6a7e
 1 file changed, 1 insertion(+), 1 deletion(-)
ef6a7e
ef6a7e
diff --git a/libbrasero-burn/brasero-plugin-registration.h b/libbrasero-burn/brasero-plugin-registration.h
ef6a7e
index 2d3719d8..a92fe1e9 100644
ef6a7e
--- a/libbrasero-burn/brasero-plugin-registration.h
ef6a7e
+++ b/libbrasero-burn/brasero-plugin-registration.h
ef6a7e
@@ -494,7 +494,7 @@ brasero_plugin_register (BraseroPlugin *plugin)				\
ef6a7e
 				  BRASERO_MEDIUM_BDR_SRM_POW|			\
ef6a7e
 				  BRASERO_MEDIUM_DUAL_L|			\
ef6a7e
 				  BRASERO_MEDIUM_BLANK,				\
ef6a7e
-				  BRASERO_BURN_FLAG_MULTI|			\
ef6a7e
+				  (BRASERO_BURN_FLAG_MULTI|			\
ef6a7e
 				  BRASERO_BURN_FLAG_DUMMY|			\
ef6a7e
 				  BRASERO_BURN_FLAG_NOGRACE) &			\
ef6a7e
 				  (~(unsupported_MACRO)),				\
ef6a7e
-- 
ef6a7e
GitLab
ef6a7e
ef6a7e
ef6a7e
From 5e703334370ccc51e02bcd4bed33ef5bb2bd364d Mon Sep 17 00:00:00 2001
ef6a7e
From: Bastien Nocera <hadess@hadess.net>
ef6a7e
Date: Thu, 9 Sep 2021 23:40:28 +0200
ef6a7e
Subject: [PATCH 4/4] growisofs: Fix burning BD-R media not working
ef6a7e
ef6a7e
The BD-R flags were simply never applied to the plugin, so the brasero
ef6a7e
core didn't know how to burn that type of media.
ef6a7e
ef6a7e
See https://bugzilla.redhat.com/show_bug.cgi?id=1704341
ef6a7e
and https://bugzilla.redhat.com/show_bug.cgi?id=1456971
ef6a7e
ef6a7e
Closes: #324
ef6a7e
---
ef6a7e
 plugins/growisofs/burn-growisofs.c | 3 +++
ef6a7e
 1 file changed, 3 insertions(+)
ef6a7e
ef6a7e
diff --git a/plugins/growisofs/burn-growisofs.c b/plugins/growisofs/burn-growisofs.c
ef6a7e
index 3d00a779..c9955aac 100644
ef6a7e
--- a/plugins/growisofs/burn-growisofs.c
ef6a7e
+++ b/plugins/growisofs/burn-growisofs.c
ef6a7e
@@ -877,6 +877,9 @@ brasero_growisofs_export_caps (BraseroPlugin *plugin)
ef6a7e
 	/* for DVD+RW */
ef6a7e
 	BRASERO_PLUGIN_ADD_STANDARD_DVDRW_PLUS_FLAGS (plugin, BRASERO_BURN_FLAG_NONE);
ef6a7e
 
ef6a7e
+	/* for BD-R */
ef6a7e
+	BRASERO_PLUGIN_ADD_STANDARD_BD_R_FLAGS (plugin, BRASERO_BURN_FLAG_NONE);
ef6a7e
+
ef6a7e
 	/* for BD-RE */
ef6a7e
 	BRASERO_PLUGIN_ADD_STANDARD_BD_RE_FLAGS (plugin, BRASERO_BURN_FLAG_NONE);
ef6a7e
 
ef6a7e
-- 
ef6a7e
GitLab
ef6a7e