Moved blanking suitability test before eventual spwaning of threads
This commit is contained in:
parent
a4f7906b16
commit
d5e18ee42a
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2007.01.03.163026"
|
#define Cdrskin_timestamP "2007.01.03.164716"
|
||||||
|
@ -7,9 +7,11 @@
|
|||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "async.h"
|
#include "async.h"
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
|
#include "back_hacks.h"
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#include <a ssert.h>
|
#include <a ssert.h>
|
||||||
@ -207,6 +209,9 @@ void burn_disc_erase(struct burn_drive *drive, int fast)
|
|||||||
{
|
{
|
||||||
struct erase_opts o;
|
struct erase_opts o;
|
||||||
|
|
||||||
|
/* A70103 : will be set to 0 by burn_disc_erase_sync() */
|
||||||
|
drive->cancel = 1;
|
||||||
|
|
||||||
/* ts A61006 */
|
/* ts A61006 */
|
||||||
/* a ssert(drive); */
|
/* a ssert(drive); */
|
||||||
/* a ssert(!SCAN_GOING()); */
|
/* a ssert(!SCAN_GOING()); */
|
||||||
@ -227,6 +232,19 @@ void burn_disc_erase(struct burn_drive *drive, int fast)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ts A70103 moved up from burn_disc_erase_sync() */
|
||||||
|
/* ts A60825 : allow on parole to blank appendable CDs */
|
||||||
|
if ( ! (drive->status == BURN_DISC_FULL ||
|
||||||
|
(drive->status == BURN_DISC_APPENDABLE &&
|
||||||
|
! libburn_back_hack_42) ) ) {
|
||||||
|
libdax_msgs_submit(libdax_messenger, drive->global_index,
|
||||||
|
0x00020130,
|
||||||
|
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||||
|
"Drive and media state unsuitable for blanking",
|
||||||
|
0, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
o.drive = drive;
|
o.drive = drive;
|
||||||
o.fast = fast;
|
o.fast = fast;
|
||||||
add_worker(drive, (WorkerFunc) erase_worker_func, &o);
|
add_worker(drive, (WorkerFunc) erase_worker_func, &o);
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "sg.h"
|
#include "sg.h"
|
||||||
#include "structure.h"
|
#include "structure.h"
|
||||||
#include "back_hacks.h"
|
|
||||||
|
|
||||||
#include "libdax_msgs.h"
|
#include "libdax_msgs.h"
|
||||||
extern struct libdax_msgs *libdax_messenger;
|
extern struct libdax_msgs *libdax_messenger;
|
||||||
@ -444,13 +443,6 @@ void burn_disc_erase_sync(struct burn_drive *d, int fast)
|
|||||||
burn_print(1, "erasing drive %s %s\n", d->idata->vendor,
|
burn_print(1, "erasing drive %s %s\n", d->idata->vendor,
|
||||||
d->idata->product);
|
d->idata->product);
|
||||||
|
|
||||||
/* ts A60825 : allow on parole to blank appendable CDs */
|
|
||||||
if ( ! (d->status == BURN_DISC_FULL ||
|
|
||||||
(d->status == BURN_DISC_APPENDABLE &&
|
|
||||||
! libburn_back_hack_42) ) ) {
|
|
||||||
d->cancel = 1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
d->cancel = 0;
|
d->cancel = 0;
|
||||||
d->busy = BURN_DRIVE_ERASING;
|
d->busy = BURN_DRIVE_ERASING;
|
||||||
d->erase(d, fast);
|
d->erase(d, fast);
|
||||||
@ -503,6 +495,7 @@ void burn_disc_format_sync(struct burn_drive *d, int flag)
|
|||||||
while ((d->progress.sector = d->get_erase_progress(d)) > 0 ||
|
while ((d->progress.sector = d->get_erase_progress(d)) > 0 ||
|
||||||
!d->test_unit_ready(d))
|
!d->test_unit_ready(d))
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
d->sync_cache(d);
|
||||||
|
|
||||||
d->progress.sector = 0x10000;
|
d->progress.sector = 0x10000;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user