Prepared libisoburn for drive role 4
This commit is contained in:
parent
c69e553696
commit
6968b72648
@ -240,6 +240,7 @@ LIBJTE_MISCONFIGURATION_ = 0;
|
|||||||
sprintf(msg+strlen(msg), "Cannot initialize libburn\n");
|
sprintf(msg+strlen(msg), "Cannot initialize libburn\n");
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
burn_version(&major, &minor, µ);
|
burn_version(&major, &minor, µ);
|
||||||
sprintf(msg+strlen(msg), "libburn-%d.%d.%d ", major, minor, micro);
|
sprintf(msg+strlen(msg), "libburn-%d.%d.%d ", major, minor, micro);
|
||||||
if(major > burn_header_version_major
|
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,
|
static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
|
||||||
int flag)
|
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 burn_multi_caps *caps= NULL;
|
||||||
struct isoburn_toc_entry *t;
|
struct isoburn_toc_entry *t;
|
||||||
char profile_name[80];
|
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;
|
(*o)->fabricated_disc_status= BURN_DISC_APPENDABLE;
|
||||||
#endif
|
#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;
|
(*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);
|
ret= isoburn_is_intermediate_dvd_rw(d, 0);
|
||||||
if(ret>0) {
|
if(ret>0) {
|
||||||
(*o)->min_start_byte= 0;
|
(*o)->min_start_byte= 0;
|
||||||
@ -1150,7 +1153,7 @@ int isoburn_read_iso_head(struct burn_drive *d, int lba,
|
|||||||
} else {
|
} else {
|
||||||
role = burn_drive_get_drive_role(d);
|
role = burn_drive_get_drive_role(d);
|
||||||
ret = burn_get_read_capacity(d, &capacity, 0);
|
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
|
/* Might be a block device on a system where libburn cannot determine its
|
||||||
size. Try to read anyway. */
|
size. Try to read anyway. */
|
||||||
capacity = 0x7ffffff0;
|
capacity = 0x7ffffff0;
|
||||||
@ -1244,7 +1247,7 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
|
|||||||
if(ret <= 0) {
|
if(ret <= 0) {
|
||||||
|
|
||||||
role = burn_drive_get_drive_role(d);
|
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
|
/* Might be a block device on a system where libburn cannot determine its
|
||||||
size. Try to read anyway. */
|
size. Try to read anyway. */
|
||||||
readable_blocks= 0x7ffffff0; /* try to read anyway */
|
readable_blocks= 0x7ffffff0; /* try to read anyway */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/*
|
/*
|
||||||
libisofs related functions of libisoburn.
|
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>
|
Thomas Schmitt <scdbackup@gmx.net>
|
||||||
Provided under GPL version 2 or later.
|
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);
|
ret = burn_get_read_capacity(drive, &capacity, 0);
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
capacity = -1;
|
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
|
/* Might be a block device on a system where libburn cannot determine its
|
||||||
size. Try to read anyway. */
|
size. Try to read anyway. */
|
||||||
to_read = o->target_iso_head_size;
|
to_read = o->target_iso_head_size;
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2011.03.13.131305"
|
#define Xorriso_timestamP "2011.03.13.131557"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user