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

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