Prepared libisoburn for drive role 4

master
Thomas Schmitt 12 years ago
parent c69e553696
commit 6968b72648
  1. 13
      libisoburn/burn_wrap.c
  2. 4
      libisoburn/isofs_wrap.c
  3. 2
      xorriso/xorriso_timestamp.h

@ -240,6 +240,7 @@ LIBJTE_MISCONFIGURATION_ = 0;
sprintf(msg+strlen(msg), "Cannot initialize libburn\n");
return(0);
}
burn_version(&major, &minor, &micro);
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 */

@ -6,7 +6,7 @@
/*
libisofs related functions of libisoburn.
Copyright 2007 - 2010 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Copyright 2007 - 2011 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Thomas Schmitt <scdbackup@gmx.net>
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;

@ -1 +1 @@
#define Xorriso_timestamP "2011.03.13.131305"
#define Xorriso_timestamP "2011.03.13.131557"

Loading…
Cancel
Save