Made CD with unclosed track blankable (by -force)
This commit is contained in:
parent
db4522bbdc
commit
448aac8880
@ -175,6 +175,7 @@ or
|
||||
#define Cdrskin_libburn_has_burn_disc_unsuitablE 1
|
||||
#define Cdrskin_libburn_has_read_atiP 1
|
||||
#define Cdrskin_libburn_has_buffer_progresS 1
|
||||
#define Cdrskin_libburn_has_pretend_fulL 1
|
||||
#endif
|
||||
|
||||
#ifndef Cdrskin_libburn_versioN
|
||||
@ -2020,6 +2021,8 @@ see_cdrskin_eng_html:;
|
||||
fprintf(stderr,"\t-toc\t\tretrieve and print TOC/PMA data\n");
|
||||
fprintf(stderr,
|
||||
"\t-atip\t\tretrieve media state, print \"Is *erasable\"\n");
|
||||
fprintf(stderr,
|
||||
"\t-force\t\tforce to continue on some errors to allow blanking bad disks\n");
|
||||
#ifdef Cdrskin_allow_libburn_taO
|
||||
fprintf(stderr,"\t-tao\t\tWrite disk in TAO mode.\n");
|
||||
#endif
|
||||
@ -2256,6 +2259,7 @@ struct CdrskiN {
|
||||
double x_speed;
|
||||
int gracetime;
|
||||
int dummy_mode;
|
||||
int force_is_set;
|
||||
int single_track;
|
||||
|
||||
int do_devices;
|
||||
@ -2378,6 +2382,7 @@ int Cdrskin_new(struct CdrskiN **skin, struct CdrpreskiN *preskin, int flag)
|
||||
o->x_speed= -1.0;
|
||||
o->gracetime= 0;
|
||||
o->dummy_mode= 0;
|
||||
o->force_is_set= 0;
|
||||
o->single_track= 0;
|
||||
o->do_devices= 0;
|
||||
o->do_scanbus= 0;
|
||||
@ -3608,7 +3613,7 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag)
|
||||
enum burn_disc_status s;
|
||||
struct burn_progress p;
|
||||
struct burn_drive *drive;
|
||||
int ret,loop_counter= 0;
|
||||
int ret,loop_counter= 0,hint_force= 0;
|
||||
double start_time;
|
||||
|
||||
start_time= Sfile_microtime(0); /* will be refreshed later */
|
||||
@ -3623,6 +3628,19 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag)
|
||||
usleep(100002);
|
||||
if(skin->verbosity>=Cdrskin_verbose_progresS)
|
||||
Cdrskin_report_disc_status(skin,s,0);
|
||||
|
||||
#ifdef Cdrskin_libburn_has_pretend_fulL
|
||||
if(s==BURN_DISC_UNSUITABLE) {
|
||||
if(skin->force_is_set) {
|
||||
fprintf(stderr,
|
||||
"cdrskin: NOTE : -force blank=... : Treating unsuitable media as burn_disc_full\n");
|
||||
ret= burn_disc_pretend_full(drive);
|
||||
s= burn_disc_get_status(drive);
|
||||
} else
|
||||
hint_force= 1;
|
||||
}
|
||||
#endif /* Cdrskin_libburn_has_pretend_fulL */
|
||||
|
||||
if(s!=BURN_DISC_FULL &&
|
||||
(s!=BURN_DISC_APPENDABLE || skin->no_blank_appendable)) {
|
||||
Cdrskin_release_drive(skin,0);
|
||||
@ -3636,6 +3654,9 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag)
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
"cdrskin: FATAL : blank=... : no blankworthy disc found\n");
|
||||
if(hint_force)
|
||||
fprintf(stderr,
|
||||
"cdrskin: HINT : If you are certain to have a CD-RW, try option -force\n");
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@ -4427,7 +4448,7 @@ int Cdrskin_setup(struct CdrskiN *skin, int argc, char **argv, int flag)
|
||||
"-d", "-Verbose", "-V", "-silent", "-s", "-setdropts", "-prcap", "-inq",
|
||||
"-reset", "-abort", "-overburn", "-ignsize", "-useinfo", "-format", "-load",
|
||||
"-lock", "-msinfo", "-fix", "-nofix", "-waiti",
|
||||
"-immed", "-force", "-raw", "-raw96p", "-raw16",
|
||||
"-immed", "-raw", "-raw96p", "-raw16",
|
||||
"-clone", "-text", "-mode2", "-xa", "-xa1", "-xa2", "-xamix",
|
||||
"-cdi", "-isosize", "-preemp", "-nopreemp", "-copy", "-nocopy",
|
||||
"-scms", "-shorttrack", "-noshorttrack", "-packet", "-noclose",
|
||||
@ -4678,6 +4699,9 @@ set_driveropts:;
|
||||
} else if(strcmp(argv[i],"--fifo_per_track")==0) {
|
||||
skin->fifo_per_track= 1;
|
||||
|
||||
} else if(strcmp(argv[i],"-force")==0) {
|
||||
skin->force_is_set= 1;
|
||||
|
||||
} else if(strncmp(argv[i],"-fs=",4)==0) {
|
||||
value_pt= argv[i]+4;
|
||||
goto fs_equals;
|
||||
|
@ -1 +1 @@
|
||||
#define Cdrskin_timestamP "2006.11.06.121409"
|
||||
#define Cdrskin_timestamP "2006.11.06.155237"
|
||||
|
@ -1176,6 +1176,16 @@ int burn_disc_pretend_blank(struct burn_drive *d)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ts A61106 API function */
|
||||
int burn_disc_pretend_full(struct burn_drive *d)
|
||||
{
|
||||
if (d->status != BURN_DISC_UNREADY &&
|
||||
d->status != BURN_DISC_UNSUITABLE)
|
||||
return 0;
|
||||
d->status = BURN_DISC_FULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ts A61021: new API function */
|
||||
int burn_disc_read_atip(struct burn_drive *d)
|
||||
{
|
||||
|
@ -658,6 +658,15 @@ enum burn_disc_status burn_disc_get_status(struct burn_drive *drive);
|
||||
int burn_disc_pretend_blank(struct burn_drive *drive);
|
||||
|
||||
|
||||
/* ts A61106 */
|
||||
/** WARNING: This overrides the safety measures against unsuitable media.
|
||||
Sets the drive status to BURN_DISC_FULL if it is BURN_DISC_UNREADY
|
||||
or BURN_DISC_UNSUITABLE. Thus marking media as blankable which actually
|
||||
failed to declare themselves either blank or (partially) filled.
|
||||
*/
|
||||
int burn_disc_pretend_full(struct burn_drive *drive);
|
||||
|
||||
|
||||
/* ts A61021 */
|
||||
/** Reads ATIP information from inserted media. To be obtained via
|
||||
burn_drive_get_write_speed(), burn_drive_get_min_write_speed(),
|
||||
|
@ -312,6 +312,7 @@ void mmc_read_toc(struct burn_drive *d)
|
||||
if (c.error) {
|
||||
|
||||
/* ts A61020 : this snaps on non-blank DVD media */
|
||||
/* ts A61106 : also snaps on CD with unclosed track/session */
|
||||
/* Very unsure wether this old measure is ok.
|
||||
Obviously higher levels do not care about this.
|
||||
DVD+RW burns go on after passing through here.
|
||||
|
@ -692,11 +692,8 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
||||
if (!c->retry) {
|
||||
c->error = 1;
|
||||
|
||||
/* ts A61030 */
|
||||
/* >>> to become d->notify_error() */
|
||||
scsi_notify_error(d, c, s.sbp, s.sb_len_wr, 0);
|
||||
|
||||
return 1;
|
||||
/* A61106: rather than : return 1 */
|
||||
goto ex;
|
||||
}
|
||||
switch (scsi_error(d, s.sbp, s.sb_len_wr)) {
|
||||
case RETRY:
|
||||
@ -711,6 +708,13 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
||||
done = 1;
|
||||
}
|
||||
} while (!done);
|
||||
|
||||
/* ts A61106 */
|
||||
ex:;
|
||||
if (c->error) {
|
||||
/* >>> to become d->notify_error() */
|
||||
scsi_notify_error(d, c, s.sbp, s.sb_len_wr, 0);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -727,12 +731,17 @@ int scsi_notify_error(struct burn_drive *d, struct command *c,
|
||||
if(!(flag & 1))
|
||||
return 1;
|
||||
|
||||
|
||||
sprintf(msg,"SCSI error condition on command %2.2Xh :", c->opcode[0]);
|
||||
if (senselen > 2) {
|
||||
key = sense[2];
|
||||
sprintf(msg+strlen(msg), " key=%xh", key);
|
||||
}
|
||||
if (senselen > 13) {
|
||||
asc = sense[12];
|
||||
ascq = sense[13];
|
||||
|
||||
sprintf(msg,"SCSI error condition on command %2.2Xh : ", c->opcode[0]);
|
||||
sprintf(msg+strlen(msg), "key= %x asc= %x ascq= %x\n", key,asc,ascq);
|
||||
sprintf(msg+strlen(msg), " asc=%xh ascq=%xh", asc, ascq);
|
||||
}
|
||||
ret = libdax_msgs_submit(libdax_messenger, d->global_index, 0x0002010f,
|
||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH, msg,0,0);
|
||||
return ret;
|
||||
|
@ -7,6 +7,13 @@
|
||||
/* #include <a ssert.h> */
|
||||
|
||||
|
||||
/* ts A61106 : Deliberate defect provocation macros
|
||||
DO NOT DEFINE THESE IF YOU WANT SUCCESSFUL TAO !
|
||||
#define Libburn_experimental_no_close_tracK 1
|
||||
#define Libburn_experimental_no_close_sessioN 1
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
@ -132,6 +139,11 @@ int burn_write_close_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
struct burn_track *t;
|
||||
int todo, step, cancelled, seclen;
|
||||
|
||||
/* ts A61106 */
|
||||
#ifdef Libburn_experimental_no_close_tracK
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
d = o->drive;
|
||||
t = s->track[tnum];
|
||||
|
||||
@ -187,6 +199,12 @@ int burn_write_close_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
/* ts A61030 */
|
||||
int burn_write_close_session(struct burn_write_opts *o, struct burn_session *s)
|
||||
{
|
||||
|
||||
/* ts A61106 */
|
||||
#ifdef Libburn_experimental_no_close_sessioN
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
libdax_msgs_submit(libdax_messenger, o->drive->global_index,0x00020119,
|
||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Closing session", 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user