Got rid of assert() in spc.c by soft means

trunk@386
Thomas Schmitt 16 years ago
parent c6bd87af59
commit 988622c3b6
  1. 2
      cdrskin/cdrskin_timestamp.h
  2. 9
      libburn/async.c
  3. 2
      libburn/libdax_msgs.h
  4. 19
      libburn/spc.c

@ -1 +1 @@
#define Cdrskin_timestamP "2006.10.07.170913"
#define Cdrskin_timestamP "2006.10.07.175427"

@ -250,6 +250,15 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
0, 0);
return;
}
/* ts A61007 : obsolete Assert in spc_select_write_params() */
if (!opts->drive->mdata->valid) {
libdax_msgs_submit(libdax_messenger,
opts->drive->global_index, 0x00020113,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
"Drive capabilities not inquired yet", 0, 0);
return;
}
o.drive = opts->drive;
o.opts = opts;
o.disc = disc;

@ -318,6 +318,8 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
0x00020110 (FATAL,HIGH) = Persistent drive address too long
0x00020111 (FATAL,HIGH) = Could not allocate new auxiliary object
0x00020112 (SORRY,HIGH) = Bad combination of write_type and block_type
0x00020113 (FATAL,HIGH) = Drive capabilities not inquired yet
------------------------------------------------------------------------------

@ -202,7 +202,10 @@ void spc_select_error_params(struct burn_drive *d,
c.page = &buf;
c.page->bytes = 0;
c.page->sectors = 0;
assert(d->mdata->valid);
/* ts A61007 : moved up to only caller burn_disc_read() */
/* a ssert(d->mdata->valid); */
memset(c.page->data, 0, 8 + 2 + d->mdata->retry_page_length);
c.page->bytes = 8 + 2 + d->mdata->retry_page_length;
c.page->data[8] = 1;
@ -227,8 +230,9 @@ void spc_sense_write_params(struct burn_drive *d)
unsigned char *page;
struct command c;
assert(d->mdata->cdr_write || d->mdata->cdrw_write ||
d->mdata->dvdr_write || d->mdata->dvdram_write);
/* ts A61007 : Done in soft at only caller burn_drive_grab() */
/* a ssert(d->mdata->cdr_write || d->mdata->cdrw_write ||
d->mdata->dvdr_write || d->mdata->dvdram_write); */
memcpy(c.opcode, SPC_MODE_SENSE, sizeof(SPC_MODE_SENSE));
c.retry = 1;
@ -256,7 +260,9 @@ void spc_select_write_params(struct burn_drive *d,
struct command c;
int bufe, sim;
assert(o->drive == d);
/* ts A61007 : All current callers are safe. */
/* a ssert(o->drive == d); */
memcpy(c.opcode, SPC_MODE_SELECT, sizeof(SPC_MODE_SELECT));
c.retry = 1;
c.oplen = sizeof(SPC_MODE_SELECT);
@ -264,7 +270,10 @@ void spc_select_write_params(struct burn_drive *d,
c.page = &buf;
c.page->bytes = 0;
c.page->sectors = 0;
assert(d->mdata->valid);
/* ts A61007 : moved up to burn_disc_write() */
/* a ssert(d->mdata->valid); */
memset(c.page->data, 0, 8 + 2 + d->mdata->write_page_length);
c.page->bytes = 8 + 2 + d->mdata->write_page_length;
c.page->data[8] = 5;

Loading…
Cancel
Save