"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libburn/spc.c" between
xorriso-1.5.2.tar.gz and xorriso-1.5.4.tar.gz

About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.

spc.c  (xorriso-1.5.2):spc.c  (xorriso-1.5.4)
skipping to change at line 193 skipping to change at line 193
My LG GSA-4082B on asynchronous load: My LG GSA-4082B on asynchronous load:
first it reports no media 2,3A,00, first it reports no media 2,3A,00,
then it reports not ready 2,04,00, then it reports not ready 2,04,00,
further media inquiry retrieves wrong data further media inquiry retrieves wrong data
if(i<=100) if(i<=100)
goto slumber; goto slumber;
*/ */
break; break;
} }
if (key == 0x6 && asc == 0x28 && ascq == 0x00) if (key == 0x6 && asc == 0x28)
/* media change notice = try again */ /* medium change notice or alike = try again */
goto slumber; goto slumber;
handle_error:; handle_error:;
/* ts A90213 */ /* ts A90213 */
sprintf(msg, sprintf(msg,
"Asynchronous SCSI error on %s: ", cmd_name); "Asynchronous SCSI error on %s: ", cmd_name);
sense[0] = 0x70; /* Fixed format sense data */ sense[0] = 0x70; /* Fixed format sense data */
sense[2] = key; sense[2] = key;
sense[12] = asc; sense[12] = asc;
sense[13] = ascq; sense[13] = ascq;
skipping to change at line 1045 skipping to change at line 1045
/* /*
don't check totally stupid modes (raw/raw0) don't check totally stupid modes (raw/raw0)
some drives say they're ok, and they're not. some drives say they're ok, and they're not.
*/ */
void spc_probe_write_modes(struct burn_drive *d) void spc_probe_write_modes(struct burn_drive *d)
{ {
struct buffer *buf = NULL; struct buffer *buf = NULL;
int try_write_type = 1; int try_write_type = 1;
int try_block_type = 0; int try_block_type = 0;
int key, asc, ascq, useable_write_type = -1, useable_block_type = -1; int key, asc, ascq, usable_write_type = -1, usable_block_type = -1;
int last_try = 0; int last_try = 0;
struct command *c = NULL; struct command *c = NULL;
mmc_start_if_needed(d, 1); mmc_start_if_needed(d, 1);
if (mmc_function_spy(d, "spc_probe_write_modes") <= 0) if (mmc_function_spy(d, "spc_probe_write_modes") <= 0)
goto ex; goto ex;
BURN_ALLOC_MEM_VOID(buf, struct buffer, 1); BURN_ALLOC_MEM_VOID(buf, struct buffer, 1);
BURN_ALLOC_MEM_VOID(c, struct command, 1); BURN_ALLOC_MEM_VOID(c, struct command, 1);
/* ts A70213 : added pseudo try_write_type 4 to set a suitable mode */ /* ts A70213 : added pseudo try_write_type 4 to set a suitable mode */
while (try_write_type != 5) { while (try_write_type != 5) {
/* ts A70213 */ /* ts A70213 */
if (try_write_type == 4) { if (try_write_type == 4) {
/* Pseudo write type NONE . Set a useable write mode */ /* Pseudo write type NONE . Set a usable write mode */
if (useable_write_type == -1) if (usable_write_type == -1)
break; break;
try_write_type = useable_write_type; try_write_type = usable_write_type;
try_block_type = useable_block_type; try_block_type = usable_block_type;
last_try= 1; last_try= 1;
} }
scsi_init_command(c, SPC_MODE_SELECT,sizeof(SPC_MODE_SELECT)); scsi_init_command(c, SPC_MODE_SELECT,sizeof(SPC_MODE_SELECT));
c->retry = 1; c->retry = 1;
c->opcode[8] = 8 + 2 + 0x32; c->opcode[8] = 8 + 2 + 0x32;
c->page = buf; c->page = buf;
memset(c->page->data, 0, 8 + 2 + 0x32); memset(c->page->data, 0, 8 + 2 + 0x32);
c->page->bytes = 8 + 2 + 0x32; c->page->bytes = 8 + 2 + 0x32;
skipping to change at line 1107 skipping to change at line 1107
else { else {
/* try_write_type, try_block_type is supported mode */ /* try_write_type, try_block_type is supported mode */
if (try_write_type == 2) /* sao */ if (try_write_type == 2) /* sao */
d->block_types[try_write_type] = d->block_types[try_write_type] =
BURN_BLOCK_SAO; BURN_BLOCK_SAO;
else else
d->block_types[try_write_type] |= d->block_types[try_write_type] |=
1 << try_block_type; 1 << try_block_type;
/* ts A70213 */ /* ts A70213 */
if ((useable_write_type < 0 && try_write_type > 0) || if ((usable_write_type < 0 && try_write_type > 0) ||
(try_write_type == 1 && try_block_type == 8)) { (try_write_type == 1 && try_block_type == 8)) {
/* Packet is not supported yet. /* Packet is not supported yet.
Prefer TAO MODE_1. */ Prefer TAO MODE_1. */
useable_write_type = try_write_type; usable_write_type = try_write_type;
useable_block_type = try_block_type; usable_block_type = try_block_type;
} }
} }
switch (try_block_type) { switch (try_block_type) {
case 0: case 0:
case 1: case 1:
case 2: case 2:
try_block_type++; try_block_type++;
break; break;
case 3: case 3:
try_block_type = 8; try_block_type = 8;
skipping to change at line 1433 skipping to change at line 1433
sprintf(msg, "Parameter value invalid"); sprintf(msg, "Parameter value invalid");
else else
break; break;
goto return_fail; goto return_fail;
case 0x27: case 0x27:
sprintf(msg, "Write protected"); sprintf(msg, "Write protected");
goto return_fail; goto return_fail;
case 0x28: case 0x28:
if (*ascq == 0) if (*ascq == 0)
sprintf(msg, "Medium may have changed"); sprintf(msg, "Medium may have changed");
else if (*ascq == 1)
sprintf(msg, "Import or export element accessed");
else if (*ascq == 2) else if (*ascq == 2)
sprintf(msg, "Format layer may have changed"); sprintf(msg, "Format layer may have changed");
else if (*ascq == 3)
sprintf(msg,
"Import/export element accessed, medium changed");
else if (*key == 6)
sprintf(msg, "Unknown ASCQ with drive event ASC 28");
else else
break; break;
goto return_retry; goto return_retry;
case 0x29: case 0x29:
if (*ascq == 0) if (*ascq == 0)
sprintf(msg, sprintf(msg,
"Power on, reset, or bus device reset occurred"); "Power on, reset, or bus device reset occurred");
else if (*ascq == 1) else if (*ascq == 1)
sprintf(msg, "Power on occurred"); sprintf(msg, "Power on occurred");
else if (*ascq == 2) else if (*ascq == 2)
 End of changes. 8 change blocks. 
10 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)