Blob Blame History Raw
From a2cca499d8b7e4b8ca7030e0656f6c57e98beb88 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 9 Sep 2021 15:09:35 +0200
Subject: [PATCH 1/4] libbrasero-media: Fix memset() warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

libbrasero-media/scsi-read-track-information.c: In function ‘brasero_read_track_info’:
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]
  116 |         memset (&hdr, 0, sizeof (info));
      |                                 ^
---
 libbrasero-media/scsi-read-track-information.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libbrasero-media/scsi-read-track-information.c b/libbrasero-media/scsi-read-track-information.c
index 37644f25..6f6274ad 100644
--- a/libbrasero-media/scsi-read-track-information.c
+++ b/libbrasero-media/scsi-read-track-information.c
@@ -113,7 +113,7 @@ brasero_read_track_info (BraseroRdTrackInfoCDB *cdb,
 
 	/* first ask the drive how long should the data be and then ... */
 	datasize = 4;
-	memset (&hdr, 0, sizeof (info));
+	memset (&hdr, 0, sizeof (hdr));
 	BRASERO_SET_16 (cdb->alloc_len, datasize);
 	res = brasero_scsi_command_issue_sync (cdb, &hdr, datasize, error);
 	if (res)
-- 
GitLab


From 45dee052e1c3d636fd1c6d32f6320e33163ee05d Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 9 Sep 2021 22:44:58 +0200
Subject: [PATCH 2/4] libbrasero-burn: Better log for
 brasero_check_flags_for_drive()

Print some debug when flags don't match.
---
 libbrasero-burn/burn-basics.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/libbrasero-burn/burn-basics.c b/libbrasero-burn/burn-basics.c
index 2bfe7fde..f4c3a9f0 100644
--- a/libbrasero-burn/burn-basics.c
+++ b/libbrasero-burn/burn-basics.c
@@ -118,24 +118,34 @@ brasero_check_flags_for_drive (BraseroDrive *drive,
 	media = brasero_medium_get_status (medium);
 	if (flags & BRASERO_BURN_FLAG_DUMMY) {
 		/* This is always FALSE */
-		if (media & BRASERO_MEDIUM_PLUS)
+		if (media & BRASERO_MEDIUM_PLUS) {
+			BRASERO_BURN_LOG ("Drive does not support BRASERO_MEDIUM_PLUS flag");
 			return FALSE;
+		}
 
 		if (media & BRASERO_MEDIUM_DVD) {
-			if (!brasero_medium_can_use_dummy_for_sao (medium))
+			if (!brasero_medium_can_use_dummy_for_sao (medium)) {
+				BRASERO_BURN_LOG ("Drive does not support using dummy for SAO");
 				return FALSE;
+			}
 		}
 		else if (flags & BRASERO_BURN_FLAG_DAO) {
-			if (!brasero_medium_can_use_dummy_for_sao (medium))
+			if (!brasero_medium_can_use_dummy_for_sao (medium)) {
+				BRASERO_BURN_LOG ("Drive does not support using dummy for DAO");
 				return FALSE;
+			}
 		}
-		else if (!brasero_medium_can_use_dummy_for_tao (medium))
+		else if (!brasero_medium_can_use_dummy_for_tao (medium)) {
+			BRASERO_BURN_LOG ("Drive does not support using dummy for TAO");
 			return FALSE;
+		}
 	}
 
 	if (flags & BRASERO_BURN_FLAG_BURNPROOF) {
-		if (!brasero_medium_can_use_burnfree (medium))
+		if (!brasero_medium_can_use_burnfree (medium)) {
+			BRASERO_BURN_LOG ("Drive does not support burnproof/burnfree");
 			return FALSE;
+		}
 	}
 
 	return TRUE;
-- 
GitLab


From 52137beac620cf34541698a3d0222f5e169eba85 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 9 Sep 2021 23:45:03 +0200
Subject: [PATCH 3/4] libbrasero-burn: Fix
 BRASERO_PLUGIN_ADD_STANDARD_BD_R_FLAGS

The macro was never used and was missing an opening parenthesis.
---
 libbrasero-burn/brasero-plugin-registration.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libbrasero-burn/brasero-plugin-registration.h b/libbrasero-burn/brasero-plugin-registration.h
index 2d3719d8..a92fe1e9 100644
--- a/libbrasero-burn/brasero-plugin-registration.h
+++ b/libbrasero-burn/brasero-plugin-registration.h
@@ -494,7 +494,7 @@ brasero_plugin_register (BraseroPlugin *plugin)				\
 				  BRASERO_MEDIUM_BDR_SRM_POW|			\
 				  BRASERO_MEDIUM_DUAL_L|			\
 				  BRASERO_MEDIUM_BLANK,				\
-				  BRASERO_BURN_FLAG_MULTI|			\
+				  (BRASERO_BURN_FLAG_MULTI|			\
 				  BRASERO_BURN_FLAG_DUMMY|			\
 				  BRASERO_BURN_FLAG_NOGRACE) &			\
 				  (~(unsupported_MACRO)),				\
-- 
GitLab


From 5e703334370ccc51e02bcd4bed33ef5bb2bd364d Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 9 Sep 2021 23:40:28 +0200
Subject: [PATCH 4/4] growisofs: Fix burning BD-R media not working

The BD-R flags were simply never applied to the plugin, so the brasero
core didn't know how to burn that type of media.

See https://bugzilla.redhat.com/show_bug.cgi?id=1704341
and https://bugzilla.redhat.com/show_bug.cgi?id=1456971

Closes: #324
---
 plugins/growisofs/burn-growisofs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/plugins/growisofs/burn-growisofs.c b/plugins/growisofs/burn-growisofs.c
index 3d00a779..c9955aac 100644
--- a/plugins/growisofs/burn-growisofs.c
+++ b/plugins/growisofs/burn-growisofs.c
@@ -877,6 +877,9 @@ brasero_growisofs_export_caps (BraseroPlugin *plugin)
 	/* for DVD+RW */
 	BRASERO_PLUGIN_ADD_STANDARD_DVDRW_PLUS_FLAGS (plugin, BRASERO_BURN_FLAG_NONE);
 
+	/* for BD-R */
+	BRASERO_PLUGIN_ADD_STANDARD_BD_R_FLAGS (plugin, BRASERO_BURN_FLAG_NONE);
+
 	/* for BD-RE */
 	BRASERO_PLUGIN_ADD_STANDARD_BD_RE_FLAGS (plugin, BRASERO_BURN_FLAG_NONE);
 
-- 
GitLab