Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 193603
Collapse All | Expand All

(-)cdrdao-1.2.2.orig/dao/main.cc (+2 lines)
Lines 2027-2032 static int copyCd(CdrDriver *src, CdrDri Link Here
2027
  }
2027
  }
2028
2028
2029
  if (src == dst) {
2029
  if (src == dst) {
2030
    // unlock src to make swaping possible
2031
    src->preventMediumRemoval(0);
2030
    message(0, "Please insert a recordable medium and hit enter.");
2032
    message(0, "Please insert a recordable medium and hit enter.");
2031
    getc(stdin);
2033
    getc(stdin);
2032
  }
2034
  }
(-)cdrdao-1.2.2.orig/scsilib/libscg/scsi-linux-sg.c (-3 / +24 lines)
Lines 225-230 LOCAL long sg_raisedma __PR((SCSI *scgp, Link Here
225
#endif
225
#endif
226
LOCAL	void	sg_settimeout	__PR((int f, int timeout));
226
LOCAL	void	sg_settimeout	__PR((int f, int timeout));
227
227
228
int    sg_open_excl    __PR((char *device, int mode));
229
230
int
231
sg_open_excl(device, mode)
232
       char    *device;
233
       int     mode;
234
{
235
       int f;
236
       int i;
237
       f = open(device, mode|O_EXCL);
238
       for (i = 0; (i < 10) && (f == -1 && (errno == EACCES || errno == EBUSY)); i++) {
239
           fprintf(stderr, "Error trying to open %s exclusively (%s)... retrying in 1 second.\n", device, strerror(errno));
240
	   usleep(1000000 + 100000.0 * rand()/(RAND_MAX+1.0));
241
	   f = open(device, mode|O_EXCL);
242
       }
243
       if (f == -1 && errno != EACCES && errno != EBUSY) {
244
           f = open(device, mode);
245
       }
246
       return f;
247
}
248
228
/*
249
/*
229
 * Return version information for the low level SCSI transport code.
250
 * Return version information for the low level SCSI transport code.
230
 * This has been introduced to make it easier to trace down problems
251
 * This has been introduced to make it easier to trace down problems
Lines 407-413 scanopen: Link Here
407
		
428
		
408
		for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i++) {
429
		for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i++) {
409
			devname = globbuf.gl_pathv[i];
430
			devname = globbuf.gl_pathv[i];
410
			f = open(devname, O_RDWR | O_NONBLOCK);
431
			f = sg_open_excl(devname, O_RDWR | O_NONBLOCK);
411
			if (f < 0) {
432
			if (f < 0) {
412
				/*
433
				/*
413
				 * Set up error string but let us clear it later
434
				 * Set up error string but let us clear it later
Lines 458-464 scanopen: Link Here
458
		for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i++) {
479
		for (i = 0; globbuf.gl_pathv && globbuf.gl_pathv[i] != NULL ; i++) {
459
			devname = globbuf.gl_pathv[i];
480
			devname = globbuf.gl_pathv[i];
460
481
461
			f = open(devname, O_RDWR | O_NONBLOCK);
482
			f = sg_open_excl(devname, O_RDWR | O_NONBLOCK);
462
			if (f < 0) {
483
			if (f < 0) {
463
				/*
484
				/*
464
				 * Set up error string but let us clear it later
485
				 * Set up error string but let us clear it later
Lines 511-517 openbydev: Link Here
511
			"Warning: Open by 'devname' is unintentional and not supported.\n");
532
			"Warning: Open by 'devname' is unintentional and not supported.\n");
512
		}
533
		}
513
					/* O_NONBLOCK is dangerous */
534
					/* O_NONBLOCK is dangerous */
514
		f = open(device, O_RDWR | O_NONBLOCK);
535
		f = sg_open_excl(device, O_RDWR | O_NONBLOCK);
515
/*		if (f < 0 && errno == ENOENT)*/
536
/*		if (f < 0 && errno == ENOENT)*/
516
/*			goto openpg;*/
537
/*			goto openpg;*/
517
538
(-)cdrdao-1.2.2.orig/scsilib/libscg/scsitransp.c (-3 / +4 lines)
Lines 52-59 static char sccsid[] = Link Here
52
 *	Choose your name instead of "schily" and make clear that the version
52
 *	Choose your name instead of "schily" and make clear that the version
53
 *	string is related to a modified source.
53
 *	string is related to a modified source.
54
 */
54
 */
55
LOCAL	char	_scg_version[]		= "0.8";	/* The global libscg version	*/
55
LOCAL	char	_scg_version[]		= "0.8ubuntu1";	/* The global libscg version	*/
56
LOCAL	char	_scg_auth_schily[]	= "schily";	/* The author for this module	*/
56
LOCAL	char	_scg_auth_ubuntu[]	= "ubuntu";	/* The author for this module	*/
57
57
58
58
#define	DEFTIMEOUT	20	/* Default timeout for SCSI command transport */
59
#define	DEFTIMEOUT	20	/* Default timeout for SCSI command transport */
59
60
Lines 137-143 scg_version(scgp, what) Link Here
137
		 * return "schily" for the SCG_AUTHOR request.
138
		 * return "schily" for the SCG_AUTHOR request.
138
		 */
139
		 */
139
		case SCG_AUTHOR:
140
		case SCG_AUTHOR:
140
			return (_scg_auth_schily);
141
			return (_scg_auth_ubuntu);
141
		case SCG_SCCS_ID:
142
		case SCG_SCCS_ID:
142
			return (sccsid);
143
			return (sccsid);
143
		default:
144
		default:

Return to bug 193603