From 5a9c2e0380f95cde12e8e3ead7b089d838a40d37 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 8 Jul 2012 13:42:01 +0000 Subject: [PATCH] Delegated write_type selection to caller of libisoburn --- libisoburn/burn_wrap.c | 23 ++++++++++++++++++++++- xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/libisoburn/burn_wrap.c b/libisoburn/burn_wrap.c index d0f8c230..1cc17910 100644 --- a/libisoburn/burn_wrap.c +++ b/libisoburn/burn_wrap.c @@ -157,7 +157,7 @@ LIBBURN_MISCONFIGURATION_ = 0; #ifdef Xorriso_with_libjtE /* The minimum requirement of libisoburn towards the libjte header - at compile time is the same as the one of a usable libisfs itowards libjte. + at compile time is the same as the one of a usable libisofs towards libjte. So the requirement is defined in libisofs/libisofs.h : iso_libjte_req_major , iso_libjte_req_minor , iso_libjte_req_micro */ @@ -917,6 +917,10 @@ void isoburn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc) } } +#ifdef Libisoburn_write_type_autO + + /* <<< on its way out */ + write_type= burn_write_opts_auto_write_type(opts, disc, reasons, 0); if (write_type == BURN_WRITE_NONE) { sprintf(msg, "Failed to find a suitable write mode:\n%s", reasons); @@ -928,6 +932,23 @@ void isoburn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc) goto ex; } +#else /* Libisoburn_write_type_autO */ + + /* The caller is in charge to select the write type */ + ret = burn_precheck_write(opts, disc, reasons, 0); + if(ret <= 0) { + sprintf(msg, "Write parameters not properly set for this medium:\n %s", + reasons); + isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0); + if(o!=NULL) + o->wrote_well= 0; + /* To cause a negative reply with burn_drive_wrote_well() */ + burn_drive_cancel(drive); + goto ex; + } + +#endif /* ! Libisoburn_write_type_autO */ + sprintf(reasons, "%d", (int) write_type); sprintf(msg, "Write_type = %s\n", (write_type == BURN_WRITE_SAO ? "SAO" : diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index a43bf29a..a40db254 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2012.06.27.192151" +#define Xorriso_timestamP "2012.07.08.134305"