Avoided to release drive prematurely if interrupted while grabbing drive

This commit is contained in:
Thomas Schmitt 2011-10-07 07:51:55 +00:00
parent 2dd7559045
commit 3780547c3d
3 changed files with 4 additions and 5 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2011.10.06.121140"
#define Cdrskin_timestamP "2011.10.07.075117"

View File

@ -497,7 +497,6 @@ int burn_drive_grab(struct burn_drive *d, int le)
d->status = BURN_DISC_UNREADY;
errcode = d->grab(d);
if (errcode == 0) {
burn_print(1, "low level drive grab failed\n");
return 0;
@ -1357,7 +1356,7 @@ int burn_drive_forget(struct burn_drive *d, int force)
if(occup > 0)
if(force < 1)
return 0;
if(occup > 10)
if(occup >= 10)
return 0;
/* >>> do any drive calming here */;
@ -2332,7 +2331,7 @@ int burn_abort_5(int patience,
}
if(occup <= 10) {
if(occup < 10) {
if (drive_array[i].drive_role != 1)
/* occup == -1 comes early */
usleep(1000000);

View File

@ -1,7 +1,7 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2011 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/