From 2ed45c9cb1b6905f8d553261eb7a321d46f37249 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 29 Nov 2008 14:09:06 +0000 Subject: [PATCH] Bug fix: -format as_needed did not recognize unformatted BD-RE --- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- libisoburn/trunk/xorriso/xorrisoburn.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 8b302cc4..c553754e 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.11.29.091030" +#define Xorriso_timestamP "2008.11.29.140837" diff --git a/libisoburn/trunk/xorriso/xorrisoburn.c b/libisoburn/trunk/xorriso/xorrisoburn.c index 0ae20e6e..2c593a5a 100644 --- a/libisoburn/trunk/xorriso/xorrisoburn.c +++ b/libisoburn/trunk/xorriso/xorrisoburn.c @@ -4552,8 +4552,12 @@ int Xorriso_blank_as_needed(struct XorrisO *xorriso, int flag) burn_disc_get_profile(drive, ¤t_profile, current_profile_name); ret= burn_disc_get_formats(drive, &status, &size, &dummy, &num_formats); - if(ret>0 && status==BURN_FORMAT_IS_FORMATTED) - is_formatted= 1; + if(ret>0) { + if(status==BURN_FORMAT_IS_FORMATTED) + is_formatted= 1; + else if(status == BURN_FORMAT_IS_UNFORMATTED) + is_formatted= 0; + } if(current_profile == 0x12 || current_profile == 0x43) { /* DVD+RAM , BD-RE */ if(is_formatted<0) { sprintf(xorriso->info_text, @@ -4563,7 +4567,7 @@ int Xorriso_blank_as_needed(struct XorrisO *xorriso, int flag) return(0); } if(!is_formatted) { - ret= Xorriso_format_media(xorriso, 0); + ret= Xorriso_format_media(xorriso, (current_profile == 0x43)); return(ret); } } else if(current_profile == 0x14 && (flag&4)) { /* DVD-RW sequential */