Added check for .might_simulate to burn_write_opts_auto_write_type()
This commit is contained in:
parent
c719abbaf2
commit
79b1f0d5b9
@ -365,8 +365,10 @@ even if attempted explicitely via "driveropts=burnfree".
|
||||
.TP
|
||||
.BI \-dummy
|
||||
Try to perform the drive operations without actually affecting the inserted
|
||||
media. There is no guarantee that this will work with a particular combination
|
||||
media. There is no warranty that this will work with a particular combination
|
||||
of drive, media, and write mode. Blanking is prevented reliably, though.
|
||||
To avoid inadverted real burning, -dummy refuses burn runs on anything but
|
||||
CD-R[W] and DVD-R[W].
|
||||
.TP
|
||||
.BI \-eject
|
||||
Eject the disc after work is done.
|
||||
@ -380,6 +382,9 @@ write modes which libburn believes they are not supported by the drive.
|
||||
Another application is to enforce blanking or re-formatting of media
|
||||
which appear to be in the desired blank or format state already.
|
||||
.br
|
||||
This option enables a burn run with option -dummy even if libburn believes
|
||||
that drive and media will not simulate the write mode but will write for real.
|
||||
.br
|
||||
.B Caution:
|
||||
Use this only when in urgent need.
|
||||
.TP
|
||||
|
@ -1 +1 @@
|
||||
#define Cdrskin_timestamP "2007.05.28.165630"
|
||||
#define Cdrskin_timestamP "2007.05.28.170243"
|
||||
|
@ -124,11 +124,19 @@ void burn_write_opts_set_format(struct burn_write_opts *opts, int format)
|
||||
|
||||
int burn_write_opts_set_simulate(struct burn_write_opts *opts, int sim)
|
||||
{
|
||||
/* <<< ts A70529 :
|
||||
One cannot predict the ability to simulate from page 05h
|
||||
information alone. This check is now done later in
|
||||
function burn_write_opts_auto_write_type().
|
||||
|
||||
if (opts->drive->mdata->simulate) {
|
||||
opts->simulate = sim;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
*/
|
||||
opts->simulate = !!sim;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int burn_write_opts_set_underrun_proof(struct burn_write_opts *opts,
|
||||
@ -265,6 +273,8 @@ no_caps:;
|
||||
} else if (caps->might_do_sao >= 3 && !(flag & 1))
|
||||
goto try_tao;
|
||||
do_sao:;
|
||||
if (caps->might_simulate == 0 && opts->simulate && !opts->force_is_set)
|
||||
goto no_simulate;
|
||||
if (!(flag & 1))
|
||||
burn_write_opts_set_write_type(
|
||||
opts, BURN_WRITE_SAO, BURN_BLOCK_SAO);
|
||||
@ -296,6 +306,8 @@ try_tao:;
|
||||
if (strcmp(reason_pt, "TAO: ") != 0)
|
||||
goto no_tao;
|
||||
/* ( TAO data/audio block size will be handled automatically ) */
|
||||
if (caps->might_simulate == 0 && opts->simulate && !opts->force_is_set)
|
||||
goto no_simulate;
|
||||
if (!(flag & 1))
|
||||
burn_write_opts_set_write_type(
|
||||
opts, BURN_WRITE_TAO, BURN_BLOCK_MODE1);
|
||||
@ -323,13 +335,21 @@ try_raw:;
|
||||
strcat(reasons, "drive dislikes block type, ");
|
||||
if (strcmp(reason_pt, "RAW: ") != 0)
|
||||
goto no_write_mode;
|
||||
if (!opts->force_is_set)
|
||||
goto no_simulate;
|
||||
|
||||
/* For now: no setting of raw write modes */
|
||||
|
||||
{wt = BURN_WRITE_RAW; goto ex;}
|
||||
|
||||
no_write_mode:;
|
||||
wt = BURN_WRITE_NONE;
|
||||
{wt = BURN_WRITE_NONE; goto ex;}
|
||||
|
||||
no_simulate:;
|
||||
strcat(reasons,
|
||||
"simulation of write job not supported by drive and media, ");
|
||||
{wt = BURN_WRITE_NONE; goto ex;}
|
||||
|
||||
ex:;
|
||||
burn_disc_free_multi_caps(&caps);
|
||||
if (wt == BURN_WRITE_NONE && !(flag & 3)) {
|
||||
|
Loading…
Reference in New Issue
Block a user