Taken into account wrong nwa from buggy drives.
This commit is contained in:
parent
f74f6abcc4
commit
5598861309
@ -233,12 +233,19 @@ int isoburn_prepare_disc_aux(struct burn_drive *d, struct burn_disc **disc,
|
|||||||
struct burn_track *track;
|
struct burn_track *track;
|
||||||
struct isoburn *o;
|
struct isoburn *o;
|
||||||
struct ecma119_source_opts wopts;
|
struct ecma119_source_opts wopts;
|
||||||
|
enum burn_disc_status state;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret= isoburn_find_emulator(&o, d, 0);
|
ret= isoburn_find_emulator(&o, d, 0);
|
||||||
if(ret<0)
|
if(ret<0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
state = isoburn_disc_get_status(drive);
|
||||||
|
if (state != BURN_DISC_BLANK && state != BURN_DISC_APPENDABLE) {
|
||||||
|
/* unsuitable status */
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
wopts.volnum = 0;
|
wopts.volnum = 0;
|
||||||
wopts.level = opts->level;
|
wopts.level = opts->level;
|
||||||
wopts.flags = opts->flags;
|
wopts.flags = opts->flags;
|
||||||
@ -264,7 +271,12 @@ int isoburn_prepare_disc_aux(struct burn_drive *d, struct burn_disc **disc,
|
|||||||
int lba, nwa;
|
int lba, nwa;
|
||||||
ret = isoburn_disc_track_lba_nwa(d, NULL, 0, &lba, &nwa);
|
ret = isoburn_disc_track_lba_nwa(d, NULL, 0, &lba, &nwa);
|
||||||
if (ret != 1)
|
if (ret != 1)
|
||||||
return -2;
|
return -3;
|
||||||
|
if (nwa == 0 && state == BURN_DISC_APPENDABLE) {
|
||||||
|
/* invalid nwa */
|
||||||
|
return -4;
|
||||||
|
}
|
||||||
|
|
||||||
wopts.ms_block = nwa;
|
wopts.ms_block = nwa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user