From 5676a1953db3596bd50630a9e3d790951ebe9edb Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 15 Jan 2014 17:50:33 +0000 Subject: [PATCH] Improved handling of stdio pseudo-drives after aborted burn runs --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/drive.c | 2 ++ libburn/drive.h | 2 ++ libburn/write.c | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index db7bba9..0754d22 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2014.01.15.174741" +#define Cdrskin_timestamP "2014.01.15.174907" diff --git a/libburn/drive.c b/libburn/drive.c index c7218b8..7677dbd 100644 --- a/libburn/drive.c +++ b/libburn/drive.c @@ -426,6 +426,8 @@ fprintf(stderr, "LIBBURN_DEBUG: burn_drive__is_rdwr: getfl_ret = %lX , O_RDWR = } +/* flag bit0= ( not needed yet: grab even if it is already grabbed ) +*/ int burn_drive_grab_stdio(struct burn_drive *d, int flag) { int stat_ret = -1, is_rdwr, ret; diff --git a/libburn/drive.h b/libburn/drive.h index 3f975a0..752a847 100644 --- a/libburn/drive.h +++ b/libburn/drive.h @@ -168,4 +168,6 @@ int burn_feature_descr_free(struct burn_feature_descr **new, int flag); int burn_drive_has_feature(struct burn_drive *d, int feature_code, struct burn_feature_descr **descr, int flag); +int burn_drive_grab_stdio(struct burn_drive *d, int flag); + #endif /* __DRIVE */ diff --git a/libburn/write.c b/libburn/write.c index 23c8f1d..5ccf9cd 100644 --- a/libburn/write.c +++ b/libburn/write.c @@ -2860,10 +2860,10 @@ ex:; close(d->stdio_fd); d->stdio_fd = -1; - /* update media state records */ + /* update pseudo-media state records by re-grabbing */ burn_drive_mark_unready(d, 8); + burn_drive_grab_stdio(d, 1); - /* <<< d->busy = BURN_DRIVE_IDLE; */ return ret; }