"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libisoburn/burn_wrap.c" between
xorriso-1.5.2.tar.gz and xorriso-1.5.4.tar.gz

About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.

burn_wrap.c  (xorriso-1.5.2):burn_wrap.c  (xorriso-1.5.4)
skipping to change at line 97 skipping to change at line 97
iso_lib_header_version_minor iso_lib_header_version_minor
iso_lib_header_version_micro iso_lib_header_version_micro
If the header is too old then the following code shall cause failure of If the header is too old then the following code shall cause failure of
libisoburn compilation rather than to allow production of a program with libisoburn compilation rather than to allow production of a program with
unpredictable bugs or memory corruption. unpredictable bugs or memory corruption.
The compiler messages supposed to appear in this case are: The compiler messages supposed to appear in this case are:
error: 'LIBISOFS_MISCONFIGURATION' undeclared (first use in this function) error: 'LIBISOFS_MISCONFIGURATION' undeclared (first use in this function)
error: 'INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libisofs_dot_h_TOO_OL D__SEE_libisoburn_dot_h_AND_burn_wrap_dot_h' undeclared (first use in this funct ion) error: 'INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libisofs_dot_h_TOO_OL D__SEE_libisoburn_dot_h_AND_burn_wrap_dot_h' undeclared (first use in this funct ion)
error: 'LIBISOFS_MISCONFIGURATION_' undeclared (first use in this function ) error: 'LIBISOFS_MISCONFIGURATION_' undeclared (first use in this function )
*/ */
/* The indendation is an advise of man gcc to help old compilers ignoring */ /* The indentation is an advise of man gcc to help old compilers ignoring */
#if isoburn_libisofs_req_major > iso_lib_header_version_major #if isoburn_libisofs_req_major > iso_lib_header_version_major
#define Isoburn_libisofs_dot_h_too_olD 1 #define Isoburn_libisofs_dot_h_too_olD 1
#endif #endif
#if isoburn_libisofs_req_major == iso_lib_header_version_major && isoburn_libis ofs_req_minor > iso_lib_header_version_minor #if isoburn_libisofs_req_major == iso_lib_header_version_major && isoburn_libis ofs_req_minor > iso_lib_header_version_minor
#define Isoburn_libisofs_dot_h_too_olD 1 #define Isoburn_libisofs_dot_h_too_olD 1
#endif #endif
#if isoburn_libisofs_req_minor == iso_lib_header_version_minor && isoburn_libis ofs_req_micro > iso_lib_header_version_micro #if isoburn_libisofs_req_minor == iso_lib_header_version_minor && isoburn_libis ofs_req_micro > iso_lib_header_version_micro
#define Isoburn_libisofs_dot_h_too_olD 1 #define Isoburn_libisofs_dot_h_too_olD 1
#endif #endif
skipping to change at line 134 skipping to change at line 134
burn_header_version_micro burn_header_version_micro
If the header is too old then the following code shall cause failure of If the header is too old then the following code shall cause failure of
cdrskin compilation rather than to allow production of a program with cdrskin compilation rather than to allow production of a program with
unpredictable bugs or memory corruption. unpredictable bugs or memory corruption.
The compiler messages supposed to appear in this case are: The compiler messages supposed to appear in this case are:
error: 'LIBBURN_MISCONFIGURATION' undeclared (first use in this function) error: 'LIBBURN_MISCONFIGURATION' undeclared (first use in this function)
error: 'INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libburn_dot_h_TOO_OLD __SEE_libisoburn_dot_h_and_burn_wrap_dot_h' undeclared (first use in this functi on) error: 'INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libburn_dot_h_TOO_OLD __SEE_libisoburn_dot_h_and_burn_wrap_dot_h' undeclared (first use in this functi on)
error: 'LIBBURN_MISCONFIGURATION_' undeclared (first use in this function) error: 'LIBBURN_MISCONFIGURATION_' undeclared (first use in this function)
*/ */
/* The indendation is an advise of man gcc to help old compilers ignoring */ /* The indentation is an advise of man gcc to help old compilers ignoring */
#if isoburn_libburn_req_major > burn_header_version_major #if isoburn_libburn_req_major > burn_header_version_major
#define Isoburn_libburn_dot_h_too_olD 1 #define Isoburn_libburn_dot_h_too_olD 1
#endif #endif
#if isoburn_libburn_req_major == burn_header_version_major && isoburn_libburn_r eq_minor > burn_header_version_minor #if isoburn_libburn_req_major == burn_header_version_major && isoburn_libburn_r eq_minor > burn_header_version_minor
#define Isoburn_libburn_dot_h_too_olD 1 #define Isoburn_libburn_dot_h_too_olD 1
#endif #endif
#if isoburn_libburn_req_minor == burn_header_version_minor && isoburn_libburn_r eq_micro > burn_header_version_micro #if isoburn_libburn_req_minor == burn_header_version_minor && isoburn_libburn_r eq_micro > burn_header_version_micro
#define Isoburn_libburn_dot_h_too_olD 1 #define Isoburn_libburn_dot_h_too_olD 1
#endif #endif
skipping to change at line 158 skipping to change at line 158
LIBBURN_MISCONFIGURATION_ = 0; LIBBURN_MISCONFIGURATION_ = 0;
#endif #endif
#ifdef Xorriso_with_libjtE #ifdef Xorriso_with_libjtE
/* The minimum requirement of libisoburn towards the libjte header /* The minimum requirement of libisoburn towards the libjte header
at compile time is the same as the one of a usable libisofs towards 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 : So the requirement is defined in libisofs/libisofs.h :
iso_libjte_req_major , iso_libjte_req_minor , iso_libjte_req_micro iso_libjte_req_major , iso_libjte_req_minor , iso_libjte_req_micro
*/ */
/* The indendation is an advise of man gcc to help old compilers ignoring */ /* The indentation is an advise of man gcc to help old compilers ignoring */
#if iso_libjte_req_major > LIBJTE_VERSION_MAJOR #if iso_libjte_req_major > LIBJTE_VERSION_MAJOR
#define Libisofs_libjte_dot_h_too_olD 1 #define Libisofs_libjte_dot_h_too_olD 1
#endif #endif
#if iso_libjte_req_major == LIBJTE_VERSION_MAJOR && iso_libjte_req_minor > LIBJ TE_VERSION_MINOR #if iso_libjte_req_major == LIBJTE_VERSION_MAJOR && iso_libjte_req_minor > LIBJ TE_VERSION_MINOR
#define Libisofs_libjte_dot_h_too_olD 1 #define Libisofs_libjte_dot_h_too_olD 1
#endif #endif
#if iso_libjte_req_minor == LIBJTE_VERSION_MINOR && iso_libjte_req_micro > LIBJ TE_VERSION_MICRO #if iso_libjte_req_minor == LIBJTE_VERSION_MINOR && iso_libjte_req_micro > LIBJ TE_VERSION_MICRO
#define Libisofs_libjte_dot_h_too_olD 1 #define Libisofs_libjte_dot_h_too_olD 1
#endif #endif
skipping to change at line 322 skipping to change at line 322
if(ret>0 && profile==0x13) if(ret>0 && profile==0x13)
ret= burn_disc_get_formats(d, &format_status, &format_size, ret= burn_disc_get_formats(d, &format_status, &format_size,
&bl_sas, &num_formats); &bl_sas, &num_formats);
if(ret>0 && profile==0x13 && s==BURN_DISC_BLANK && if(ret>0 && profile==0x13 && s==BURN_DISC_BLANK &&
format_status==BURN_FORMAT_IS_UNKNOWN) format_status==BURN_FORMAT_IS_UNKNOWN)
return(1); return(1);
return(0); return(0);
} }
/** Examines the medium and sets appropriate emulation if needed. /** Examines the medium and sets appropriate emulation if needed.
@param flag bit0= pretent blank on overwriteable media @param flag bit0= pretent blank on overwritable media
bit3= if the drive reports a -ROM profile then try to read bit3= if the drive reports a -ROM profile then try to read
table of content by scanning for ISO image headers. table of content by scanning for ISO image headers.
bit4= do not emulate TOC on overwriteable media bit4= do not emulate TOC on overwritable media
bit5= ignore ACL from external filesystems bit5= ignore ACL from external filesystems
bit6= ignore POSIX Extended Attributes from external filesystems bit6= ignore POSIX Extended Attributes from external filesystems
bit7= pretend -ROM and scan for table of content bit7= pretend -ROM and scan for table of content
bit9= when scanning for ISO 9660 sessions on overwritable bit9= when scanning for ISO 9660 sessions on overwritable
media: Do not demand a valid superblock at LBA 0 media: Do not demand a valid superblock at LBA 0
and scan until end of medium. and scan until end of medium.
bit10= if not bit6: accept all xattr namespaces from external bit10= if not bit6: accept all xattr namespaces from external
filesystems, not only "user.". filesystems, not only "user.".
*/ */
static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d, static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
skipping to change at line 390 skipping to change at line 390
#ifdef Hardcoded_cd_rW #ifdef Hardcoded_cd_rW
/* <<< A70929 : hardcoded CD-RW with fabricated -msinfo */ /* <<< A70929 : hardcoded CD-RW with fabricated -msinfo */
caps->start_adr= 0; caps->start_adr= 0;
(*o)->fabricated_disc_status= BURN_DISC_APPENDABLE; (*o)->fabricated_disc_status= BURN_DISC_APPENDABLE;
#endif #endif
role= burn_drive_get_drive_role(d); role= burn_drive_get_drive_role(d);
random_access= caps->start_adr || role == 4; random_access= caps->start_adr || role == 4;
if(random_access) if(random_access)
(*o)->emulation_mode= 1; (*o)->emulation_mode= 1;
if(random_access && !readonly) { /* set emulation to overwriteable */ if(random_access && !readonly) { /* set emulation to overwritable */
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;
(*o)->nwa= 0; (*o)->nwa= 0;
(*o)->zero_nwa= 0; (*o)->zero_nwa= 0;
} }
if((flag & 1) && role != 4 && role != 5) { if((flag & 1) && role != 4 && role != 5) {
(*o)->nwa= (*o)->zero_nwa; (*o)->nwa= (*o)->zero_nwa;
(*o)->fabricated_disc_status= BURN_DISC_BLANK; (*o)->fabricated_disc_status= BURN_DISC_BLANK;
} else { } else {
skipping to change at line 426 skipping to change at line 426
/* >>> recognize unsuitable media (but allow read-only media) */; /* >>> recognize unsuitable media (but allow read-only media) */;
if(readonly && s != BURN_DISC_EMPTY) { if(readonly && s != BURN_DISC_EMPTY) {
/* >>> ts B10712: This maps BURN_DISC_UNSUITABLE to BURN_DISC_FULL /* >>> ts B10712: This maps BURN_DISC_UNSUITABLE to BURN_DISC_FULL
which can hardly be correct in general. which can hardly be correct in general.
??? What reason does this have ? ??? What reason does this have ?
*/ */
(*o)->fabricated_disc_status= BURN_DISC_FULL; (*o)->fabricated_disc_status= BURN_DISC_FULL;
/* This might be an overwriteable medium in a -ROM drive. /* This might be an overwritable medium in a -ROM drive.
Pitfall: Pitfall:
Multi-session media which bear a xorriso image for overwriteables Multi-session media which bear a xorriso image for overwritables
in their first session would get a TOC of that first image rather in their first session would get a TOC of that first image rather
than of the medium. than of the medium.
It is not possible to distinguish a BD-RE from a single session It is not possible to distinguish a BD-RE from a single session
BD-R with an image for overwriteables. But as soon as the medium BD-R with an image for overwritables. But as soon as the medium
bears 2 logical tracks it cannot be overwriteable. bears 2 logical tracks it cannot be overwritable.
So count the number of tracks first. So count the number of tracks first.
*/ */
disc= isoburn_toc_drive_get_disc(d); disc= isoburn_toc_drive_get_disc(d);
if(disc != NULL) { if(disc != NULL) {
sessions= isoburn_toc_disc_get_sessions(disc, &num_sessions); sessions= isoburn_toc_disc_get_sessions(disc, &num_sessions);
for(session_no= 0; session_no < num_sessions; session_no++) { for(session_no= 0; session_no < num_sessions; session_no++) {
tracks= isoburn_toc_session_get_tracks(sessions[session_no], tracks= isoburn_toc_session_get_tracks(sessions[session_no],
&num_tracks); &num_tracks);
if(tracks != NULL) if(tracks != NULL)
track_count+= num_tracks; track_count+= num_tracks;
} }
isoburn_toc_disc_free(disc); isoburn_toc_disc_free(disc);
} }
sprintf(msg, "ROM medium has libburn track count = %d", track_count); sprintf(msg, "ROM medium has libburn track count = %d", track_count);
isoburn_msgs_submit(*o, 0x00060000, msg, 0, "DEBUG", 0); isoburn_msgs_submit(*o, 0x00060000, msg, 0, "DEBUG", 0);
if((flag & 16) || track_count >= 2) { if((flag & 16) || track_count >= 2) {
ret= 0; /* toc emulation off, or not overwriteable */ ret= 0; /* toc emulation off, or not overwritable */
} else { } else {
ret= isoburn_start_emulation(*o, 1); ret= isoburn_start_emulation(*o, 1);
if(ret<=0) { if(ret<=0) {
(*o)->emulation_mode= -1; (*o)->emulation_mode= -1;
goto ex; goto ex;
} }
emulation_started= 1; emulation_started= 1;
ret= isoburn_emulate_toc(d, 1 | ((!!(flag & 512)) << 1)); ret= isoburn_emulate_toc(d, 1 | ((!!(flag & 512)) << 1));
if(ret<0) if(ret<0)
goto ex; goto ex;
skipping to change at line 512 skipping to change at line 512
ret= 1; ret= 1;
ex: ex:
if(caps!=NULL) if(caps!=NULL)
burn_disc_free_multi_caps(&caps); burn_disc_free_multi_caps(&caps);
return(ret); return(ret);
} }
/** /**
@param flag bit0= load @param flag bit0= load
bit1= regard overwriteable media as blank bit1= regard overwritable media as blank
bit2= if the drive is a regular disk file: truncate it to bit2= if the drive is a regular disk file: truncate it to
the write start address the write start address
bit3= if the drive reports a -ROM profile then try to read bit3= if the drive reports a -ROM profile then try to read
table of content by scanning for ISO image headers. table of content by scanning for ISO image headers.
(depending on media type and drive state this might (depending on media type and drive state this might
help or it might make the resulting toc even worse) help or it might make the resulting toc even worse)
bit4= do not emulate TOC on overwriteable media bit4= do not emulate TOC on overwritable media
bit5= ignore ACL from external filesystems bit5= ignore ACL from external filesystems
bit6= ignore POSIX Extended Attributes from external filesystems bit6= ignore POSIX Extended Attributes from external filesystems
bit7= pretend -ROM profile and scan for table of content bit7= pretend -ROM profile and scan for table of content
bit8= re-assess (*drive_infos)[0] rather than acquiring adr bit8= re-assess (*drive_infos)[0] rather than acquiring adr
bit9= when scanning for ISO 9660 sessions on overwritable bit9= when scanning for ISO 9660 sessions on overwritable
media: Do not demand a valid superblock at LBA 0 media: Do not demand a valid superblock at LBA 0
and scan until end of medium. and scan until end of medium.
bit10= if not bit6: accept all xattr namespaces from external bit10= if not bit6: accept all xattr namespaces from external
filesystems, not only "user.". filesystems, not only "user.".
*/ */
skipping to change at line 1434 skipping to change at line 1434
sprintf(size_text, "%.f kB", 2 * (double) scan_count); sprintf(size_text, "%.f kB", 2 * (double) scan_count);
sprintf(msg, "Found %d ISO sessions by scanning %s in %.f seconds", sprintf(msg, "Found %d ISO sessions by scanning %s in %.f seconds",
session_count, size_text, (double) (now - start_time)); session_count, size_text, (double) (now - start_time));
isoburn_msgs_submit(o, 0x00060000, msg, 0, "UPDATE", 0); isoburn_msgs_submit(o, 0x00060000, msg, 0, "UPDATE", 0);
} }
read_flag= 1; read_flag= 1;
if(flag&2) if(flag&2)
read_flag|= (1<<15)|((session_count>0)<<14); read_flag|= (1<<15)|((session_count>0)<<14);
else { else {
/* growisofs aligns to 16 rather than 32. Overwriteable TOC emulation /* growisofs aligns to 16 rather than 32. Overwritable TOC emulation
relies on not accidentially seeing inter-session trash data. relies on not accidentally seeing inter-session trash data.
But one can safely access 16 blocks earlier because a xorriso header But one can safely access 16 blocks earlier because a xorriso header
would have been overwritten with the unused 16 blocks at its start. would have been overwritten with the unused 16 blocks at its start.
If libisoburn alignment would increase, then this would not be If libisoburn alignment would increase, then this would not be
possible any more. possible any more.
*/ */
if(probe_minus_16) if(probe_minus_16)
read_flag|= (1<<14); read_flag|= (1<<14);
probe_minus_16= 0; probe_minus_16= 0;
} }
 End of changes. 13 change blocks. 
15 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)