Prevented SIGSEGV after illegal drive operations during sync write
This commit is contained in:
parent
78642d08ae
commit
89c12404d0
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2008.09.28.211741"
|
#define Cdrskin_timestamP "2008.10.04.072657"
|
||||||
|
@ -624,7 +624,7 @@ void burn_disc_format_sync(struct burn_drive *d, off_t size, int flag)
|
|||||||
int ret, buf_secs, err, i, stages = 1, pbase, pfill, pseudo_sector;
|
int ret, buf_secs, err, i, stages = 1, pbase, pfill, pseudo_sector;
|
||||||
off_t num_bufs;
|
off_t num_bufs;
|
||||||
char msg[80];
|
char msg[80];
|
||||||
struct buffer buf;
|
struct buffer buf, *buf_mem = d->buffer;
|
||||||
|
|
||||||
/* reset the progress */
|
/* reset the progress */
|
||||||
d->progress.session = 0;
|
d->progress.session = 0;
|
||||||
@ -706,7 +706,7 @@ void burn_disc_format_sync(struct burn_drive *d, off_t size, int flag)
|
|||||||
ex:;
|
ex:;
|
||||||
d->progress.sector = 0x10000;
|
d->progress.sector = 0x10000;
|
||||||
d->busy = BURN_DRIVE_IDLE;
|
d->busy = BURN_DRIVE_IDLE;
|
||||||
d->buffer = NULL;
|
d->buffer = buf_mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
|
|||||||
int alignment = 2048, start, upto, chunksize = 1, err, cpy_size, i;
|
int alignment = 2048, start, upto, chunksize = 1, err, cpy_size, i;
|
||||||
int sose_mem = 0, fd = -1, ret;
|
int sose_mem = 0, fd = -1, ret;
|
||||||
char msg[81], *wpt;
|
char msg[81], *wpt;
|
||||||
struct buffer buf;
|
struct buffer buf, *buffer_mem = d->buffer;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define Libburn_read_data_adr_logginG 1
|
#define Libburn_read_data_adr_logginG 1
|
||||||
@ -485,7 +485,7 @@ ex:;
|
|||||||
if (fd != -1)
|
if (fd != -1)
|
||||||
close(fd);
|
close(fd);
|
||||||
*/
|
*/
|
||||||
d->buffer = NULL;
|
d->buffer = buffer_mem;
|
||||||
d->busy = BURN_DRIVE_IDLE;
|
d->busy = BURN_DRIVE_IDLE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1996,7 +1996,7 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
|
|||||||
{
|
{
|
||||||
struct cue_sheet *sheet;
|
struct cue_sheet *sheet;
|
||||||
struct burn_drive *d = o->drive;
|
struct burn_drive *d = o->drive;
|
||||||
struct buffer buf;
|
struct buffer buf, *buffer_mem = o->drive->buffer;
|
||||||
struct burn_track *lt, *t;
|
struct burn_track *lt, *t;
|
||||||
int first = 1, i, ret, lba, nwa = 0;
|
int first = 1, i, ret, lba, nwa = 0;
|
||||||
off_t default_size;
|
off_t default_size;
|
||||||
@ -2206,6 +2206,7 @@ fail_wo_sync:;
|
|||||||
d->busy = BURN_DRIVE_IDLE;
|
d->busy = BURN_DRIVE_IDLE;
|
||||||
ex:;
|
ex:;
|
||||||
d->do_stream_recording = 0;
|
d->do_stream_recording = 0;
|
||||||
|
d->buffer = buffer_mem;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2215,7 +2216,7 @@ int burn_random_access_write(struct burn_drive *d, off_t byte_address,
|
|||||||
{
|
{
|
||||||
int alignment = 0, start, upto, chunksize, err, fd = -1, ret;
|
int alignment = 0, start, upto, chunksize, err, fd = -1, ret;
|
||||||
char msg[81], *rpt;
|
char msg[81], *rpt;
|
||||||
struct buffer buf;
|
struct buffer buf, *buffer_mem = d->buffer;
|
||||||
|
|
||||||
if (d->released) {
|
if (d->released) {
|
||||||
libdax_msgs_submit(libdax_messenger,
|
libdax_msgs_submit(libdax_messenger,
|
||||||
@ -2326,7 +2327,7 @@ int burn_random_access_write(struct burn_drive *d, off_t byte_address,
|
|||||||
|
|
||||||
if(fd >= 0)
|
if(fd >= 0)
|
||||||
close(fd);
|
close(fd);
|
||||||
d->buffer = NULL;
|
d->buffer = buffer_mem;
|
||||||
d->busy = BURN_DRIVE_IDLE;
|
d->busy = BURN_DRIVE_IDLE;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user