From 6968b72648184296410eedccced709e4ed5d32e1 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 13 Mar 2011 13:15:41 +0000 Subject: [PATCH] Prepared libisoburn for drive role 4 --- libisoburn/burn_wrap.c | 13 ++++++++----- libisoburn/isofs_wrap.c | 4 ++-- xorriso/xorriso_timestamp.h | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/libisoburn/burn_wrap.c b/libisoburn/burn_wrap.c index 7724bf09..f9c6ab17 100644 --- a/libisoburn/burn_wrap.c +++ b/libisoburn/burn_wrap.c @@ -240,6 +240,7 @@ LIBJTE_MISCONFIGURATION_ = 0; sprintf(msg+strlen(msg), "Cannot initialize libburn\n"); return(0); } + burn_version(&major, &minor, µ); sprintf(msg+strlen(msg), "libburn-%d.%d.%d ", major, minor, micro); if(major > burn_header_version_major @@ -343,7 +344,7 @@ int isoburn_is_intermediate_dvd_rw(struct burn_drive *d, int flag) static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d, int flag) { - int ret, lba, nwa, profile, readonly= 0; + int ret, lba, nwa, profile, readonly= 0, role, random_access; struct burn_multi_caps *caps= NULL; struct isoburn_toc_entry *t; char profile_name[80]; @@ -382,9 +383,11 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d, (*o)->fabricated_disc_status= BURN_DISC_APPENDABLE; #endif - if(caps->start_adr) + role= burn_drive_get_drive_role(d); + random_access= caps->start_adr || role == 4; + if(random_access) (*o)->emulation_mode= 1; - if(caps->start_adr && !readonly) { /* set emulation to overwriteable */ + if(random_access && !readonly) { /* set emulation to overwriteable */ ret= isoburn_is_intermediate_dvd_rw(d, 0); if(ret>0) { (*o)->min_start_byte= 0; @@ -1150,7 +1153,7 @@ int isoburn_read_iso_head(struct burn_drive *d, int lba, } else { role = burn_drive_get_drive_role(d); ret = burn_get_read_capacity(d, &capacity, 0); - if (ret <= 0 && role == 2) { + if (ret <= 0 && (role == 2 || role == 4)) { /* Might be a block device on a system where libburn cannot determine its size. Try to read anyway. */ capacity = 0x7ffffff0; @@ -1244,7 +1247,7 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag) if(ret <= 0) { role = burn_drive_get_drive_role(d); - if (role == 2) + if (role == 2 || role == 4) /* Might be a block device on a system where libburn cannot determine its size. Try to read anyway. */ readable_blocks= 0x7ffffff0; /* try to read anyway */ diff --git a/libisoburn/isofs_wrap.c b/libisoburn/isofs_wrap.c index 3e51c6be..239037b0 100644 --- a/libisoburn/isofs_wrap.c +++ b/libisoburn/isofs_wrap.c @@ -6,7 +6,7 @@ /* libisofs related functions of libisoburn. - Copyright 2007 - 2010 Vreixo Formoso Lopes + Copyright 2007 - 2011 Vreixo Formoso Lopes Thomas Schmitt Provided under GPL version 2 or later. */ @@ -464,7 +464,7 @@ int isoburn_start_emulation(struct isoburn *o, int flag) ret = burn_get_read_capacity(drive, &capacity, 0); if (ret <= 0) capacity = -1; - if (capacity > 0 || role == 2) { + if (capacity > 0 || role == 2 || role == 4) { /* Might be a block device on a system where libburn cannot determine its size. Try to read anyway. */ to_read = o->target_iso_head_size; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 9516046e..9836ed16 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2011.03.13.131305" +#define Xorriso_timestamP "2011.03.13.131557"