[cdrkit/f14] Added patch files forgot in the previous commit.

Jan Horak hhorak at fedoraproject.org
Fri Jun 3 05:54:14 UTC 2011


commit a3477b3bacecec733aba7b187f1ba4c73a4fa90c
Author: Honza Horák <hhorak at redhat.com>
Date:   Fri Jun 3 07:53:41 2011 +0200

    Added patch files forgot in the previous commit.

 cdrkit-1.1.11-format.patch  |  129 +++++++++++++++++++++++++++++++++++++++++++
 cdrkit-1.1.11-handler.patch |   12 ++++
 2 files changed, 141 insertions(+), 0 deletions(-)
---
diff --git a/cdrkit-1.1.11-format.patch b/cdrkit-1.1.11-format.patch
new file mode 100644
index 0000000..983ed23
--- /dev/null
+++ b/cdrkit-1.1.11-format.patch
@@ -0,0 +1,129 @@
+diff -up cdrkit-1.1.11/wodim/drv_mmc.c.format cdrkit-1.1.11/wodim/drv_mmc.c
+--- cdrkit-1.1.11/wodim/drv_mmc.c.format	2011-05-18 16:49:14.591822130 +0200
++++ cdrkit-1.1.11/wodim/drv_mmc.c	2011-05-18 16:49:14.596822130 +0200
+@@ -1507,6 +1507,11 @@ getdisktype_mdvd(SCSI *usalp, cdr_t *dp)
+ 	dstat_t	*dsp = dp->cdr_dstat;
+ 
+ 	struct track_info track_info;
++
++	extern char *buf;
++	struct disk_info *dip;
++	int profile;
++
+     if(lverbose)
+         printf("HINT: use dvd+rw-mediainfo from dvd+rw-tools for information extraction.\n");
+ 	/* if(getdisktype_mmc(usalp, dp)<0)
+@@ -1521,6 +1526,18 @@ getdisktype_mdvd(SCSI *usalp, cdr_t *dp)
+ 	dsp->ds_disktype&= ~DT_CD;
+ 	dsp->ds_disktype|= DT_DVD;
+ 
++	profile = get_curprofile(usalp);
++	if (profile == 0x1A) {
++		dip = (struct disk_info *)buf;
++		if (get_diskinfo(usalp, dip) < 0)
++			return (-1);
++		if (dip->disk_status == DS_EMPTY) {	/* Unformatted	    */
++			dsp->ds_flags |= DSF_NEED_FORMAT;
++			if(lverbose)
++				printf("The medium is empty, it will be auto formatted.\n");
++		}
++	}
++	
+ 	return (ret);
+ 
+ }
+diff -up cdrkit-1.1.11/wodim/scsi_cdr.c.format cdrkit-1.1.11/wodim/scsi_cdr.c
+--- cdrkit-1.1.11/wodim/scsi_cdr.c.format	2011-05-18 16:49:14.601822130 +0200
++++ cdrkit-1.1.11/wodim/scsi_cdr.c	2011-05-18 16:49:14.600822130 +0200
+@@ -1328,7 +1328,7 @@ scsi_format(SCSI *usalp, caddr_t addr, i
+ 	}
+ 	sleep(10);
+ 	printf("\rFormating in progress: 100.00 %% done.        \n");
+-	if (pid) exit (0);
++	if (pid > 0) exit (0);
+ 	return ret;
+ }
+ 
+diff -up cdrkit-1.1.11/wodim/wodim.c.format cdrkit-1.1.11/wodim/wodim.c
+--- cdrkit-1.1.11/wodim/wodim.c.format	2011-05-18 16:49:14.584822130 +0200
++++ cdrkit-1.1.11/wodim/wodim.c	2011-05-18 17:21:59.510821630 +0200
+@@ -946,6 +946,40 @@ int main(int argc, char *argv[])
+ 		print_toc(usalp, dp);
+ 		comexit(0);
+ 	}
++	
++	if ((flags & F_FORMAT) || (dp->cdr_dstat->ds_flags & DSF_NEED_FORMAT)) {
++		printf("wodim: media format asked\n");
++		/*
++		* Do not abort if OPC failes. Just give it a chance
++		* for better laser power calibration than without OPC.
++		*
++		* Ricoh drives return with a vendor unique sense code.
++		* This is most likely because they refuse to do OPC
++		* on a non blank media.
++		*/
++		usalp->silent++;
++		do_opc(usalp, dp, flags);
++		usalp->silent--;
++		wait_unit_ready(usalp, 120);
++		if (gettimeofday(&starttime, (struct timezone *)0) < 0)
++			errmsg("Cannot get start time\n");
++		
++		if ((*dp->cdr_format)(usalp, dp, formattype) < 0) {
++			errmsgno(EX_BAD, "Cannot format disk, aborting.\n");
++			comexit(EX_BAD);
++		}
++		if (gettimeofday(&fixtime, (struct timezone *)0) < 0)
++			errmsg("Cannot get format time\n");
++		if (lverbose)
++			prtimediff("Formatting time: ", &starttime, &fixtime);
++
++		if (!wait_unit_ready(usalp, 240) || tracks == 0) {
++			comexit(0);
++		}
++		if (gettimeofday(&starttime, (struct timezone *)0) < 0)
++			errmsg("Cannot get start time\n");
++	}
++	
+ #ifdef	XXX
+ 	if ((*dp->cdr_check_session)() < 0) {
+ 		comexit(EX_BAD);
+@@ -1230,38 +1264,6 @@ int main(int argc, char *argv[])
+ 			comexit(0);
+ 		}
+ 	}
+-	if (flags & F_FORMAT) {
+-		printf("wodim: media format asked\n");
+-		/*
+-		* Do not abort if OPC failes. Just give it a chance
+-		* for better laser power calibration than without OPC.
+-		*
+-		* Ricoh drives return with a vendor unique sense code.
+-		* This is most likely because they refuse to do OPC
+-		* on a non blank media.
+-		*/
+-		usalp->silent++;
+-		do_opc(usalp, dp, flags);
+-		usalp->silent--;
+-		wait_unit_ready(usalp, 120);
+-		if (gettimeofday(&starttime, (struct timezone *)0) < 0)
+-			errmsg("Cannot get start time\n");
+-
+-		if ((*dp->cdr_format)(usalp, dp, formattype) < 0) {
+-			errmsgno(EX_BAD, "Cannot format disk, aborting.\n");
+-			comexit(EX_BAD);
+-		}
+-		if (gettimeofday(&fixtime, (struct timezone *)0) < 0)
+-			errmsg("Cannot get format time\n");
+-		if (lverbose)
+-			prtimediff("Formatting time: ", &starttime, &fixtime);
+-
+-		if (!wait_unit_ready(usalp, 240) || tracks == 0) {
+-			comexit(0);
+-		}
+-		if (gettimeofday(&starttime, (struct timezone *)0) < 0)
+-			errmsg("Cannot get start time\n");
+-	}
+ 	/*
+ 	* Reset start time so we will not see blanking time and
+ 	* writing time counted together.
diff --git a/cdrkit-1.1.11-handler.patch b/cdrkit-1.1.11-handler.patch
new file mode 100644
index 0000000..5b3fa6a
--- /dev/null
+++ b/cdrkit-1.1.11-handler.patch
@@ -0,0 +1,12 @@
+diff -up cdrkit-1.1.11/icedax/icedax.c.handler cdrkit-1.1.11/icedax/icedax.c
+--- cdrkit-1.1.11/icedax/icedax.c.handler	2011-06-02 16:37:02.446206285 +0200
++++ cdrkit-1.1.11/icedax/icedax.c	2011-06-02 16:37:25.444206279 +0200
+@@ -1054,7 +1054,7 @@ static void exit_wrapper(int status)
+ 
+ 	if (child_pid != 0) {
+ 		SCSI *usalp = get_scsi_p();
+-		if (usalp->running) {
++		if (usalp && usalp->running) {
+ 			usalp->cb_fun = on_exitscsi;
+ 			usalp->cb_arg = (void *) (uintptr_t) status;
+ 		} else {


More information about the scm-commits mailing list