diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 706989e..7fc2521 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2007.08.22.134731" +#define Cdrskin_timestamP "2007.08.22.173459" diff --git a/libburn/drive.c b/libburn/drive.c index d415f0a..56f078c 100644 --- a/libburn/drive.c +++ b/libburn/drive.c @@ -110,6 +110,7 @@ int burn_drive_is_released(struct burn_drive *d) -1 = drive is closed (i.e. released explicitely) 0 = drive is open, not grabbed (after scan, before 1st grab) 1 = drive is grabbed but BURN_DRIVE_IDLE + 2 = drive is grabbed, synchronous read/write interrupted 10 = drive is grabbing (BURN_DRIVE_GRABBING) 100 = drive is busy in cancelable state 1000 = drive is in non-cancelable state @@ -127,6 +128,9 @@ int burn_drive_is_occupied(struct burn_drive *d) return 0; if(d->busy == BURN_DRIVE_IDLE) return 1; + if(d->busy == BURN_DRIVE_READING_SYNC || + d->busy == BURN_DRIVE_WRITING_SYNC) + return 2; if(d->busy == BURN_DRIVE_READING || d->busy == BURN_DRIVE_WRITING) return 50; return 1000; diff --git a/libburn/libburn.h b/libburn/libburn.h index b2e8037..a67db16 100644 --- a/libburn/libburn.h +++ b/libburn/libburn.h @@ -251,8 +251,16 @@ enum burn_drive_status /* ts A61223 */ /** The drive is formatting media */ - BURN_DRIVE_FORMATTING + BURN_DRIVE_FORMATTING, + /* ts A70822 */ + /** The drive is busy in synchronous read (if you see this then it + has been interrupted) */ + BURN_DRIVE_READING_SYNC, + /** The drive is busy in synchronous write (if you see this then it + has been interrupted) */ + BURN_DRIVE_WRITING_SYNC + }; diff --git a/libburn/read.c b/libburn/read.c index 726d7bb..c6e1285 100644 --- a/libburn/read.c +++ b/libburn/read.c @@ -322,7 +322,7 @@ int burn_read_data(struct burn_drive *d, off_t byte_address, "Drive is busy on attempt to read data", 0, 0); return 0; } - d->busy = BURN_DRIVE_READING; + d->busy = BURN_DRIVE_READING_SYNC; d->buffer = &buf; start = byte_address / 2048; @@ -348,6 +348,7 @@ int burn_read_data(struct burn_drive *d, off_t byte_address, wpt += 2048; *data_count += 2048; } + d->buffer = NULL; d->busy = BURN_DRIVE_IDLE; return 0; } diff --git a/libburn/write.c b/libburn/write.c index 462fda2..175ac1f 100644 --- a/libburn/write.c +++ b/libburn/write.c @@ -2027,7 +2027,7 @@ int burn_random_access_write(struct burn_drive *d, off_t byte_address, "Drive is busy on attempt to write random access",0,0); return 0; } - d->busy = BURN_DRIVE_WRITING; + d->busy = BURN_DRIVE_WRITING_SYNC; d->buffer = &buf; start = byte_address / 2048; @@ -2053,6 +2053,6 @@ int burn_random_access_write(struct burn_drive *d, off_t byte_address, d->sync_cache(d); d->buffer = NULL; d->busy = BURN_DRIVE_IDLE; - return(1); + return 1; }