Compare commits

...

55 Commits

Author SHA1 Message Date
ec9a013c0b And libisoburn 0.1.6 is ready 2008-05-18 22:13:36 +00:00
8c2f47ba78 Documented changes and release timestamp 2008-05-18 08:45:50 +00:00
962cd55c52 Bug fix: -findi operated on nodes which ceased existence shortly before 2008-05-18 08:02:23 +00:00
cb723e4c87 Version leap to 0.1.6, requiring libburn-0.4.8 now 2008-05-17 16:35:14 +00:00
9f117735cd Corrected ugly message with -update_r and root directory 2008-05-17 16:27:50 +00:00
e86c8ff755 Branches 0.1.6 of libisoburn 2008-05-17 07:41:46 +00:00
ddf698c1c4 Bug fix: -update_r and others did not work properly with relative paths 2008-05-15 19:20:59 +00:00
74da4d1749 New options -map and -map_single 2008-05-15 15:00:39 +00:00
c66cfdf72c Enabled a pacifier for compare_r 2008-05-15 09:20:05 +00:00
4866be0555 Uploaded forgotten enhancements 2008-05-14 17:48:27 +00:00
d7c4fadba3 Automatic fast format on attempt to write to unformatted DVD-RAM or BD-RE 2008-05-14 17:34:09 +00:00
b287c109c3 Required libburn version is now 0.4.7 (because of DVD-RAM BD-RE bug fix) 2008-05-14 17:31:43 +00:00
8abcf1c238 New -format types by_index and fast_by_index 2008-05-14 11:45:28 +00:00
073da62d73 Eat up leading dashes with command options, convert inner dashes to underscores 2008-05-13 18:08:53 +00:00
191f54eca2 Handled -list_format with non MMC drives 2008-05-13 18:06:04 +00:00
421693bb73 Prepared Xorriso_get_profile() for potential call without flag bit1 2008-05-13 15:38:17 +00:00
5f5b0c7016 Corrected strange behavior with non-ISO images on overwriteable media 2008-05-13 13:52:33 +00:00
6bc2d3e0a3 New option -list_formats 2008-05-13 11:58:43 +00:00
0f8e6f24db New -blank and -format modes as_needed 2008-05-12 19:36:23 +00:00
9b7451f893 Reacted on harmless compiler warning 2008-05-12 19:33:21 +00:00
fc8d4b8dbe New option -load session|track|sbsector|volid 2008-05-12 08:27:18 +00:00
96b808e0c5 New API call isoburn_set_msc1() 2008-05-12 08:13:16 +00:00
ad6585dbd7 Switched requirements to libburn-0.4.6 2008-05-12 08:07:59 +00:00
6b1eb7d79f Better behavior of update_r with no image present 2008-05-10 19:43:16 +00:00
eeab74920f Minor change in -update_r example 2008-05-10 19:41:52 +00:00
ca0179ad57 Adapted xorriso standalone production to new libburn cycle 0.4.7 2008-05-10 19:40:35 +00:00
36aa59297a Trying to better handle non ISO images on -indev 2008-05-09 20:54:58 +00:00
aeef058800 Updated details in web page 2008-05-09 20:50:07 +00:00
6b459b1cfb Updated man page examples 2008-05-08 20:54:51 +00:00
1d8e7620f0 Updated man page examples 2008-05-08 19:54:10 +00:00
cf103ac180 Adjusted reply of isoburn_disc_get_msc1() to eventual -rom_toc_scan result 2008-05-08 18:53:31 +00:00
3a4dc252f0 Mentioned new features 2008-05-08 15:24:59 +00:00
0e1f89d7c3 New TOC layout with volume id and sbsector=, new option -rom_toc_scan 2008-05-08 14:19:09 +00:00
7f1b8b07a6 Try to read header chain from alleged -ROM media (e.g. DVD+RW in -ROM drive) 2008-05-08 14:10:43 +00:00
252521f930 New format with -toc is more concise and shows volume id 2008-05-07 21:44:28 +00:00
e92b796215 New API function isoburn_read_iso_head() 2008-05-07 21:43:25 +00:00
585445ccc8 Making use of new isoburn_toc_* functions 2008-05-07 17:56:23 +00:00
e9171b5133 Reading emulated toc info from overwriteable media, new API isoburn_toc_*() 2008-05-07 17:54:55 +00:00
947bb33173 Removed some outdated ifdef cases 2008-05-07 07:14:10 +00:00
3eae8634cd Experiment for TOC on overwriteables: Keep a target_head copy of session #1 2008-05-06 14:45:49 +00:00
f830c30196 Calling isoburn_cancel_prepared_write() after failed isoburn_disc_write() 2008-05-06 08:44:28 +00:00
e412f65656 After formatting DVD-RW write 128 MB and close track to end Intermediate State 2008-05-05 21:03:28 +00:00
b7caaed66c Mentioned new options 2008-05-04 14:08:52 +00:00
8ffcf40fc4 New options -not_paths, -not_leaf, -not_list, -not_mgt, -as mkisofs -m, 2008-05-04 13:36:15 +00:00
28d68a79a5 Working towards exclusion of user defined absolute paths and leaf patterns 2008-05-03 22:32:51 +00:00
1576983e17 Working towards exclusion of user defined absolute paths and leaf patterns 2008-05-03 15:11:58 +00:00
97c22f86a4 Working towards exclusion of user defined absolute paths and leaf patterns 2008-05-02 20:50:40 +00:00
f0b1cbddf3 Adjusted ds_read_block() to inofficial libisofs expectations 2008-05-02 07:25:50 +00:00
19e803ba0d Adjusted ds_read_block() to inofficial libisofs expectations 2008-05-01 17:41:58 +00:00
a4c4026446 Adjusted ds_read_block() to inofficial libisofs expectations 2008-05-01 13:55:09 +00:00
68d70682dd Clarified "best_effort" behavior 2008-05-01 13:52:43 +00:00
26eb9e659d Fine tuning of HTML man page appearance 2008-05-01 12:44:26 +00:00
c3048d6282 New option -error_behavior with a first occasion image_loading 2008-05-01 12:43:39 +00:00
1a2d3bc70c Documented changes and release timestamp 2008-04-28 13:57:26 +00:00
adeaf8b749 Version leap to 0.1.5 2008-04-28 12:34:39 +00:00
21 changed files with 3787 additions and 688 deletions

23
README
View File

@ -1,5 +1,5 @@
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
libburnia-project.org http:libburnia-project.org
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
libisoburn. By Vreixo Formoso <metalpain2002@yahoo.es> libisoburn. By Vreixo Formoso <metalpain2002@yahoo.es>
and Thomas Schmitt <scdbackup@gmx.net> and Thomas Schmitt <scdbackup@gmx.net>
@ -25,17 +25,18 @@ By using this software you agree to the disclaimer at the end of this text:
Compilation, First Glimpse, Installation Compilation, First Glimpse, Installation
Dynamic library and compile time header requirements for libisoburn-0.1.3 : Dynamic library and compile time header requirements for libisoburn-0.1.6 :
- libburn.so.4 , version libburn-0.4.2 or higher - libburn.so.4 , version libburn-0.4.8 or higher
- libisofs.so.6 , version libisofs-0.6.3 or higher - libisofs.so.6 , version libisofs-0.6.4 or higher
libisoburn and xorriso will not start with libraries which are older than their libisoburn and xorriso will not start with libraries which are older than their
headers seen at compile time. So compile in the oldest possible installation headers seen at compile time. So compile in the oldest possible installation
setup unless you have reason to enforce a newer bug fix level. setup unless you have reason to enforce a newer bug fix level.
Obtain libisoburn-0.1.3.tar.gz, take it to a directory of your choice and do: Obtain libisoburn-0.1.6.pl00.tar.gz, take it to a directory of your choice
and do:
tar xzf libisoburn-0.1.3.tar.gz tar xzf libisoburn-0.1.6.pl00.tar.gz
cd libisoburn-0.1.3 cd libisoburn-0.1.6
Within that directory execute: Within that directory execute:
@ -44,7 +45,7 @@ Within that directory execute:
Then become superuser and execute Then become superuser and execute
make install make install
which will make available libisoburn.so.1 . which will make available libisoburn.so.1 and program xorriso.
For the API concepts and calls see For the API concepts and calls see
./libisoburn/libisoburn.h ./libisoburn/libisoburn.h
@ -57,10 +58,10 @@ as well as
libisoburn includes a command line and dialog application named xorriso, libisoburn includes a command line and dialog application named xorriso,
which offers a substantial part of libisoburn features to shell scripts and which offers a substantial part of libisoburn features to shell scripts and
users. Its file xorriso/README describes a standlone tarball as first users. Its file xorriso/README describes a standalone tarball as first
preference for xorriso installation. preference for xorriso installation.
The installation described here produces a dynamically linked xorriso binary The libisoburn installation described above produces a dynamically linked
as described in chapter "libisoburn" at the end of that text. xorriso binary depending on libburn.so, libisofs.so, libisoburn.so.
After installation documentation is available via After installation documentation is available via
man xorriso man xorriso

View File

@ -1,4 +1,4 @@
AC_INIT([libisoburn], [0.1.3], [http://libburnia-project.org]) AC_INIT([libisoburn], [0.1.6], [http://libburnia-project.org])
AC_PREREQ([2.50]) AC_PREREQ([2.50])
dnl AC_CONFIG_HEADER([config.h]) dnl AC_CONFIG_HEADER([config.h])
@ -7,6 +7,12 @@ AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([subdir-objects]) AM_INIT_AUTOMAKE([subdir-objects])
dnl Hint: Search list for version code aspects:
dnl /AC_INT(
dnl /ISOBURN_.*_VERSION
dnl /LT_.*
dnl /LIB.*_REQUIRED
dnl The API version codes are now defined in libisoburn/libisoburn.h dnl The API version codes are now defined in libisoburn/libisoburn.h
dnl #define isoburn_header_version_* dnl #define isoburn_header_version_*
dnl configure.ac only rules the libtool revision numbering about dnl configure.ac only rules the libtool revision numbering about
@ -15,7 +21,7 @@ dnl
dnl These three are only copies to provide libtool with unused LT_RELEASE dnl These three are only copies to provide libtool with unused LT_RELEASE
ISOBURN_MAJOR_VERSION=0 ISOBURN_MAJOR_VERSION=0
ISOBURN_MINOR_VERSION=1 ISOBURN_MINOR_VERSION=1
ISOBURN_MICRO_VERSION=3 ISOBURN_MICRO_VERSION=6
dnl ISOBURN_VERSION=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION.$ISOBURN_MICRO_VERSION dnl ISOBURN_VERSION=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION.$ISOBURN_MICRO_VERSION
AC_SUBST(ISOBURN_MAJOR_VERSION) AC_SUBST(ISOBURN_MAJOR_VERSION)
@ -27,14 +33,15 @@ dnl Libtool versioning
dnl Generate libisoburn.so.1.x.y dnl Generate libisoburn.so.1.x.y
dnl SONAME will become LT_CURRENT - LT_AGE dnl SONAME will become LT_CURRENT - LT_AGE
dnl dnl
dnl ts A80215 dnl ts A80517
dnl This is the development version after stable release libisoburn.so.1.1.0 dnl This is the release version 0.1.6 = libisoburn.so.1.5.0
dnl LT_CURRENT++, LT_AGE++ has happened meanwhile. dnl ### This is the development version after above stable release
dnl ### LT_CURRENT++, LT_AGE++ have not happened happened yet.
dnl dnl
dnl SONAME = 3 - 2 = 1 . Library name = libburn.so.1.2.0 dnl SONAME = 6 - 5 = 1 . Library name = libburn.so.1.5.0
LT_RELEASE=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION LT_RELEASE=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION
LT_CURRENT=3 LT_CURRENT=6
LT_AGE=2 LT_AGE=5
LT_REVISION=0 LT_REVISION=0
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE` LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
@ -92,8 +99,8 @@ AC_CHECK_HEADER(libburn/libburn.h)
AC_CHECK_HEADER(libisofs/libisofs.h) AC_CHECK_HEADER(libisofs/libisofs.h)
dnl Check for proper library versions dnl Check for proper library versions
LIBBURN_REQUIRED=0.4.2 LIBBURN_REQUIRED=0.4.8
LIBISOFS_REQUIRED=0.6.2 LIBISOFS_REQUIRED=0.6.4
PKG_CHECK_MODULES(LIBBURN, libburn-1 >= $LIBBURN_REQUIRED) PKG_CHECK_MODULES(LIBBURN, libburn-1 >= $LIBBURN_REQUIRED)
PKG_CHECK_MODULES(LIBISOFS, libisofs-1 >= $LIBISOFS_REQUIRED) PKG_CHECK_MODULES(LIBISOFS, libisofs-1 >= $LIBISOFS_REQUIRED)

View File

@ -6,7 +6,7 @@
*/ */
/* libburn wrappers for libisoburn /* libburn wrappers for libisoburn
Copyright 2007 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007 - 2008 Thomas Schmitt, <scdbackup@gmx.net>
*/ */
/* <<< A70929 : hardcoded CD-RW with fabricated -msinfo /* <<< A70929 : hardcoded CD-RW with fabricated -msinfo
@ -38,6 +38,9 @@
#endif /* Xorriso_standalonE */ #endif /* Xorriso_standalonE */
/* <<< remove macro and alternative outdated code */
#define Libisoburn_on__libburn_after_0_4_2 yes
#include "libisoburn.h" #include "libisoburn.h"
#include "isoburn.h" #include "isoburn.h"
@ -47,6 +50,9 @@
extern struct isoburn *isoburn_list_start; /* in isoburn.c */ extern struct isoburn *isoburn_list_start; /* in isoburn.c */
int isoburn_emulate_toc(struct burn_drive *d, int flag);
int isoburn_initialize(char msg[1024], int flag) int isoburn_initialize(char msg[1024], int flag)
{ {
int major, minor, micro, bad_match= 0; int major, minor, micro, bad_match= 0;
@ -213,18 +219,48 @@ int isoburn_libburn_req(int *major, int *minor, int *micro)
} }
/** Examine the media and sets appropriate emulation if needed. int isoburn_is_intermediate_dvd_rw(struct burn_drive *d, int flag)
{
int profile, ret= 0, format_status, num_formats;
char profile_name[80];
enum burn_disc_status s;
off_t format_size= -1;
unsigned bl_sas;
s= isoburn_disc_get_status(d);
ret= burn_disc_get_profile(d, &profile, profile_name);
if(ret>0 && profile==0x13)
ret= burn_disc_get_formats(d, &format_status, &format_size,
&bl_sas, &num_formats);
if(ret>0 && profile==0x13 && s==BURN_DISC_BLANK &&
format_status==BURN_FORMAT_IS_UNKNOWN)
return(1);
return(0);
}
/** Examines the media and sets appropriate emulation if needed.
@param flag bit0= pretent blank on overwriteable media @param flag bit0= pretent blank on overwriteable media
bit3= if the drive reports a -ROM profile then try to read
table of content by scanning for ISO image headers.
*/ */
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; int ret, lba, nwa, profile, readonly= 0;
struct burn_multi_caps *caps= NULL; struct burn_multi_caps *caps= NULL;
struct isoburn_toc_entry *t;
char profile_name[80];
profile_name[0]= 0;
ret= burn_disc_get_profile(d, &profile, profile_name);
if(ret<=0)
profile= 0x00;
ret= burn_disc_get_multi_caps(d, BURN_WRITE_NONE, &caps, 0); ret= burn_disc_get_multi_caps(d, BURN_WRITE_NONE, &caps, 0);
if(ret<0) /* == 0 is read-only media, but it is too early to reject it here */ if(ret<0) /* == 0 is read-only media, but it is too early to reject it here */
goto ex; goto ex;
if(ret==0)
readonly= 1;
ret= isoburn_new(o, 0); ret= isoburn_new(o, 0);
if(ret<=0) if(ret<=0)
goto ex; goto ex;
@ -238,9 +274,14 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
if(caps->start_adr) { /* set emulation to overwriteable */ if(caps->start_adr) { /* set emulation to overwriteable */
(*o)->emulation_mode= 1; (*o)->emulation_mode= 1;
ret= isoburn_is_intermediate_dvd_rw(d, 0);
if(flag&1) { if(ret>0) {
(*o)->min_start_byte= 0;
(*o)->nwa= 0; (*o)->nwa= 0;
(*o)->zero_nwa= 0;
}
if(flag&1) {
(*o)->nwa= (*o)->zero_nwa;
(*o)->fabricated_disc_status= BURN_DISC_BLANK; (*o)->fabricated_disc_status= BURN_DISC_BLANK;
} else { } else {
ret= isoburn_start_emulation(*o, 0); ret= isoburn_start_emulation(*o, 0);
@ -248,11 +289,40 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
(*o)->emulation_mode= -1; (*o)->emulation_mode= -1;
goto ex; goto ex;
} }
/* try to read emulated toc */
ret= isoburn_emulate_toc(d, 0);
if(ret<0) {
(*o)->emulation_mode= -1;
goto ex;
}
} }
} else { } else {
/* >>> recognize unsuitable media (but allow read-only media) */; /* >>> recognize unsuitable media (but allow read-only media) */;
if(readonly) {
/* This might be overwriteable media in a -ROM drive */
ret= isoburn_emulate_toc(d, 1);
if(ret<0)
goto ex;
if(ret==0 && profile !=0x08 && (flag&8)) {
/* This might also be multi-session media which do not
get shown with a decent TOC.
CD-R TOC (profile 0x08) can be trusted. Others not.
Do a scan search of ISO headers.
*/
ret= isoburn_emulate_toc(d, 1|2);
if(ret<0)
goto ex;
if(ret>0) { /* point msc1 to last session */
if((*o)->toc!=NULL) {
for(t= (*o)->toc; t->next!=NULL; t= t->next);
(*o)->fabricated_msc1= t->start_lba;
}
}
}
}
#ifdef Hardcoded_cd_rW #ifdef Hardcoded_cd_rW
(*o)->nwa= Hardcoded_cd_rw_nwA; (*o)->nwa= Hardcoded_cd_rw_nwA;
#else #else
@ -262,6 +332,7 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
#endif #endif
} }
ret= 1; ret= 1;
ex: ex:
if(caps!=NULL) if(caps!=NULL)
@ -275,6 +346,10 @@ ex:
bit1= regard overwriteable media as blank bit1= regard overwriteable 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
table of content by scanning for ISO image headers.
(depending on media type and drive state this might
help or it might make the resulting toc even worse)
*/ */
int isoburn_drive_aquire(struct burn_drive_info *drive_infos[], int isoburn_drive_aquire(struct burn_drive_info *drive_infos[],
char *adr, int flag) char *adr, int flag)
@ -296,7 +371,8 @@ int isoburn_drive_aquire(struct burn_drive_info *drive_infos[],
if(ret<=0) if(ret<=0)
goto ex; goto ex;
drive_grabbed= 1; drive_grabbed= 1;
ret= isoburn_welcome_media(&o, (*drive_infos)[0].drive, !!(flag&2)); ret= isoburn_welcome_media(&o, (*drive_infos)[0].drive,
(flag&8) | !!(flag&2));
if(ret<=0) if(ret<=0)
goto ex; goto ex;
@ -386,7 +462,7 @@ enum burn_disc_status isoburn_disc_get_status(struct burn_drive *drive)
/* emulated status */ /* emulated status */
if(o->emulation_mode==-1) if(o->emulation_mode==-1)
return(BURN_DISC_UNSUITABLE); return(BURN_DISC_UNSUITABLE);
if(o->nwa>0) if(o->nwa>o->zero_nwa)
return(BURN_DISC_APPENDABLE); return(BURN_DISC_APPENDABLE);
return(BURN_DISC_BLANK); return(BURN_DISC_BLANK);
} }
@ -409,6 +485,8 @@ void isoburn_disc_erase(struct burn_drive *drive, int fast)
{ {
int ret; int ret;
struct isoburn *o; struct isoburn *o;
enum burn_disc_status s;
char zero_buffer[Libisoburn_target_head_sizE];
ret= isoburn_find_emulator(&o, drive, 0); ret= isoburn_find_emulator(&o, drive, 0);
if(ret>0) { if(ret>0) {
@ -418,9 +496,16 @@ void isoburn_disc_erase(struct burn_drive *drive, int fast)
return; return;
} }
if(o->emulation_mode>0) { if(o->emulation_mode>0) {
ret= isoburn_invalidate_iso(o, 0); s= isoburn_disc_get_status(drive);
if(s==BURN_DISC_FULL) { /* unknown data format in first 64 kB */
memset(zero_buffer, 0, Libisoburn_target_head_sizE);
ret= burn_random_access_write(drive, (off_t) 0, zero_buffer,
(off_t) Libisoburn_target_head_sizE, 1);
} else {
ret= isoburn_invalidate_iso(o, 0);
}
if(ret<=0) if(ret<=0)
burn_drive_cancel(drive); burn_drive_cancel(drive); /* mark run as failure */
return; return;
} }
} }
@ -434,12 +519,16 @@ off_t isoburn_disc_available_space(struct burn_drive *d,
int ret; int ret;
struct isoburn *o; struct isoburn *o;
struct burn_write_opts *eff_opts= NULL, *local_opts= NULL; struct burn_write_opts *eff_opts= NULL, *local_opts= NULL;
enum burn_disc_status s;
off_t avail; off_t avail;
eff_opts= opts; eff_opts= opts;
ret= isoburn_find_emulator(&o, d, 0); ret= isoburn_find_emulator(&o, d, 0);
if(ret>0 && o!=NULL) if(ret>0 && o!=NULL)
if(o->emulation_mode!=0) { if(o->emulation_mode!=0) {
s= isoburn_disc_get_status(d);
if(s==BURN_DISC_FULL) /* unknown data format in first 64 kB */
return((off_t) 0);
local_opts= burn_write_opts_new(d); local_opts= burn_write_opts_new(d);
eff_opts= local_opts; eff_opts= local_opts;
burn_write_opts_set_start_byte(eff_opts, ((off_t) o->nwa) * (off_t) 2048); burn_write_opts_set_start_byte(eff_opts, ((off_t) o->nwa) * (off_t) 2048);
@ -472,6 +561,10 @@ int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba)
ret= isoburn_find_emulator(&o, d, 0); ret= isoburn_find_emulator(&o, d, 0);
if(ret<0) if(ret<0)
return(0); return(0);
if(o->fabricated_msc1>=0) {
*start_lba= o->fabricated_msc1;
return(1);
}
if(ret>0) if(o->emulation_mode>0) { if(ret>0) if(o->emulation_mode>0) {
*start_lba= 0; *start_lba= 0;
return(1); return(1);
@ -529,8 +622,35 @@ void isoburn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
if(o->emulation_mode!=0) { if(o->emulation_mode!=0) {
burn_write_opts_set_multi(opts, 0); burn_write_opts_set_multi(opts, 0);
if(o->emulation_mode>0 && o->nwa >= 0) { if(o->emulation_mode>0 && o->nwa >= 0) {
burn_write_opts_set_start_byte(opts, ((off_t) o->nwa) * (off_t) 2048);
nwa= o->nwa; nwa= o->nwa;
/* This caters for unwritten formatted DVD-RW. They need to be written
sequentially on the first use. Only written areas are random access.
If the first session is not written to LBA 0, then re-opening of
formatting and padding is needed.
This can be done. But when the track gets closed after padding,
this lasts a long time. There is a high risk that an app will not
poll the message queue while waiting for isoburn_disc_write() to
return. The pacifier loop usually happens only afterwards.
So automatic formatting might cause a nervous clueless user.
*/
ret= isoburn_is_intermediate_dvd_rw(drive, 0);
if(ret>0 && nwa>0 && nwa <= o->zero_nwa) {
/* actually this should not happen since such media get recognized
by isoburn_welcome_media and o->zero_nwa gets set to 0
*/
sprintf(msg,
"DVD-RW insufficiently formatted. (Intermediate State, size unknown)");
burn_msgs_submit(0x00060000, msg, 0, "FAILURE", NULL);
sprintf(msg,
"It might help to first deformat it and then format it again");
burn_msgs_submit(0x00060000, msg, 0, "HINT", NULL);
burn_drive_cancel(drive); /* mark run as failure */
return;
}
/* end of DVD-RW oriented check */
burn_write_opts_set_start_byte(opts, nwa * (off_t) 2048);
} }
} }
} }
@ -546,12 +666,11 @@ void isoburn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
return; return;
} }
/*
sprintf(reasons, "%d", (int) write_type); sprintf(reasons, "%d", (int) write_type);
fprintf(stderr, "isoburn_EXPERIMENTAL: write_type = %s\n", sprintf(msg, "Write_type = %s\n",
(write_type == BURN_WRITE_SAO ? "SAO" : (write_type == BURN_WRITE_SAO ? "SAO" :
(write_type == BURN_WRITE_TAO ? "TAO" : reasons))); (write_type == BURN_WRITE_TAO ? "TAO" : reasons)));
*/ burn_msgs_submit(0x00060000, msg, 0, "DEBUG", NULL);
#ifdef Hardcoded_cd_rW #ifdef Hardcoded_cd_rW
/* <<< A70929 : hardcoded CD-RW with fabricated -msinfo */ /* <<< A70929 : hardcoded CD-RW with fabricated -msinfo */
@ -638,9 +757,10 @@ int isoburn_set_start_byte(struct isoburn *o, off_t value, int flag)
if(value % caps->start_alignment) if(value % caps->start_alignment)
value+= caps->start_alignment - (value % caps->start_alignment); value+= caps->start_alignment - (value % caps->start_alignment);
o->nwa= value/2048; o->nwa= value/2048;
/* If suitable for alignment, round up to full 16 sector addresses */ /* If suitable for media alignment, round up to Libisoburn_nwa_alignemenT */
if((o->nwa%16) && ((16*2048) % caps->start_alignment)==0 ) if((o->nwa % Libisoburn_nwa_alignemenT) &&
o->nwa+= 16 - (o->nwa%16); ((Libisoburn_nwa_alignemenT*2048) % caps->start_alignment)==0 )
o->nwa+= Libisoburn_nwa_alignemenT - (o->nwa % Libisoburn_nwa_alignemenT);
ret= 1; ret= 1;
ex: ex:
if(caps!=NULL) if(caps!=NULL)
@ -688,15 +808,12 @@ int isoburn_get_fifo_status(struct burn_drive *d, int *size, int *free_bytes,
{ {
int ret; int ret;
struct isoburn *o; struct isoburn *o;
#ifdef Libisoburn_no_fifO
size_t hsize= 0, hfree_bytes= 0; size_t hsize= 0, hfree_bytes= 0;
#endif
ret= isoburn_find_emulator(&o, d, 0); ret= isoburn_find_emulator(&o, d, 0);
if(ret<0) if(ret<0)
return(-1); return(-1);
#ifdef Libisoburn_no_fifO
if(o==NULL) if(o==NULL)
return(-1); return(-1);
if(o->iso_source==NULL) if(o->iso_source==NULL)
@ -727,22 +844,15 @@ int isoburn_get_fifo_status(struct burn_drive *d, int *size, int *free_bytes,
*status_text= "ended"; *status_text= "ended";
else if(ret==7) else if(ret==7)
*status_text= "aborted"; *status_text= "aborted";
#else
if(o==NULL)
return(0);
if(o->fifo==NULL)
return(0);
ret= burn_fifo_inquire_status(o->fifo, size, free_bytes, status_text);
#endif /* ! Libisoburn_no_fifO */
return(ret); return(ret);
} }
#define Libisoburn_on_libisofs_after_0_6_2 yes
/* >>> todo: throw out the copies of libdax_msgs entrails */ /* >>> todo: throw out the copies of libdax_msgs entrails */
#ifndef Libisoburn_on__libburn_after_0_4_2
/* <<< to be replaced by libburn-0.4.3 API call burn_sev_to_text(). /* <<< to be replaced by libburn-0.4.3 API call burn_sev_to_text().
This is a copy of libdax_msgs__sev_to_text() which is not exposed This is a copy of libdax_msgs__sev_to_text() which is not exposed
by the API of of libburn-0.4.2 . As soon as xorriso gets based on by the API of of libburn-0.4.2 . As soon as xorriso gets based on
@ -763,30 +873,24 @@ int isoburn_get_fifo_status(struct burn_drive *d, int *size, int *free_bytes,
#define LIBDAX_MSGS_SEV_ABORT 0x71000000 #define LIBDAX_MSGS_SEV_ABORT 0x71000000
#define LIBDAX_MSGS_SEV_NEVER 0x7fffffff #define LIBDAX_MSGS_SEV_NEVER 0x7fffffff
#endif /* ! Libisoburn_on__libburn_after_0_4_2 */
/* @param flag bit0= -reserved- /* @param flag bit0= -reserved-
bit1= this is a libburn severity bit1= this is a libburn severity
*/ */
int isoburn__sev_to_text(int severity, char **severity_name, int isoburn__sev_to_text(int severity, char **severity_name,
int flag) int flag)
{ {
#ifdef Libisoburn_on_libisofs_after_0_6_2
int ret; int ret;
#else
#ifdef Libisoburn_on__libburn_after_0_4_2
int ret;
#endif
#endif
#ifdef Libisoburn_on_libisofs_after_0_6_2
ret= iso_sev_to_text(severity, severity_name); ret= iso_sev_to_text(severity, severity_name);
if(ret>0) if(ret>0)
return(ret); return(ret);
#endif /* Libisoburn_on_libisofs_after_0_6_2 */
#ifdef Libisoburn_on__libburn_after_0_4_2 #ifdef Libisoburn_on__libburn_after_0_4_2
ret= burn_sev_to_text(severity, severity_name, 0); ret= burn_sev_to_text(severity, severity_name, 0);
if(ret>0) return(ret);
return(ret); #else
#endif
if(flag&1) { if(flag&1) {
*severity_name= "NEVER\nABORT\nFATAL\nFAILURE\nSORRY\nWARNING\nHINT\nNOTE\nUPDATE\nDEBUG\nERRFILE\nALL"; *severity_name= "NEVER\nABORT\nFATAL\nFAILURE\nSORRY\nWARNING\nHINT\nNOTE\nUPDATE\nDEBUG\nERRFILE\nALL";
@ -824,6 +928,9 @@ int isoburn__sev_to_text(int severity, char **severity_name,
return(0); return(0);
} }
return(1); return(1);
#endif /* ! Libisoburn_on__libburn_after_0_4_2 */
} }
@ -831,11 +938,9 @@ int isoburn__text_to_sev(char *severity_name, int *severity_number, int flag)
{ {
int ret= 1; int ret= 1;
#ifdef Libisoburn_on_libisofs_after_0_6_2
ret= iso_text_to_sev(severity_name, severity_number); ret= iso_text_to_sev(severity_name, severity_number);
if(ret>0) if(ret>0)
return(ret); return(ret);
#endif /* Libisoburn_on_libisofs_after_0_6_2 */
#ifndef Libisoburn_on__libburn_after_0_4_2 #ifndef Libisoburn_on__libburn_after_0_4_2
if(severity_name[0]==0) if(severity_name[0]==0)
@ -868,33 +973,552 @@ int isoburn_report_iso_error(int iso_error_code, char msg_text[], int os_errno,
msg_text_pt= msg_text; msg_text_pt= msg_text;
iso_sev= iso_error_get_severity(iso_error_code); iso_sev= iso_error_get_severity(iso_error_code);
sev_text_pt= min_severity; sev_text_pt= min_severity;
#ifdef Libisoburn_on_libisofs_after_0_6_2
isoburn__text_to_sev(min_severity, &min_sev, 0); isoburn__text_to_sev(min_severity, &min_sev, 0);
if(min_sev < iso_sev) if(min_sev < iso_sev)
isoburn__sev_to_text(iso_sev, &sev_text_pt, 0); isoburn__sev_to_text(iso_sev, &sev_text_pt, 0);
ret= iso_msgs_submit(error_code, msg_text_pt, os_errno, sev_text_pt, 0); ret= iso_msgs_submit(error_code, msg_text_pt, os_errno, sev_text_pt, 0);
#else
burn_text_to_sev(min_severity, &min_sev, 0);
/* <<< Tunnel MISHAP through libburn which knows no MISHAP
with libburn-0.4.4 this is not necessary */
if(iso_sev==LIBDAX_MSGS_SEV_MISHAP) {
iso_sev= LIBDAX_MSGS_SEV_SORRY;
error_code= 0x0005ff73;
} else if(iso_sev==LIBDAX_MSGS_SEV_ERRFILE) { /* same with ERRFILE */
iso_sev= LIBDAX_MSGS_SEV_DEBUG;
error_code= 0x00051001;
}
if(min_sev < iso_sev)
isoburn__sev_to_text(iso_sev, &sev_text_pt, 0);
ret= burn_msgs_submit(error_code, msg_text_pt, os_errno, sev_text_pt, NULL);
#endif /* ! Libisoburn_on_libisofs_after_0_6_2 */
return(ret); return(ret);
} }
/* @param flag bit0-7: info return mode
0= do not return anything in info (do not even touch it)
1= return volume id
bit14= -reserved -
bit15= -reserved-
@return 1 seems to be a valid ISO image , 0 format not recognized, <0 error
*/
int isoburn_read_iso_head_parse(struct burn_drive *d, unsigned char *data,
int *image_blocks, char *info, int flag)
{
int i, info_mode;
/* is this an ISO image ? */
if(data[0]!=1)
return(0);
if(strncmp((char *) (data+1),"CD001",5)!=0)
return(0);
/* believe so */
*image_blocks= data[80] | (data[81]<<8) | (data[82]<<16) | (data[83]<<24);
info_mode= flag&255;
if(info_mode==0) {
;
} else if(info_mode==1) {
strncpy(info, (char *) (data+40), 32);
info[32]= 0;
for(i= strlen(info)-1; i>=0; i--)
if(info[i]!=' ')
break;
else
info[i]= 0;
} else {
burn_msgs_submit(0x00060000,
"Program error: Unknown info mode with isoburn_read_iso_head()",
0, "FATAL", NULL);
return(-1);
}
return(1);
}
/* API
@param flag bit0-7: info return mode
0= do not return anything in info (do not even touch it)
1= return volume id
bit14= check both half buffers (not only second)
return 2 if found in first block
bit15= return-1 on read error
@return 1 seems to be a valid ISO image , 2 found in first half buffer,
0 format not recognized, <0 error
*/
int isoburn_read_iso_head(struct burn_drive *d, int lba,
int *image_blocks, char *info, int flag)
{
unsigned char buffer[64*1024];
int ret;
off_t data_count;
*image_blocks= 0;
ret = burn_read_data(d, ((off_t) lba) * (off_t) 2048, (char *) buffer,
(off_t) 64*1024, &data_count, 2); /* no error messages */
if(ret<=0)
return(-1*!!(flag&(1<<15)));
if(flag&(1<<14)) {
ret= isoburn_read_iso_head_parse(d, buffer, image_blocks, info,
flag&255);
if(ret<0)
return(ret);
if(ret>0)
return(2);
}
ret= isoburn_read_iso_head_parse(d, buffer+32*1024, image_blocks, info,
flag&255);
return(ret);
}
/* @param flag bit0= allow unemulated media
bit1= free scanning without enclosing LBA-0-header
@return -1 severe error, 0= no neat header chain, 1= credible chain read
*/
int isoburn_emulate_toc(struct burn_drive *d, int flag)
{
int ret, image_size= 0, lba, track_blocks, session_count= 0, read_flag= 0;
int scan_start= 0;
struct isoburn *o;
struct isoburn_toc_entry *item;
char msg[160];
/* is the media emulated multi-session ? */
ret= isoburn_find_emulator(&o, d, 0);
if(ret<0)
return(-1);
if(o==NULL)
return(-1);
if(o->emulation_mode<=0 && !(flag&1))
return(0);
lba= 0;
if(!(flag&2)) {
ret= isoburn_read_iso_head(d, lba, &image_size, NULL, 0);
if(ret<=0)
{ret= 0; goto failure;}
lba= Libisoburn_overwriteable_starT;
}
while(lba<image_size || (flag&2)) {
read_flag= 0;
if(flag&2)
read_flag= (1<<15)|((session_count>0)<<14);
ret= isoburn_read_iso_head(d, lba, &track_blocks, NULL, read_flag);
if(ret<=0) {
if(session_count>0) {
if(flag&2) {
if(ret==0) {
/* try at next 64 k block (check both 32 k halves) */
lba+= 32;
if(lba-scan_start <= Libisoburn_toc_scan_max_gaP)
continue;
}
break;
}
sprintf(msg,
"Chain of ISO session headers broken at #%d, LBA %ds",
session_count+1, lba);
burn_msgs_submit(0x00060000, msg, 0, "WARNING", NULL);
}
{ret= 0; goto failure;}
}
if(ret==2) /* ISO header was found in first half block */
lba-= 16;
ret= isoburn_toc_entry_new(&item, o->toc, 0);
if(ret<=0) {
burn_msgs_submit(0x00060000,
"Not enough memory for emulated TOC entry object",
0, "FATAL", NULL);
ret= -1; goto failure;
}
if(o->toc==NULL)
o->toc= item;
session_count++;
item->session= session_count;
item->track_no= session_count;
item->start_lba= lba;
item->track_blocks= track_blocks;
lba+= track_blocks;
if(lba % Libisoburn_nwa_alignemenT)
lba+= Libisoburn_nwa_alignemenT - (lba % Libisoburn_nwa_alignemenT);
scan_start= lba;
}
sprintf(msg,
"Chain of ISO session headers yielded %d sessions", session_count);
burn_msgs_submit(0x00060000, msg, 0, "DEBUG", NULL);
return(1);
failure:;
isoburn_toc_entry_destroy(&(o->toc), 1);
return(ret);
}
int isoburn_toc_new_arrays(struct isoburn_toc_disc *o,
int session_count, int track_count, int flag)
{
int i;
int isoburn_toc_destroy_arrays(struct isoburn_toc_disc *o, int flag);
o->sessions= calloc(session_count, sizeof(struct isoburn_toc_session));
o->session_pointers=
calloc(session_count, sizeof(struct isoburn_toc_session *));
o->tracks= calloc(track_count, sizeof(struct isoburn_toc_track));
o->track_pointers= calloc(track_count, sizeof(struct isoburn_toc_track *));
if(o->sessions!=NULL && o->session_pointers!=NULL &&
o->tracks!=NULL && o->track_pointers!=NULL) {
for(i= 0; i<session_count; i++) {
o->sessions[i].session= NULL;
o->sessions[i].track_pointers= NULL;
o->sessions[i].track_count= 0;
o->sessions[i].toc_entry= NULL;
o->session_pointers[i]= NULL;
}
for(i= 0; i<track_count; i++) {
o->tracks[i].track= NULL;
o->tracks[i].toc_entry= NULL;
o->track_pointers[i]= NULL;
}
return(1);
}
/* failed */
isoburn_toc_destroy_arrays(o, 0);
return(-1);
}
int isoburn_toc_destroy_arrays(struct isoburn_toc_disc *o, int flag)
{
if(o->sessions!=NULL)
free((char *) o->sessions);
o->sessions= NULL;
if(o->session_pointers!=NULL)
free((char *) o->session_pointers);
o->session_pointers= NULL;
if(o->tracks!=NULL)
free((char *) o->tracks);
o->tracks= NULL;
if(o->track_pointers!=NULL)
free((char *) o->track_pointers);
o->track_pointers= NULL;
return(1);
}
struct isoburn_toc_disc *isoburn_toc_drive_get_disc(struct burn_drive *d)
{
int ret, session_count= 0, track_count= 0, num_tracks= 0, i, j;
struct isoburn *o;
struct isoburn_toc_entry *t;
struct isoburn_toc_disc *toc_disc= NULL;
struct burn_session **s;
struct burn_track **tracks;
toc_disc= calloc(1, sizeof(struct isoburn_toc_disc));
if(toc_disc==NULL)
return(NULL);
toc_disc->disc= NULL;
toc_disc->sessions= NULL;
toc_disc->session_pointers= NULL;
toc_disc->tracks= NULL;
toc_disc->track_pointers= NULL;
toc_disc->session_count= 0;
toc_disc->track_count= 0;
toc_disc->toc= NULL;
/* is the media emulated multi-session ? */
ret= isoburn_find_emulator(&o, d, 0);
if(ret<0)
goto libburn;
if(o->toc==NULL)
goto libburn;
/* This is an emulated TOC */
toc_disc->toc= o->toc;
for(t= toc_disc->toc; t!=NULL; t= t->next)
session_count++;
ret= isoburn_toc_new_arrays(toc_disc, session_count, session_count, 0);
if(ret<=0)
goto failure;
t= toc_disc->toc;
for(i= 0; i<session_count; i++) {
toc_disc->sessions[i].track_pointers= toc_disc->track_pointers+i;
toc_disc->sessions[i].track_count= 1;
toc_disc->sessions[i].toc_entry= t;
toc_disc->session_pointers[i]= toc_disc->sessions+i;
toc_disc->tracks[i].toc_entry= t;
toc_disc->track_pointers[i]= toc_disc->tracks+i;
t= t->next;
}
toc_disc->session_count= session_count;
toc_disc->track_count= session_count;
return(toc_disc);
libburn:;
/* This is a libburn provided TOC */
toc_disc->disc= burn_drive_get_disc(d);
if(toc_disc->disc == NULL) {
failure:;
free((char *) toc_disc);
return(NULL);
}
s= burn_disc_get_sessions(toc_disc->disc, &session_count);
for(i= 0; i<session_count; i++) {
tracks = burn_session_get_tracks(s[i], &num_tracks);
track_count+= num_tracks;
}
if(session_count<=0 || track_count<=0)
goto failure;
ret= isoburn_toc_new_arrays(toc_disc, session_count, track_count, 0);
if(ret<=0)
goto failure;
track_count= 0;
for(i= 0; i<session_count; i++) {
tracks = burn_session_get_tracks(s[i], &num_tracks);
toc_disc->sessions[i].session= s[i];
toc_disc->sessions[i].track_pointers= toc_disc->track_pointers+track_count;
toc_disc->sessions[i].track_count= num_tracks;
toc_disc->session_pointers[i]= toc_disc->sessions+i;
for(j= 0; j<num_tracks; j++) {
toc_disc->tracks[track_count+j].track= tracks[j];
toc_disc->track_pointers[track_count+j]= toc_disc->tracks+(track_count+j);
}
track_count+= num_tracks;
}
toc_disc->session_count= session_count;
toc_disc->track_count= track_count;
return(toc_disc);
}
int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc)
{
struct isoburn_toc_entry *t;
int ret= 0;
if(disc==NULL)
return(0);
if(disc->toc!=NULL) {
for(t= disc->toc; t!=NULL; t= t->next)
ret= t->start_lba + t->track_blocks;
} else if(disc->disc!=NULL)
ret= burn_disc_get_sectors(disc->disc);
return(ret);
}
struct isoburn_toc_session **isoburn_toc_disc_get_sessions(
struct isoburn_toc_disc *disc, int *num)
{
*num= disc->session_count;
return(disc->session_pointers);
}
int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s)
{
struct isoburn_toc_entry *t;
int count= 0, i;
if(s==NULL)
return(0);
if(s->toc_entry!=NULL) {
t= s->toc_entry;
for(i= 0; i<s->track_count; i++) {
count+= t->track_blocks;
t= t->next;
}
} else if(s->session!=NULL)
count= burn_session_get_sectors(s->session);
return(count);
}
int isoburn_toc_entry_finish(struct burn_toc_entry *entry,
int session_no, int track_no, int flag)
{
int pmin, psec, pframe;
entry->extensions_valid= 1;
entry->adr= 1;
entry->control= 4;
entry->session= session_no & 255;
entry->session_msb= (session_no >> 8) & 255;
entry->point= track_no & 255;
entry->point_msb= (track_no >> 8) & 255;
burn_lba_to_msf(entry->start_lba, &pmin, &psec, &pframe);
if(pmin<=255)
entry->pmin= pmin;
else
entry->pmin= 255;
entry->psec= psec;
entry->pframe= pframe;
return(1);
}
void isoburn_toc_session_get_leadout_entry(struct isoburn_toc_session *s,
struct burn_toc_entry *entry)
{
struct isoburn_toc_track *t;
if(s==NULL)
return;
if(s->session!=NULL && s->toc_entry==NULL) {
burn_session_get_leadout_entry(s->session, entry);
return;
}
if(s->track_count<=0 || s->track_pointers==NULL || s->toc_entry==NULL)
return;
t= s->track_pointers[s->track_count-1];
entry->start_lba= t->toc_entry->start_lba + t->toc_entry->track_blocks;
entry->track_blocks= 0;
isoburn_toc_entry_finish(entry, s->toc_entry->session, t->toc_entry->track_no,
0);
}
struct isoburn_toc_track **isoburn_toc_session_get_tracks(
struct isoburn_toc_session *s, int *num)
{
*num= s->track_count;
return(s->track_pointers);
}
void isoburn_toc_track_get_entry(struct isoburn_toc_track *t,
struct burn_toc_entry *entry)
{
if(t==0)
return;
if(t->track!=NULL && t->toc_entry==NULL) {
burn_track_get_entry(t->track, entry);
return;
}
if(t->toc_entry==NULL)
return;
entry->start_lba= t->toc_entry->start_lba;
entry->track_blocks= t->toc_entry->track_blocks;
isoburn_toc_entry_finish(entry, t->toc_entry->session, t->toc_entry->track_no,
0);
}
void isoburn_toc_disc_free(struct isoburn_toc_disc *d)
{
if(d->disc!=NULL)
burn_disc_free(d->disc);
isoburn_toc_destroy_arrays(d, 0);
free((char *) d);
}
int isoburn_get_track_lba(struct isoburn_toc_track *track, int *lba, int flag)
{
struct burn_toc_entry entry;
isoburn_toc_track_get_entry(track, &entry);
if (entry.extensions_valid & 1)
*lba= entry.start_lba;
else
*lba= burn_msf_to_lba(entry.pmin, entry.psec, entry.pframe);
return(1);
}
int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
int flag)
{
int ret, num_sessions, num_tracks, adr_num, i, j, total_tracks;
int lba, best_lba, size;
char volid[33], msg[160];
struct isoburn *o;
struct isoburn_toc_disc *disc= NULL;
struct isoburn_toc_session **sessions= NULL;
struct isoburn_toc_track **tracks= NULL;
static char mode_names[][20]= {"auto", "session", "track", "lba", "volid"};
static int max_mode_names= 4;
ret= isoburn_find_emulator(&o, d, 0);
if(ret<0)
return(-1);
if(o==NULL)
return(-1);
adr_num= atoi(adr_value);
if(adr_mode!=3) {
disc= isoburn_toc_drive_get_disc(d);
if(disc==NULL) {
not_found:;
if(adr_mode<0 || adr_mode>max_mode_names)
goto unknown_mode;
sprintf(msg, "Failed to find %s %s", mode_names[adr_mode],
strlen(adr_value)<=80 ? adr_value : "-oversized-string-");
burn_msgs_submit(0x00060000, msg, 0, "FAILURE", NULL);
ret= 0; goto ex;
}
sessions= isoburn_toc_disc_get_sessions(disc, &num_sessions);
if(sessions==NULL || num_sessions<=0)
goto not_found;
}
if(adr_mode==0) {
/* Set fabricated_msc1 to last session in TOC */
tracks= isoburn_toc_session_get_tracks(sessions[num_sessions-1],
&num_tracks);
if(tracks==NULL || num_tracks<=0)
goto not_found;
isoburn_get_track_lba(tracks[0], &(o->fabricated_msc1), 0);
} else if(adr_mode==1) {
/* Use adr_num as session index (first session is 1, not 0) */
if(adr_num<1 || adr_num>num_sessions)
goto not_found;
tracks= isoburn_toc_session_get_tracks(sessions[adr_num-1], &num_tracks);
if(tracks==NULL || num_tracks<=0)
goto not_found;
isoburn_get_track_lba(tracks[0], &(o->fabricated_msc1), 0);
} else if(adr_mode==2) {
/* use adr_num as track index */
total_tracks= 0;
for(i=0; i<num_sessions; i++) {
tracks= isoburn_toc_session_get_tracks(sessions[i], &num_tracks);
if(tracks==NULL)
continue;
for(j= 0; j<num_tracks; j++) {
total_tracks++;
if(total_tracks==adr_num) {
isoburn_get_track_lba(tracks[j], &(o->fabricated_msc1), 0);
ret= 1; goto ex;
}
}
}
goto not_found;
} else if(adr_mode==3) {
o->fabricated_msc1= adr_num;
} else if(adr_mode==4) {
/* search for volume id that is equal to adr_value */
best_lba= -1;
for(i=0; i<num_sessions; i++) {
tracks= isoburn_toc_session_get_tracks(sessions[i], &num_tracks);
if(tracks==NULL)
continue;
for(j= 0; j<num_tracks; j++) {
isoburn_get_track_lba(tracks[0], &lba, 0);
ret= isoburn_read_iso_head(d, lba, &size, volid, 1);
if(ret<=0)
continue;
if(strcmp(volid, adr_value)!=0)
continue;
best_lba= lba;
}
}
if(best_lba<0)
goto not_found;
o->fabricated_msc1= best_lba;
} else {
unknown_mode:;
sprintf(msg, "Program error: Unknown msc1 address mode %d", adr_mode);
burn_msgs_submit(0x00060000, msg, 0, "FATAL", NULL);
ret= 0; goto ex;
}
ret= 1;
ex:;
if(disc!=NULL)
isoburn_toc_disc_free(disc);
return(ret);
}

View File

@ -76,7 +76,11 @@ int ds_read_block(IsoDataSource *src, uint32_t lba, uint8_t *buffer)
struct isoburn_cached_drive *icd; struct isoburn_cached_drive *icd;
if(src == NULL || buffer == NULL) if(src == NULL || buffer == NULL)
return -1; /* It is not required by the specs of libisofs but implicitely assumed
by its current implementation that a data source read result <0 is
a valid libisofs error code.
*/
return ISO_NULL_POINTER;
icd = (struct isoburn_cached_drive *) src->data; icd = (struct isoburn_cached_drive *) src->data;
d = (struct burn_drive*) icd->drive; d = (struct burn_drive*) icd->drive;
@ -128,9 +132,24 @@ int ds_read_block(IsoDataSource *src, uint32_t lba, uint8_t *buffer)
if (ret > 0) if (ret > 0)
return 1; return 1;
tiles[oldest].last_error_lba = lba; tiles[oldest].last_error_lba = lba;
sprintf(msg, "ds_read_block(%lu) returns -1", (unsigned long) lba);
/* It is not required by the specs of libisofs but implicitely assumed
...
But it is not possible to ignore FAILURE.
libisofs insists in original error codes, i.e. libisoburn cannot
change severity FAILURE associated with ISO_FILE_READ_ERROR.
So ISO_FILE_READ_ERROR is not an option and libisoburn has to
misuse ISO_FILE_CANT_WRITE, which is actually for image generation
and not for image reading.
This is quite wrong, although the error message text is unclear
enough to make it appear plausible.
*/
ret= ISO_FILE_CANT_WRITE;
if(ret >= 0)
ret = -1;
sprintf(msg, "ds_read_block(%lu) returns %d", (unsigned long) lba, ret);
burn_msgs_submit(0x00060000, msg, 0, "DEBUG", NULL); burn_msgs_submit(0x00060000, msg, 0, "DEBUG", NULL);
return -1; return ret;
} }
#ifdef Libisoburn_read_cache_reporT #ifdef Libisoburn_read_cache_reporT

View File

@ -6,8 +6,8 @@
/* /*
Class core of libisoburn. Class core of libisoburn.
Copyright 2007 Vreixo Formoso Lopes <metalpain2002@yahoo.es> Copyright 2007 - 2008 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
and Thomas Schmitt <scdbackup@gmx.net> Thomas Schmitt <scdbackup@gmx.net>
*/ */
/* ( derived from stub generated by CgeN on Sat, 01 Sep 2007 12:04:36 GMT ) */ /* ( derived from stub generated by CgeN on Sat, 01 Sep 2007 12:04:36 GMT ) */
@ -42,6 +42,51 @@
#include "../version.h" #include "../version.h"
*/ */
/* ----------------------- isoburn_toc_entry ---------------------- */
int isoburn_toc_entry_new(struct isoburn_toc_entry **objpt,
struct isoburn_toc_entry *boss, int flag)
{
struct isoburn_toc_entry *o, *s;
*objpt= o= (struct isoburn_toc_entry *)
malloc(sizeof(struct isoburn_toc_entry));
if(o==NULL) {
burn_msgs_submit(0x00060000,
"Cannot allocate memory for isoburn toc entry",
0, "FATAL", NULL);
return(-1);
}
o->session= 0;
o->track_no= 0;
o->start_lba= -1;
o->track_blocks= 0;
o->next= NULL;
if(boss!=NULL) {
for(s= boss; s->next!=NULL; s= s->next);
s->next= o;
}
return(1);
}
/* @param flag bit0= delete all subordinates too
*/
int isoburn_toc_entry_destroy(struct isoburn_toc_entry **o, int flag)
{
if(*o==NULL)
return(0);
if(flag&1)
isoburn_toc_entry_destroy(&((*o)->next), flag);
free((char *) (*o));
*o= NULL;
return(1);
}
/* --------------------- end isoburn_toc_entry -------------------- */
/* -------------------------- isoburn ----------------------- */ /* -------------------------- isoburn ----------------------- */
@ -67,19 +112,16 @@ int isoburn_new(struct isoburn **objpt, int flag)
o->drive= NULL; o->drive= NULL;
o->emulation_mode= 0; o->emulation_mode= 0;
o->min_start_byte= 0; o->fabricated_msc1= -1;
o->nwa= 0; o->zero_nwa= Libisoburn_overwriteable_starT;
o->min_start_byte= o->zero_nwa * 2048;
o->nwa= o->zero_nwa;
o->truncate= 0; o->truncate= 0;
#ifdef Libisoburn_no_fifO
o->iso_source= NULL; o->iso_source= NULL;
#else
o->fifo= NULL;
#endif
o->wrote_well= -1;
o->fabricated_disc_status= BURN_DISC_UNREADY; o->fabricated_disc_status= BURN_DISC_UNREADY;
for(i=0;i<65536;i++) o->toc= NULL;
o->wrote_well= -1;
for(i=0;i<Libisoburn_target_head_sizE;i++)
o->target_iso_head[i]= 0; o->target_iso_head[i]= 0;
o->image= NULL; o->image= NULL;
o->read_pacifier= NULL; o->read_pacifier= NULL;
@ -120,15 +162,10 @@ int isoburn_destroy(struct isoburn **objpt, int flag)
if(o->image!=NULL) if(o->image!=NULL)
iso_image_unref(o->image); iso_image_unref(o->image);
if(o->toc!=NULL)
#ifdef Libisoburn_no_fifO isoburn_toc_entry_destroy(&(o->toc), 1); /* all */
if(o->iso_source!=NULL) if(o->iso_source!=NULL)
burn_source_free(o->iso_source); burn_source_free(o->iso_source);
#else
if(o->fifo!=NULL)
burn_source_free(o->fifo);
#endif /* ! Libisoburn_no_fifO */
free((char *) o); free((char *) o);
*objpt= NULL; *objpt= NULL;
@ -320,9 +357,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *d, struct burn_disc **disc,
iso_write_opts_set_default_uid(wopts, opts->uid); iso_write_opts_set_default_uid(wopts, opts->uid);
iso_write_opts_set_default_gid(wopts, opts->gid); iso_write_opts_set_default_gid(wopts, opts->gid);
iso_write_opts_set_output_charset(wopts, opts->output_charset); iso_write_opts_set_output_charset(wopts, opts->output_charset);
#ifdef Libisoburn_no_fifO
iso_write_opts_set_fifo_size(wopts, fifo_chunks); iso_write_opts_set_fifo_size(wopts, fifo_chunks);
#endif /* Libisoburn_no_fifO */
if (new_img) { if (new_img) {
iso_write_opts_set_ms_block(wopts, 0); iso_write_opts_set_ms_block(wopts, 0);
@ -339,8 +374,9 @@ int isoburn_prepare_disc_aux(struct burn_drive *d, struct burn_disc **disc,
} }
if (nwa == 0 && state == BURN_DISC_APPENDABLE) { if (nwa == 0 && state == BURN_DISC_APPENDABLE) {
/* invalid nwa */ /* invalid nwa */
burn_msgs_submit(0x00060000, "Encountered 0 as next writeable address", 0, burn_msgs_submit(0x00060000,
"FAILURE", NULL); "Encountered 0 as next writeable address of appendable",
0, "FAILURE", NULL);
{ret= -4; goto ex;} {ret= -4; goto ex;}
} }
iso_write_opts_set_ms_block(wopts, nwa); iso_write_opts_set_ms_block(wopts, nwa);
@ -357,28 +393,13 @@ int isoburn_prepare_disc_aux(struct burn_drive *d, struct burn_disc **disc,
/* TODO check return values for failure. propertly clean-up on error */ /* TODO check return values for failure. propertly clean-up on error */
#ifdef Libisoburn_no_fifO
o->iso_source= wsrc; o->iso_source= wsrc;
#else
o->fifo = burn_fifo_source_new(wsrc, 2048, fifo_chunks, 0);
burn_source_free(wsrc);
if (o->fifo == NULL) {
burn_msgs_submit(0x00060000, "Cannot attach fifo", 0, "FATAL", NULL);
{ret= -1; goto ex;}
}
#endif /* ! Libisoburn_no_fifO */
*disc = burn_disc_create(); *disc = burn_disc_create();
session = burn_session_create(); session = burn_session_create();
burn_disc_add_session(*disc, session, BURN_POS_END); burn_disc_add_session(*disc, session, BURN_POS_END);
track = burn_track_create(); track = burn_track_create();
#ifdef Libisoburn_no_fifO
burn_track_set_source(track, o->iso_source); burn_track_set_source(track, o->iso_source);
#else
burn_track_set_source(track, o->fifo);
#endif /* ! Libisoburn_no_fifO */
burn_session_add_track(session, track, BURN_POS_END); burn_session_add_track(session, track, BURN_POS_END);
/* give up local references */ /* give up local references */
@ -409,8 +430,6 @@ int isoburn_prepare_new_image(struct burn_drive *d, struct burn_disc **disc,
ret= isoburn_prepare_disc_aux(d, disc, opts, 1); ret= isoburn_prepare_disc_aux(d, disc, opts, 1);
if (ret<=0) if (ret<=0)
return ret; return ret;
#ifdef Libisoburn_no_fifO
/* Hand over source reference for optional fifo status inquiry */ /* Hand over source reference for optional fifo status inquiry */
if(out_drive==NULL) if(out_drive==NULL)
return 1; return 1;
@ -424,8 +443,6 @@ int isoburn_prepare_new_image(struct burn_drive *d, struct burn_disc **disc,
burn_source_free(out_o->iso_source); burn_source_free(out_o->iso_source);
out_o->iso_source= in_o->iso_source; out_o->iso_source= in_o->iso_source;
in_o->iso_source= NULL; in_o->iso_source= NULL;
#endif /* Libisoburn_no_fifO */
return 1; return 1;
} }

View File

@ -10,13 +10,33 @@
#define Isoburn_includeD #define Isoburn_includeD
/* <<< transition macro */
#define Libisoburn_no_fifO 1
/* for uint8_t */ /* for uint8_t */
#include <stdint.h> #include <stdint.h>
/* For emulated TOC of overwriteable media.
Provides minimal info for faking a struct burn_toc_entry.
*/
struct isoburn_toc_entry {
int session;
int track_no; /* point */
int start_lba;
int track_blocks;
struct isoburn_toc_entry *next;
};
int isoburn_toc_entry_new(struct isoburn_toc_entry **objpt,
struct isoburn_toc_entry *boss, int flag);
/* @param flag bit0= delete all subordinates too
*/
int isoburn_toc_entry_destroy(struct isoburn_toc_entry **o, int flag);
/* Size of target_iso_head which is to be written during
isoburn_activate_session()
*/
#define Libisoburn_target_head_sizE (32*2048)
struct isoburn { struct isoburn {
@ -36,6 +56,15 @@ struct isoburn {
struct isoburn *next; struct isoburn *next;
/* If >= 0, this address is used as reply for isoburn_disc_get_msc1()
*/
int fabricated_msc1;
/* The nwa to be used for a first session on the present kind of overwriteable
media (usually Libisoburn_overwriteable_starT, but might be forced to 0)
*/
int zero_nwa;
/* Start address as given by image examination (bytes, not blocks) */ /* Start address as given by image examination (bytes, not blocks) */
off_t min_start_byte; off_t min_start_byte;
@ -51,11 +80,10 @@ struct isoburn {
*/ */
enum burn_disc_status fabricated_disc_status; enum burn_disc_status fabricated_disc_status;
#ifndef Libisoburn_no_fifO /* Eventual emulated table of content read from the chain of ISO headers
/* The fifo which is installed between track and libisofs burn_source on overwriteable media.
*/ */
struct burn_source *fifo; struct isoburn_toc_entry *toc;
#endif /* ! Libisoburn_no_fifO */
/* Indicator wether the most recent burn run worked : /* Indicator wether the most recent burn run worked :
-1 = undetermined, ask libburn , 0 = failure , 1 = success -1 = undetermined, ask libburn , 0 = failure , 1 = success
@ -66,17 +94,15 @@ struct isoburn {
/* Buffered ISO head from media (should that become part of /* Buffered ISO head from media (should that become part of
ecma119_read_opts ?) */ ecma119_read_opts ?) */
uint8_t target_iso_head[65536]; uint8_t target_iso_head[Libisoburn_target_head_sizE];
/* Libisofs image context */ /* Libisofs image context */
IsoImage *image; IsoImage *image;
#ifdef Libisoburn_no_fifO
/* The burn source which transfers data from libisofs to libburn. /* The burn source which transfers data from libisofs to libburn.
It has its own fifo. It has its own fifo.
*/ */
struct burn_source *iso_source; struct burn_source *iso_source;
#endif /* Libisoburn_no_fifO */
/* For iso_tree_set_report_callback() */ /* For iso_tree_set_report_callback() */
int (*read_pacifier)(IsoImage*, IsoFileSource*); int (*read_pacifier)(IsoImage*, IsoFileSource*);
@ -328,5 +354,69 @@ struct isoburn_imgen_opts {
int effective_lba; int effective_lba;
}; };
/* Alignment for session starts on overwriteable media.
(Increased from 16 to 32 blocks for aligning to BD-RE clusters.)
*/
#define Libisoburn_nwa_alignemenT 32
/* Alignment for outer session scanning with -ROM drives.
(E.g. my DVD-ROM drive shows any DVD type as 0x10 "DVD-ROM" with
more or less false capacity and TOC.)
*/
#define Libisoburn_toc_scan_alignemenT 16
/* Maximum gap to be bridged during a outer TOC scan. Gaps appear between the
end of a session and the start of the next session.
*/
#define Libisoburn_toc_scan_max_gaP 8192
/* Creating a chain of image headers which form a TOC:
The header of the first session is written after the LBA 0 header.
So it persists and can give the end of its session. By help of
Libisoburn_nwa_alignemenT it should be possible to predict the start
of the next session header.
The LBA 0 header is written by isoburn_activate_session() already
with the first session. So the media is mountable.
A problem arises with DVD-RW in Intermediate State. They cannot be
written by random access before they were written sequentially.
In this case, no copy of the session 1 header is maintained and no TOC
will be possible. Thus writing begins sequentially at LBA 0.
*/
#define Libisoburn_overwriteable_starT \
((off_t) (Libisoburn_target_head_sizE/2048))
/* Wrappers for emulation of TOC on overwriteable media */
struct isoburn_toc_track {
/* Either track or toc_entry are supposed to be NULL */
struct burn_track *track;
struct isoburn_toc_entry *toc_entry;
};
struct isoburn_toc_session {
/* Either session or tracks and toc_entry are supposed to be NULL */
struct burn_session *session;
struct isoburn_toc_track **track_pointers;
int track_count;
struct isoburn_toc_entry *toc_entry;
};
struct isoburn_toc_disc {
/* Either disc or sessions and toc are supposed to be NULL */
struct burn_disc *disc;
struct isoburn_toc_session *sessions; /* storage array */
struct isoburn_toc_session **session_pointers; /* storage array */
struct isoburn_toc_track *tracks; /* storage array */
struct isoburn_toc_track **track_pointers; /* storage array */
int session_count;
int track_count;
struct isoburn_toc_entry *toc;
};
#endif /* Isoburn_includeD */ #endif /* Isoburn_includeD */

View File

@ -6,12 +6,13 @@
/* /*
libisofs related functions of libisoburn. libisofs related functions of libisoburn.
Copyright 2007 Vreixo Formoso Lopes <metalpain2002@yahoo.es> Copyright 2007 - 2008 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Thomas Schmitt <scdbackup@gmx.net> Thomas Schmitt <scdbackup@gmx.net>
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdio.h>
#ifndef Xorriso_standalonE #ifndef Xorriso_standalonE
@ -26,7 +27,6 @@
#endif /* Xorriso_standalonE */ #endif /* Xorriso_standalonE */
#include "isoburn.h" #include "isoburn.h"
#include "libisoburn.h" #include "libisoburn.h"
@ -112,11 +112,11 @@ int isoburn_read_image(struct burn_drive *d,
struct isoburn_read_opts *read_opts, struct isoburn_read_opts *read_opts,
IsoImage **image) IsoImage **image)
{ {
int ret, int_num; int ret, int_num, dummy;
IsoReadOpts *ropts= NULL; IsoReadOpts *ropts= NULL;
IsoReadImageFeatures *features= NULL; IsoReadImageFeatures *features= NULL;
uint32_t ms_block; uint32_t ms_block;
char msg[160];
enum burn_disc_status status= BURN_DISC_BLANK; enum burn_disc_status status= BURN_DISC_BLANK;
IsoDataSource *ds= NULL; IsoDataSource *ds= NULL;
struct isoburn *o= NULL; struct isoburn *o= NULL;
@ -134,7 +134,7 @@ int isoburn_read_image(struct burn_drive *d,
status = isoburn_disc_get_status(d); status = isoburn_disc_get_status(d);
} }
if (d == NULL || status == BURN_DISC_BLANK || read_opts->pretend_blank) { if (d == NULL || status == BURN_DISC_BLANK || read_opts->pretend_blank) {
create_blank_image:;
/* /*
* Blank disc, we create a new image without files. * Blank disc, we create a new image without files.
*/ */
@ -182,6 +182,12 @@ int isoburn_read_image(struct burn_drive *d,
if (ret <= 0) if (ret <= 0)
return -2; return -2;
ms_block= int_num; ms_block= int_num;
ret = isoburn_read_iso_head(d, int_num, &dummy, NULL, 0);
if (ret <= 0) {
sprintf(msg, "No ISO 9660 image at LBA %d. Creating blank image.", int_num);
burn_msgs_submit(0x00060000, msg, 0, "WARNING", NULL);
goto create_blank_image;
}
/* create the data source */ /* create the data source */
ret = iso_read_opts_new(&ropts, 0); ret = iso_read_opts_new(&ropts, 0);
@ -200,6 +206,11 @@ int isoburn_read_image(struct burn_drive *d,
iso_read_opts_set_default_uid(ropts, read_opts->uid); iso_read_opts_set_default_uid(ropts, read_opts->uid);
iso_read_opts_set_default_gid(ropts, read_opts->gid); iso_read_opts_set_default_gid(ropts, read_opts->gid);
iso_read_opts_set_input_charset(ropts, read_opts->input_charset); iso_read_opts_set_input_charset(ropts, read_opts->input_charset);
/* <<< experimental API call of libisofs
iso_read_opts_set_error_behavior(ropts, 1);
*/
ds = isoburn_data_source_new(d); ds = isoburn_data_source_new(d);
iso_image_attach_data(o->image, o->read_pacifier_handle, iso_image_attach_data(o->image, o->read_pacifier_handle,
isoburn_idle_free_function); isoburn_idle_free_function);
@ -225,15 +236,6 @@ int isoburn_read_image(struct burn_drive *d,
read_opts->hasIso1999 = iso_read_image_features_has_iso1999(features); read_opts->hasIso1999 = iso_read_image_features_has_iso1999(features);
read_opts->hasElTorito = iso_read_image_features_has_eltorito(features); read_opts->hasElTorito = iso_read_image_features_has_eltorito(features);
read_opts->size = iso_read_image_features_get_size(features); read_opts->size = iso_read_image_features_get_size(features);
#ifdef NIX
read_opts->hasRR = features->hasRR;
read_opts->hasJoliet = features->hasJoliet;
read_opts->hasIso1999 = features->hasIso1999;
read_opts->hasElTorito = features->hasElTorito;
read_opts->size = features->size;
#endif
iso_read_image_features_destroy(features); iso_read_image_features_destroy(features);
return 1; return 1;
} }
@ -276,11 +278,13 @@ int isoburn_activate_session(struct burn_drive *drive)
if (o->emulation_mode != 1) if (o->emulation_mode != 1)
return 1; /* don't need to activate session */ return 1; /* don't need to activate session */
if (o->fabricated_disc_status != BURN_DISC_APPENDABLE) if (!(o->fabricated_disc_status == BURN_DISC_APPENDABLE ||
(o->fabricated_disc_status == BURN_DISC_BLANK &&
o->zero_nwa > 0)))
return 1; return 1;
ret = burn_random_access_write(drive, 0, (char*)o->target_iso_head, ret = burn_random_access_write(drive, (off_t) 0, (char*)o->target_iso_head,
32*2048, 1); Libisoburn_target_head_sizE, 1);
return ret; return ret;
} }
@ -311,7 +315,7 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
/* we can assume 0 as start block for image */ /* we can assume 0 as start block for image */
/* TODO what about ms? where we validate valid iso image in ms disc? */ /* TODO what about ms? where we validate valid iso image in ms disc? */
ret = burn_read_data(drive, (off_t) 0, (char*)o->target_iso_head, ret = burn_read_data(drive, (off_t) 0, (char*)o->target_iso_head,
sizeof(o->target_iso_head), &data_count, 2); (off_t) Libisoburn_target_head_sizE, &data_count, 2);
/* an error means an empty disc */ /* an error means an empty disc */
if (ret <= 0) { if (ret <= 0) {
@ -321,7 +325,7 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
/* check first 64K. If 0's, the disc is treated as a blank disc, and thus /* check first 64K. If 0's, the disc is treated as a blank disc, and thus
overwritten without extra check. */ overwritten without extra check. */
i = sizeof(o->target_iso_head); i = Libisoburn_target_head_sizE;
while (i && !o->target_iso_head[i-1]) while (i && !o->target_iso_head[i-1])
--i; --i;
@ -351,7 +355,7 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
} else if (!strncmp((char*)pvm->std_identifier, "CDXX1", 5)) { } else if (!strncmp((char*)pvm->std_identifier, "CDXX1", 5)) {
/* empty image */ /* empty image */
isoburn_set_start_byte(o, (off_t) 0, 0); isoburn_set_start_byte(o, o->zero_nwa * 2048, 0);
o->fabricated_disc_status= BURN_DISC_BLANK; o->fabricated_disc_status= BURN_DISC_BLANK;
} else { } else {
/* treat any disc in an unknown format as full */ /* treat any disc in an unknown format as full */

View File

@ -188,7 +188,7 @@ void isoburn_version(int *major, int *minor, int *micro);
*/ */
#define isoburn_libisofs_req_major 0 #define isoburn_libisofs_req_major 0
#define isoburn_libisofs_req_minor 6 #define isoburn_libisofs_req_minor 6
#define isoburn_libisofs_req_micro 3 #define isoburn_libisofs_req_micro 4
/** The minimum version of libburn to be used with this version of libisoburn /** The minimum version of libburn to be used with this version of libisoburn
at compile time. at compile time.
@ -196,7 +196,7 @@ void isoburn_version(int *major, int *minor, int *micro);
*/ */
#define isoburn_libburn_req_major 0 #define isoburn_libburn_req_major 0
#define isoburn_libburn_req_minor 4 #define isoburn_libburn_req_minor 4
#define isoburn_libburn_req_micro 4 #define isoburn_libburn_req_micro 8
/** The minimum version of libisofs to be used with this version of libisoburn /** The minimum version of libisofs to be used with this version of libisoburn
@ -232,7 +232,7 @@ int isoburn_libburn_req(int *major, int *minor, int *micro);
*/ */
#define isoburn_header_version_major 0 #define isoburn_header_version_major 0
#define isoburn_header_version_minor 1 #define isoburn_header_version_minor 1
#define isoburn_header_version_micro 3 #define isoburn_header_version_micro 6
/** Note: /** Note:
Above version numbers are also recorded in configure.ac because libtool Above version numbers are also recorded in configure.ac because libtool
wants them as parameters at build time. wants them as parameters at build time.
@ -330,6 +330,10 @@ int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[],
bit1= regard overwriteable media as blank bit1= regard overwriteable 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 read-only profile try to read
table of content by scanning for ISO image headers.
(depending on media type and drive this might
help or it might make the resulting toc even worse)
@return 1 = success , 0 = drive not found , <0 = other error @return 1 = success , 0 = drive not found , <0 = other error
*/ */
int isoburn_drive_aquire(struct burn_drive_info *drive_infos[], int isoburn_drive_aquire(struct burn_drive_info *drive_infos[],
@ -381,6 +385,160 @@ int isoburn_disc_erasable(struct burn_drive *d);
void isoburn_disc_erase(struct burn_drive *drive, int fast); void isoburn_disc_erase(struct burn_drive *drive, int fast);
/** Program isoburn_disc_get_msc1() to return a fabricated value.
This makes only sense between aquiring the drive and reading the
image. After isoburn_read_image() it will confuse the coordination
of libisoburn and libisofs.
Note: Sessions and tracks are counted beginning with 1, not with 0.
@since 0.1.6
@param drive The drive where msc1 is to be set
@param adr_mode Determines how to interpret adr_value and to set msc1.
If adr_value shall represent a number then decimal ASCII
digits are expected.
0= start lba of last session in TOC, ignore adr_value
1= start lba of session number given by adr_value
2= start lba of track given number by adr_value
3= adr_value itself is the lba to be used
4= start lba of last session with volume id
given by adr_value
@parm adr_value A string describing the value to be eventually used.
@param flag Bitfield for control purposes. Unused yet. Submit 0.
*/
int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
int flag);
/* ----------------------------------------------------------------------- */
/*
Wrappers for emulation of TOC on overwriteable media
Media which match the overwriteable usage model lack of a history of sessions
and tracks. libburn will not even hand out a burn_disc object for them and
always declare them blank. libisoburn checks for a valid ISO filesystem
header at LBA 0 and eventually declares them appendable.
Nevertheless one can only determine an upper limit of the size of the overall
image (by isoburn_get_min_start_byte()) but not a list of stored sessions
and their LBAs, as it is possible with true multi-session media.
The following wrappers add the capability to obtain a session and track TOC
from emulated multi-session images on overwriteables if the first session
was written by libisoburn-0.1.6 or later (i.e. with a header copy at LBA 32).
Be aware that the structs emitted by these isoburn calls are not compatible
with the libburn structs. I.e. you may use them only with isoburn_toc_*
calls.
isoburn_toc_disc needs to be freed after use. isoburn_toc_session and
isoburn_toc_track vanish together with their isoburn_toc_disc.
*/
/* Opaque handles to media, session, track */
struct isoburn_toc_disc;
struct isoburn_toc_session;
struct isoburn_toc_track;
/** Obtain a master handle for the table of content.
This handle governs allocated resources which have to be released by
isoburn_toc_disc_free() when no longer needed.
Wrapper for: burn_drive_get_disc()
@since 0.1.6
@param drive The drive with the media to inspect
@return NULL in case there is no content info, else it is a valid handle
*/
struct isoburn_toc_disc *isoburn_toc_drive_get_disc(struct burn_drive *d);
/** Tell the number of 2048 byte blocks covered by the table of content.
Wrapper for: burn_disc_get_sectors()
@since 0.1.6
@param disc The master handle of the media
@return number of blocks, <=0 indicates unknown or unreadable state
*/
int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc);
/** Get the array of session handles from the table of content.
Wrapper for: burn_disc_get_sessions()
@since 0.1.6
@param disc The master handle of the media
@param num returns the number of sessions in the array
@return the address of the array of session handles
*/
struct isoburn_toc_session **isoburn_toc_disc_get_sessions(
struct isoburn_toc_disc *disc, int *num);
/** Tell the number of 2048 byte blocks covered by a particular session.
Wrapper for: burn_session_get_sectors()
@since 0.1.6
@param s The session handle
@return number of blocks, <=0 indicates unknown or unreadable state
*/
int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s);
/** Obtain a copy of the entry which describes the end of a particular session.
Wrapper for: burn_session_get_leadout_entry()
@since 0.1.6
@param s The session handle
@param entry A pointer to memory provided by the caller. It will be filled
with info according to struct burn_toc_entry as defined
in libburn.h
*/
void isoburn_toc_session_get_leadout_entry(struct isoburn_toc_session *s,
struct burn_toc_entry *entry);
/** Get the array of track handles from a particular session.
Wrapper for: burn_session_get_tracks()
@since 0.1.6
@param s The session handle
@param num returns the number of tracks in the array
@return the address of the array of track handles
*/
struct isoburn_toc_track **isoburn_toc_session_get_tracks(
struct isoburn_toc_session *s, int *num);
/** Obtain a copy of the entry which describes a particular itrack.
Wrapper for: burn_track_get_entry()
@since 0.1.6
@param s The track handle
@param entry A pointer to memory provided by the caller. It will be filled
with info according to struct burn_toc_entry as defined
in libburn.h
*/
void isoburn_toc_track_get_entry(struct isoburn_toc_track *t,
struct burn_toc_entry *entry);
/** Release the memory associated with a master handle of media.
The handle is invalid afterwards and may not be used any more.
Wrapper for: burn_disc_free()
@since 0.1.6
@param disc The master handle of the media
*/
void isoburn_toc_disc_free(struct isoburn_toc_disc *disc);
/** Try whether at the data at the given address look like a ISO 9660
image header and obtain its alleged size. Depending on the info mode
one other string of text information can be retrieved too.
@since 0.1.6
@param drive The drive with the media to inspect
@param lba The block number from where to read
@param image_blocks The number of 2048 bytes blocks
@param info Caller provided memory, enough to take eventual info reply
@param flag bit0-7: info return mode
0= do not return anything in info (do not even touch it)
1= return volume id (info needs 33 bytes)
@return 1 seems to be a valid ISO image , 0 format not recognized, <0 error
*/
int isoburn_read_iso_head(struct burn_drive *d, int lba,
int *image_blocks, char *info, int flag);
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/* /*

View File

@ -4,7 +4,7 @@
xorriso. By Thomas Schmitt <scdbackup@gmx.net> xorriso. By Thomas Schmitt <scdbackup@gmx.net>
Integrated sub project of libburnia-project.org but also published via: Integrated sub project of libburnia-project.org but also published via:
http://scdbackup.sourceforge.net/xorriso_eng.html http://scdbackup.sourceforge.net/xorriso_eng.html
http://scdbackup.sourceforge.net/xorriso-0.1.3.tar.gz http://scdbackup.sourceforge.net/xorriso-0.1.6.pl00.tar.gz
Copyright (C) 2006-2008 Thomas Schmitt, provided under GPL version 2. Copyright (C) 2006-2008 Thomas Schmitt, provided under GPL version 2.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
@ -35,10 +35,10 @@ The tarball contains anything that is needed except libc and libpthread.
libreadline and the readline-dev headers will make dialog mode more convenient, libreadline and the readline-dev headers will make dialog mode more convenient,
but are not mandatory. but are not mandatory.
Obtain xorriso-0.1.3.tar.gz, take it to a directory of your choice and do: Obtain xorriso-0.1.6.pl00.tar.gz, take it to a directory of your choice and do:
tar xzf xorriso-0.1.3.tar.gz tar xzf xorriso-0.1.6.pl00.tar.gz
cd xorriso-0.1.3 cd xorriso-0.1.6
Within that directory execute: Within that directory execute:
@ -160,13 +160,9 @@ and a matching dynamically linked xorriso binary.
This binary is leaner but depends on properly installed libraries of suitable This binary is leaner but depends on properly installed libraries of suitable
revision. revision.
WARNING: There is no libisoburn-0.1.2 suitable for dynamic linking because Dynamic library and compile time header requirements for libisoburn-0.1.6 :
libisoburn-0.1.1 uses features of libisofs-0.6.3 of which the API/ABI is - libburn.so.4 , version libburn-0.4.8 or higher
not decared frozen yet. - libisofs.so.6 , version libisofs-0.6.4 or higher
Dynamic library and compile time header requirements for libisoburn-0.1.3 :
- libburn.so.4 , version libburn-0.4.2 or higher
- libisofs.so.6 , version libisofs-0.6.3 or higher
libisoburn and xorriso will not start with libraries which are older than their libisoburn and xorriso will not start with libraries which are older than their
headers seen at compile time. So compile in the oldest possible installation headers seen at compile time. So compile in the oldest possible installation
setup unless you have reason to enforce a newer bug fix level. setup unless you have reason to enforce a newer bug fix level.

View File

@ -2040,7 +2040,7 @@ xorriso/make_xorriso_standalone.sh
xorriso/configure_ac.txt xorriso/configure_ac.txt
Version leap to xorriso-0.1.2 Version leap to xorriso-0.1.2
------------------------------------ cycle - xorriso-0.1.2 - 2008.03. ---------------------------------- release - xorriso-0.1.2 - 2008.03.12.100001
* Bug fix: -report_about HINT or higher did not report at all * Bug fix: -report_about HINT or higher did not report at all
* Bug fix: speed=number without unit or media type letter was always CD speed * Bug fix: speed=number without unit or media type letter was always CD speed
* Bug fix: it was possible to write to appendable media which was not -indev * Bug fix: it was possible to write to appendable media which was not -indev
@ -2073,9 +2073,571 @@ Version leap to 0.1.3
------------------------------------ cycle - xorriso-0.1.3 - 2008.03.12.130605 ------------------------------------ cycle - xorriso-0.1.3 - 2008.03.12.130605
12 Mar 2008 [XorrisoZeroOneTwo ] [] 12 Mar 2008 [XorrisoZeroOneTwo 1628] [1629]
xorriso/changelog.txt xorriso/changelog.txt
Document changes and release timestamp Documented changes and release timestamp
2008.03.19.081837 [1637]
xorriso/xorriso.c
Bug fix: -as mkisofs -nopad must be -no-pad
19 Mar 2008 [1638]
xorriso/xorriso.1
Added a hint about alternating media with -update_r
------------------------------------ cycle - xorriso-0.1.3 - 2008.03.19.081837
* Bug fix: -as mkisofs -no-pad was misspelled -nopad
20 Mar 2008 [1639]
xorriso/README
Added -commit_eject all to an example which involves mount
2008.03.20.192317 [1640]
xorriso/xorriso.c
Changed messages of -update and -update_r
2008.03.20.210522 [1641]
xorriso/xorriso_private.h
xorriso/xorriso.c
xorriso/xorrisoburn.c
Better handling of attempt to manipulate non-existent ISO image
2008.03.22.130031 [1642]
xorriso/xorriso_private.h
xorriso/xorriso.c
xorriso/xorrisoburn.h
xorriso/xorrisoburn.c
Working towards coordination of -compare, -update and -cut_out
2008.03.22.130128 [1643]
xorriso/xorrisoburn.c
Bug fix: Implicite directory attribute copying with -cut_out was wrong
------------------------------------ cycle - xorriso-0.1.3 - 2008.03.22.130128
* Bug fix: Implicite directory attribute copying with -cut_out was wrong
22 Mar 2008 [1644]
xorriso/xorriso.1
Correction about Linux mount which does not accept session= with DVD.
2008.03.25.170747 [1645]
xorriso/xorriso_private.h
xorriso/xorriso.c
xorriso/xorrisoburn.h
xorriso/xorrisoburn.c
Working towards coordination of -compare, -update and -cut_out
2008.03.26.092120 [1646]
xorriso/xorrisoburn.c
Gave up obsoleted macros and their code branches
2008.03.27.103344 [1647]
xorriso/xorriso.c
xorriso/xorrisoburn.c
Working towards coordination of -update and -cut_out
27 Mar 2008 [1648]
xorriso/xorriso.1
Published coordination rules for -cut_out, -compare and -update
2008.03.29.164038 [1649]
xorriso/xorriso_private.h
xorriso/xorriso.h
xorriso/xorriso.c
xorriso/xorrisoburn.h
xorriso/xorrisoburn.c
xorriso/xorriso.1
New option -split_size, automated splitting of oversized files
------------------------------------ cycle - xorriso-0.1.3 - 2008.03.29.164038
* Coordination of -cut_out, -compare and -update
* New option -split_size, automated splitting of oversized files
2008.03.31.081347 [1650]
xorriso/xorriso.c
xorriso/xorriso.1
Adjusted documentation of -split_size
2008.04.01.213121 [1652]
libisoburn/data_source.c
Replaced single 128 kB cache tile by 32 tiles of 64 kB each
2 Apr 2008 [1653]
COPYRIGHT
Corrected GPL version
------------------------------------ cycle - xorriso-0.1.3 - 2008.04.03.074309
* Improved performance with reading directory trees
2008.04.03.204051 [1657]
libisoburn/libisoburn.h
libisoburn/isoburn.h
libisoburn/isoburn.c
xorriso/xorriso_private.h
xorriso/xorriso.c
xorriso/xorrisoburn.c
xorriso/xorriso.1
New option -session_log
5 Apr 2008 [1658]
xorriso/xorriso.1
Mentioned that drives close full media automatically
2008.04.05.112055 [1659]
xorriso/xorrisoburn.c
Reporting amount of non-data with -toc media summary
5 Apr 2008 [1660]
xorriso/xorriso_eng.html
Mentioned new features
------------------------------------ cycle - xorriso-0.1.3 - 2008.04.05.112055
* New option -session_log
2008.04.07.185727 [1662]
xorriso/xorriso.h
Added prototype of Xorriso_option_session_log()
2008.04.07.201253 [1664]
xorriso/xorriso.c
xorriso/xorrisoburn.c
Removed some unused code
8 Apr 2008 [1677]
xorriso/configure_ac.txt
Followed version leaps of libburn
2008.04.08.153508 [1678]
libisoburn/libisoburn.h
xorriso/xorrisoburn.c
Made libisoburn and xorriso require libburn >= 0.4.4
2008.04.09.114815 [1679]
xorriso/xorriso.c
xorriso/xorrisoburn.c
Corrected behavior around image data read error
2008.04.12.112159 [1682]
xorriso/xorriso.c
Changed behavior of -commit_eject ""
2008.04.18.184517 [1690]
libisoburn/data_source.c
Restricted ds_read_block() messages about unreadable data to actual data block
2008.04.20.111054 [1692]
libisoburn/data_source.c
Corrected maximum age value for read buffer tiles
20 Apr 2008 [1693]
xorriso/xorriso.1
Mentioned stdin with option -path_list
2008.04.20.111419 [1694]
libisoburn/burn_wrap.c
xorriso/xorrisoburn.c
Displaying free space rather than "non-data" on drive aquiry and -toc
28 Apr 2008 [1709]
xorriso/configure_ac.txt
Updated libisofs version number in xorriso-standalone
------------------------------------ cycle - xorriso-0.1.3 - 2008.04.28.082539
* Now depending on libisofs-0.6.4
2008.04.28.120001 [branch 1711]
configure.ac
README
libisoburn/libisoburn.h (isoburn_header_version_*)
xorriso/README
xorriso/xorriso_timestamp.h
xorriso/xorriso_private.h
xorriso/xorrisoburn.h (xorriso_libisoburn_req_*)
xorriso/xorriso_eng.html
xorriso/make_xorriso_standalone.sh
xorriso/configure_ac.txt
Version leap to 0.1.4
28 Apr 2008 [branch 1712]
xorriso/changelog.txt
Documented changes and release timestamp
---------------------------------- release - xorriso-0.1.4 - 2008.04.28.120001
* Bug fix: -as mkisofs -no-pad was misspelled -nopad
* Bug fix: Implicite directory attribute copying with -cut_out was wrong
* Coordination of -cut_out, -compare and -update
* New option -split_size, automated splitting of oversized files
* Improved performance with reading directory trees
* New option -session_log
* Dynamically linkable with release version 0.6.4 of libisofs
2008.04.28.122244 [1713]
configure.ac
README
libisoburn/libisoburn.h (isoburn_header_version_*)
xorriso/README
xorriso/xorriso_timestamp.h
xorriso/xorriso_private.h
xorriso/xorrisoburn.h (xorriso_libisoburn_req_*)
xorriso/xorriso_eng.html
xorriso/make_xorriso_standalone.sh
xorriso/configure_ac.txt
Version leap to 0.1.5
28 Apr 2008 [1714]
xorriso/changelog.txt
Documented changes and release timestamp
------------------------------------ cycle - xorriso-0.1.5 - 2008.04.28.122244
2008.05.01.124248 [1716]
libisoburn/isofs_wrap.c
xorriso/xorriso.h
xorriso/xorriso_private.h
xorriso/xorriso.c
xorriso/xorrisoburn.c
xorriso/xorriso.1
New option -error_behavior with a first occasion 'image_loading'
1 May 2008 [1717]
xorriso/convert_man_to_html.sh
Fine tuning of HTML man page appearance
1 May 2008 [1718]
xorriso/xorriso.1
Clarified "best_effort" behavior
2008.05.01.135421 [1719]
libisoburn/data_source.c
Adjusted ds_read_block() to inofficial libisofs expectations
2008.05.01.174110 [1720]
libisoburn/data_source.c
Adjusted ds_read_block() to inofficial libisofs expectations
2008.05.02.072505 [1721]
libisoburn/data_source.c
Adjusted ds_read_block() to inofficial libisofs expectations
2008.05.02.204942 [1722]
xorriso/xorriso_private.h
xorriso/xorriso.h
xorriso/xorriso.c
xorriso/xorrisoburn.c
Working towards exclusion of user defined absolute paths and leaf patterns
2008.05.03.151106 [1724]
xorriso/xorriso_private.h
xorriso/xorriso.c
xorriso/xorrisoburn.c
Working towards exclusion of user defined absolute paths and leaf patterns
2008.05.03.223204 [1725]
xorriso/xorriso_private.h
xorriso/xorriso.c
xorriso/xorrisoburn.c
Working towards exclusion of user defined absolute paths and leaf patterns
2008.05.04.133525 [1726]
xorriso/xorriso.c
xorriso/xorriso.1
New options -not_paths, -not_leaf, -not_list, -not_mgt, -as mkisofs -m
4 May 2008 [1727]
xorriso/xorriso_eng.html
xorriso/changelog.txt
Mentioned new options
------------------------------------ cycle - xorriso-0.1.5 - 2008.05.04.133525
* New option -error_behavior with a first occasion 'image_loading'
* New options -not_paths, -not_leaf, -not_list, -not_mgt, -as mkisofs -m
2008.05.05.210317 [1728]
xorriso/xorrisoburn.c
After formatting DVD-RW write 128 MB and close track to end Intermediate State
2008.05.06.084439 [1731]
xorriso/xorrisoburn.c
Calling isoburn_cancel_prepared_write() after failed isoburn_disc_write()
2008.05.06.144606 [1732]
libisoburn/isoburn.h
libisoburn/isoburn.c
libisoburn/isofs_wrap.c
libisoburn/burn_wrap.c
Experiment for TOC on overwriteables: Keep a target_head copy of session #1
2008.05.07.071427 [1737]
libisoburn/isoburn.h
libisoburn/isoburn.c
libisoburn/burn_wrap.c
libisoburn/isofs_wrap.c
Removed some outdated ifdef cases
2008.05.07.175508 [1738]
libisoburn/libisoburn.h
libisoburn/isoburn.h
libisoburn/burn_wrap.c
Reading emulated toc info from overwriteable media, new API isoburn_toc_*()
2008.05.07.175640 [1739]
xorriso/xorrisoburn.c
Making use of new isoburn_toc_* functions
2008.05.07.214343 [1740]
libisoburn/libisoburn.h
libisoburn/burn_wrap.c
New API function isoburn_read_iso_head()
2008.05.07.214442 [1741]
xorriso/xorrisoburn.c
New format with -toc is more concise and shows volume id
2008.05.08.141054 [1742]
libisoburn/libisoburn.h
libisoburn/isoburn.h
libisoburn/burn_wrap.c
Try to read header chain from alleged -ROM media (e.g. DVD+RW in -ROM drive)
2008.05.08.141920 [1743]
xorriso/xorriso.h
xorriso/xorriso_private.h
xorriso/xorriso.c
xorriso/xorrisoburn.c
xorriso/xorriso.1
xorriso/xorriso_eng.html
New TOC layout with volume id and sbsector=, new option -rom_toc_scan
8 May 2008 [1744]
xorriso/xorriso_eng.html
Mentioned new features
------------------------------------ cycle - xorriso-0.1.5 - 2008.05.08.141920
* Emulated TOC on overwriteable media
* New TOC layout with volume id and sbsector=
* New option -rom_toc_scan
2008.05.08.185350 [1745]
libisoburn/isoburn.h
libisoburn/isoburn.c
libisoburn/burn_wrap.c
Adjusted reply of isoburn_disc_get_msc1() to eventual -rom_toc_scan result
8 May 2008 [1746]
xorriso/xorriso.1
Updated man page examples
8 May 2008 [1747]
xorriso/xorriso.1
Updated man page examples
------------------------------------ cycle - xorriso-0.1.5 - 2008.05.08.205551
9 May 2008 [1751]
xorriso/xorriso_eng.html
Updated details in web page
2008.05.09.205517 [1752]
libisoburn/isofs_wrap.c
Trying to better handle non ISO images on -indev
10 May 2008 [1761]
xorriso/configure_ac.txt
Adapted xorriso standalone production to new libburn cycle 0.4.7
10 May 2008 [1762]
xorriso/xorriso.1
xorriso/xorriso_eng.html
Minor change in -update_r example
2008.05.10.194336 [1763]
xorriso/xorrisoburn.h
xorriso/xorrisoburn.c
xorriso/xorriso.c
Better behavior of update_r with no image present
2008.05.12.080812 [1765]
configure.ac
libisoburn/libisoburn.h
Switched requirements to libburn-0.4.6
2008.05.12.081331 [1766]
libisoburn/libisoburn.h
libisoburn/burn_wrap.c
New API call isoburn_set_msc1()
2008.05.12.082733 [1767]
xorriso/xorriso_private.h
xorriso/xorriso.c
xorriso/xorrisoburn.c
xorriso/xorriso.1
xorriso/xorriso_eng.html
New option -load session|track|sbsector|volid
------------------------------------ cycle - xorriso-0.1.5 - 2008.05.12.082733
* New option -load session|track|sbsector|volid
* Now depending on libburn-0.4.6
2008.05.12.193341 [1768]
libisoburn/burn_wrap.c
Reacted on harmless compiler warning
2008.05.12.193642 [1769]
xorriso/xorriso.c
xorriso/xorrisoburn.h
xorriso/xorrisoburn.c
xorriso/xorriso.1
New -blank and -format modes as_needed
2008.05.13.115901 [1770]
xorriso/xorriso.h
xorriso/xorriso.c
xorriso/xorrisoburn.h
xorriso/xorrisoburn.c
xorriso/xorriso.1
xorriso/xorriso_eng.html
New option -list_formats
2008.05.13.135251 [1771]
libisoburn/isoburn.h
libisoburn/isoburn.c
libisoburn/isofs_wrap.c
libisoburn/burn_wrap.c
xorriso/xorrisoburn.c
xorriso/xorriso.1
Corrected strange behavior with non-ISO images on overwriteable media
2008.05.13.153837 [1772]
xorriso/xorrisoburn.c
Prepared Xorriso_get_profile() for potential call without flag bit1
2008.05.13.180624 [1773]
xorriso/xorrisoburn.c
Handled -list_format with non MMC drives
2008.05.13.180912 [1774]
xorriso/xorriso.h
xorriso/xorriso.c
xorriso/xorriso.1
Eat up leading dashes with command options, convert inner dashes to underscores
------------------------------------ cycle - xorriso-0.1.5 - 2008.05.13.180912
* New -blank and -format modes as_needed
* New option -list_formats
2008.05.14.114548 [1775]
xorriso/xorriso.c
xorriso/xorrisoburn.c
xorriso/xorriso.1
New -format types by_index and fast_by_index
2008.05.14.173201 [1779]
configure.ac
libisoburn/libisoburn.h
Required libburn version is now 0.4.7 (because of DVD-RAM BD-RE bug fix)
2008.05.14.173430 [1780]
xorriso/xorrisoburn.c
Automatic fast format on attempt to write to unformatted DVD-RAM or BD-RE
2008.05.14.174846 [1781]
xorriso/xorriso_private.h
Uploaded forgotten enhancements
2008.05.15.092028 [1783]
xorriso/xorriso.c
Enabled a pacifier for compare_r
2008.05.15.150041 [1784]
xorriso/xorriso.h
xorriso/xorriso.c
xorriso/xorrisoburn.c
xorriso/xorriso.1
xorriso/xorriso_eng.html
New options -map and -map_single
2008.05.15.192118 [1785]
xorriso/xorriso.c
Bug fix: -update_r and others did not work properly with relative paths
------------------------------------ cycle - xorriso-0.1.5 -
* New options -map and -map_single
* Bug fix: -update_r and others did not work properly with relative paths
2008.05.17.162753 [1794]
xorriso/xorriso.c
xorriso/xorrisoburn.c
Corrected ugly message with -update_r and root directory
2008.05.17.170001 [1796]
configure.ac
README
libisoburn/libisoburn.h
xorriso/README
xorriso/xorriso_timestamp.h
xorriso/xorriso_private.h
xorriso/xorrisoburn.h
xorriso/xorriso_eng.html
xorriso/make_xorriso_standalone.sh
xorriso/configure_ac.txt
Version leap to 0.1.6, requiring libburn-0.4.8 now
2008.05.18.070001 [1797]
xorriso/xorriso.c
xorriso/xorrisoburn.c
Bug fix: -findi operated on nodes which ceased existence shortly before
18 May 2008 []
xorriso/changelog.txt
Documented changes and release timestamp
---------------------------------- release - xorriso-0.1.6 - 2008.05.18.070001
* New option -error_behavior with a first occasion 'image_loading'
* New options -not_paths, -not_leaf, -not_list, -not_mgt, -as mkisofs -m
* Emulated TOC on overwriteable media
* New TOC layout with volume id and sbsector=
* New option -rom_toc_scan
* New option -load session|track|sbsector|volid
* Now depending on libburn-0.4.6
* New -blank and -format modes as_needed
* New option -list_formats
* New options -map and -map_single
* Bug fix: -update_r and others did not work properly with relative paths
* Bug fix: -findi operated on nodes which ceased existence shortly before
2008.05.18.082208 [1798]
xorriso/xorriso.c
xorriso/xorrisoburn.c
Bug fix: -findi operated on nodes which ceased existence shortly before
[]
configure.ac
README
libisoburn/libisoburn.h
xorriso/README
xorriso/xorriso_timestamp.h
xorriso/xorriso_private.h
xorriso/xorrisoburn.h
xorriso/xorriso_eng.html
xorriso/make_xorriso_standalone.sh
xorriso/configure_ac.txt
xorriso/changelog.txt
Version leap to 0.1.7, requiring libburn-0.4.8 now
------------------------------------ cycle - xorriso-0.1.7 - 2008.05.18.
------------------------------------ cycle - xorriso-0.1.7 -
------------------------------------ cycle - xorriso-0.1.7 -
=============================================================================== ===============================================================================
TODO TODO
@ -2085,25 +2647,14 @@ Document changes and release timestamp
------------------------------------------------- important ------------------------------------------------- important
- improved read performance: make Xorriso_prescan_args() safe against misunderstandings
> libisoburn/data_source.c: ds_read_block()
- multi-tile cache for image data reading
- pacifier for -compare_r : try read pacifier without newline
------------------------------------------------- development ------------------------------------------------- development
- report LBA of session start after writing, have LBA log file
- evaluate possibility of emulated session table on overwriteables
- mkisofs,cdrecord multi session - mkisofs,cdrecord multi session
- -restore - -restore
??? -compare_l -update_l /disk_path_start iso_rr_path_start path[s] -- ??? -compare_l -update_l /disk_path_start iso_rr_path_start path[s] --
??? backup area shaping with -yes -not for -compare_r and -update_r ?
- Make use of iso_tree_add_new_node() in Xorriso_tree_graft_node()
> Relative addressing and pattern matching : > Relative addressing and pattern matching :
@ -2131,12 +2682,6 @@ Document changes and release timestamp
- Introduce an interrupt key for dialog - Introduce an interrupt key for dialog
-------------------------------------------- jump to libburn 0.4.4
- make use of burn_sev_to_text() in libisoburn and xorriso
- If iso_msgs_submit() : use it in isoburn_report_iso_error()
=============================================================================== ===============================================================================
This is the dirty end of the todo list. This is the dirty end of the todo list.

View File

@ -1,4 +1,4 @@
AC_INIT([xorriso], [0.1.3], [http://libburnia-project.org]) AC_INIT([xorriso], [0.1.6], [http://libburnia-project.org])
AC_PREREQ([2.50]) AC_PREREQ([2.50])
dnl AC_CONFIG_HEADER([config.h]) dnl AC_CONFIG_HEADER([config.h])
@ -9,7 +9,7 @@ AM_INIT_AUTOMAKE([subdir-objects])
BURN_MAJOR_VERSION=0 BURN_MAJOR_VERSION=0
BURN_MINOR_VERSION=4 BURN_MINOR_VERSION=4
BURN_MICRO_VERSION=5 BURN_MICRO_VERSION=9
AC_SUBST(BURN_MAJOR_VERSION) AC_SUBST(BURN_MAJOR_VERSION)
AC_SUBST(BURN_MINOR_VERSION) AC_SUBST(BURN_MINOR_VERSION)
AC_SUBST(BURN_MICRO_VERSION) AC_SUBST(BURN_MICRO_VERSION)

View File

@ -70,6 +70,8 @@ then
-e 's/<b>Drive and media related inquiry actions:<\/b>/\&nbsp;<BR><b>Drive and media related inquiry actions:<\/b><BR>\&nbsp;<BR>/' \ -e 's/<b>Drive and media related inquiry actions:<\/b>/\&nbsp;<BR><b>Drive and media related inquiry actions:<\/b><BR>\&nbsp;<BR>/' \
-e 's/<b>Navigation in ISO image/\&nbsp;<BR><b>Navigation in ISO image/' \ -e 's/<b>Navigation in ISO image/\&nbsp;<BR><b>Navigation in ISO image/' \
-e 's/^filesystem:<\/b>/filesystem:<\/b><BR>\&nbsp;<BR>/' \ -e 's/^filesystem:<\/b>/filesystem:<\/b><BR>\&nbsp;<BR>/' \
-e 's/<b>Command compatibility emulations:<\/b>/\&nbsp;<BR><b>Command compatibility emulations:<\/b><BR>\&nbsp;<BR>/' \
-e 's/^<p><b>&minus;as</<p>\&nbsp;<BR><b>\&minus;as</' \
-e 's/<b>Scripting, dialog and/\&nbsp;<BR><b>Scripting, dialog and/' \ -e 's/<b>Scripting, dialog and/\&nbsp;<BR><b>Scripting, dialog and/' \
-e 's/^features:<\/b>/features:<\/b><BR>\&nbsp;<BR>/' \ -e 's/^features:<\/b>/features:<\/b><BR>\&nbsp;<BR>/' \
-e 's/<b>Support for frontend/\&nbsp;<BR><b>Support for frontend/' \ -e 's/<b>Support for frontend/\&nbsp;<BR><b>Support for frontend/' \

View File

@ -25,11 +25,11 @@
current_dir=$(pwd) current_dir=$(pwd)
lone_dir="$current_dir"/"xorriso-standalone" lone_dir="$current_dir"/"xorriso-standalone"
xorriso_rev=0.1.3 xorriso_rev=0.1.6
# For unstable uploads: # For unstable uploads:
xorriso_pl="" # xorriso_pl=""
# For stable releases: # For stable releases:
# xorriso_pl=".pl00" xorriso_pl=".pl00"
with_bootstrap_tarball=1 with_bootstrap_tarball=1

View File

@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH XORRISO 1 "April, 3, 2008" .TH XORRISO 1 "May, 15, 2008"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -144,11 +144,13 @@ There are two families of media in the MMC standard:
.br .br
\fBMulti-session\fR media are CD-R, CD-RW, DVD-R, DVD+R, DVD+R/DL, and \fBMulti-session\fR media are CD-R, CD-RW, DVD-R, DVD+R, DVD+R/DL, and
unformatted DVD-RW. These media provide a table of content which unformatted DVD-RW. These media provide a table of content which
describes their existing sessions. describes their existing sessions. See option \fB-toc\fR.
.br .br
\fBOverwriteable\fR media are DVD-RAM, DVD+RW, and formatted DVD-RW. \fBOverwriteable\fR media are DVD-RAM, DVD+RW, and formatted DVD-RW.
They allow random write access but do not provide information about their They allow random write access but do not provide information about their
session history. session history. If they contain one or more ISO 9660 sessions and if the
first session was written by xorriso, then a table of content can
be emulated. Else only a single overall session will be visible.
.br .br
DVD-RW media can be formatted by -format full. DVD-RW media can be formatted by -format full.
They can be made unformatted by -blank deformat. They can be made unformatted by -blank deformat.
@ -164,10 +166,10 @@ capabilities.
suitable for xorriso. suitable for xorriso.
.br .br
Blank is the state of newly purchased optical media. Blank is the state of newly purchased optical media.
With used CD-RW and DVD-RW it can be achieved by action -blank "fast". With used CD-RW and DVD-RW it can be achieved by action -blank "as_needed".
Overwriteable media are considered blank unless they contain an ISO image Overwriteable media are considered blank unless they contain an ISO image
suitable for xorriso. Action -blank "fast" can be used to invalidate the image suitable for xorriso. Action -blank "as_needed" can be used to invalidate the
on overwriteable media. image on overwriteable media, or to apply eventual mandatory formatting.
.br .br
\fBAppendable\fR media accept further sessions. Either they are MMC \fBAppendable\fR media accept further sessions. Either they are MMC
multi-session media in appendable state, or they are overwriteable media multi-session media in appendable state, or they are overwriteable media
@ -182,7 +184,12 @@ Closed is the state of DVD-ROM media and of multi-session media which were
written with option -close on. If the drive is incapable of writing it will written with option -close on. If the drive is incapable of writing it will
probably show any media as closed CD-ROM resp. DVD-ROM. probably show any media as closed CD-ROM resp. DVD-ROM.
.br .br
Overwriteable media assume this state only in such read-only drives. Overwriteable media assume this state in such read-only drives or if they
contain unrecognizable data in the first 32 data blocks.
.br
\fBRead-only\fR drives may or may not show session histories of multi-session
media. Often only the first and the last session are visible. Sometimes
not even that. Option -rom_toc_scan might or might not help in such cases.
.SS .SS
.B Creating, Growing, Modifying: .B Creating, Growing, Modifying:
.br .br
@ -212,7 +219,8 @@ Growing is achieved by option -dev.
The write method of \fBmodifying\fR produces compact filesystem The write method of \fBmodifying\fR produces compact filesystem
images with no outdated files or directory trees. Modifying can write its images with no outdated files or directory trees. Modifying can write its
images to target media which are completely unsuitable for multi-session images to target media which are completely unsuitable for multi-session
operations. E.g. fast blanked DVD-RW, named pipes, character devices, sockets. operations. E.g. DVD-RW which were treated with -blank deformat_quickest,
named pipes, character devices, sockets.
On the other hand modified sessions cannot be written to appendable media On the other hand modified sessions cannot be written to appendable media
but to blank media only. but to blank media only.
.br .br
@ -285,7 +293,7 @@ among the start arguments. Do not try to fool this ban via backdoor addresses
to stdout. to stdout.
.br .br
If stdout is used as drive, then -use_readline is permanently disabled. If stdout is used as drive, then -use_readline is permanently disabled.
Use of backdoors will cause severe memory and/or terminal corruption. Use of backdoors will cause severe memory and/or tty corruption.
.PP .PP
Be aware that especially the superuser can write into any accessible file or Be aware that especially the superuser can write into any accessible file or
device by using its path with the "stdio:" prefix. Addresses without prefix device by using its path with the "stdio:" prefix. Addresses without prefix
@ -391,6 +399,9 @@ All command words are shown with a leading dash although this dash is not
mandatory for the option to be recognized. There may be future emulation mandatory for the option to be recognized. There may be future emulation
modes, where dashes may become mandatory in order to distinguish options modes, where dashes may become mandatory in order to distinguish options
from file addresses. from file addresses.
.br
Normally any number of leading dashes is ignored with command words and
inner dashes are interpreted as underscores.
.TP .TP
.B Aquiring source and target drive: .B Aquiring source and target drive:
.TP .TP
@ -410,7 +421,7 @@ An empty address string "" gives up the current device
without aquiring a new one. without aquiring a new one.
.TP .TP
\fB\-indev\fR address \fB\-indev\fR address
Set input drive and load eventual ISO image. If the new input drive differs Set input drive and load an eventual ISO image. If the new input drive differs
from -outdev then switch from growing to modifying. The same rules and from -outdev then switch from growing to modifying. The same rules and
restrictions apply as with -dev. restrictions apply as with -dev.
.TP .TP
@ -430,6 +441,48 @@ apply. See above paragraph "Libburn drives".
An empty address string "" gives up the current output drive An empty address string "" gives up the current output drive
without aquiring a new one. No writing is possible without an output drive. without aquiring a new one. No writing is possible without an output drive.
.TP .TP
\fB\-load\fR entity id
Load a particular (possibly outdated) ISO image from a -dev or -indev which
hosts more than one session. Usually all available sessions are shown with
option -toc.
.br
entity depicts the kind of addressing. id depicts the particular
address. The following entities are defined:
.br
"auto" with any id addresses the last session in -toc. This is the default.
.br
"session" with id being a number as of a line "ISO session", column "Idx".
.br
"track" with id being a number as of a line "ISO track", column "Idx".
.br
"lba" or "sbsector" with a number as of a line "ISO ...", column "sbsector".
.br
"volid" with a text as of a line "ISO ...", column "Volume Id".
.br
Adressing a non-existing entity or one which does not represent an ISO
image will either abandon -indev or at least lead to a blank image.
.br
If an input drive is set at the moment when -load is executed, then the
addressed ISO image is loaded immediately. Else, the setting will be pending
until the next -dev or -indev. After the image has been loaded once, the
setting is valid for -rollback until next -dev or -indev, where it
will be reset to "auto".
.TP
\fB\-rom_toc_scan\fR "on"|"off"
Read-only drives do not tell the actual media type but show any media as
ROM (e.g. as DVD-ROM). The session history of MMC multi-session media might
be truncated to first and last session or even be completely false.
(The eventual emulated history of overwriteable media is not affected by this.)
.br
To have in case of failure a chance of getting the session history and
especially the address of the last session, there is a scan for ISO 9660
filesystem headers which might help but also might yield worse results
than the drive's table of content. At its end it can cause read attempts
to invalid addresses and thus ugly drive behavior.
.br
To be in effect, -rom_toc_scan has to be enabled by "on" before the -*dev
command which aquires drive and media.
.TP
\fB\-ban_stdio_write\fR \fB\-ban_stdio_write\fR
Allow for writing only the usage of MMC optical drives. Disallow Allow for writing only the usage of MMC optical drives. Disallow
to write the result into files of nearly arbitrary type. to write the result into files of nearly arbitrary type.
@ -546,22 +599,12 @@ Like -add but read the parameter words from file disk_path
or standard input if disk_path is "-". or standard input if disk_path is "-".
The list must contain exactly one pathspec resp. disk_path pattern per line. The list must contain exactly one pathspec resp. disk_path pattern per line.
.TP .TP
\fB\-cpr\fR disk_path [***] iso_rr_path \fB\-map\fR disk_path iso_rr_path
Insert the given files or directory trees from filesystem Insert file object disk_path into the ISO image as iso_rr_path. If disk_path
into the ISO image. is a directory then its whole sub tree is inserted into the ISO image.
.br .TP
The rules for generating the ISO addresses are similar as with \fB\-map_single\fR disk_path iso_rr_path
shell command cp -r. Nevertheless, directories of the iso_rr_path Like -map, but if disk_path is a directory then its sub tree is not inserted.
are created if necessary. Especially a not yet existing iso_rr_path
will be handled as directory if multiple disk_paths are present.
The leafnames of the multiple disk_paths will be grafted under that
directory as would be done with an existing directory.
.br
If a single disk_path is present then a non-existing iso_rr_path will
get the same type as the disk_path.
.br
If a disk_path does not begin with '/' then -cdx is prepended.
If the iso_rr_path does not begin with '/' then -cd is prepended.
.TP .TP
\fB\-update\fR disk_path iso_rr_path \fB\-update\fR disk_path iso_rr_path
Compare file object disk_path with file object iso_rr_path. If they do not Compare file object disk_path with file object iso_rr_path. If they do not
@ -570,6 +613,10 @@ a matching copy of disk_path. This comparison will imply lengthy content
reading before a decision is made. On the other hand it strives for the reading before a decision is made. On the other hand it strives for the
smallest possible amount of add-on data which is needed to achieve the smallest possible amount of add-on data which is needed to achieve the
matching copy. matching copy.
.br
If disk_path is a directory and iso_rr_path does not exist yet, then the
whole subtree will be inserted. Else only directory attributes will be
updated.
.TP .TP
\fB\-update_r\fR disk_path iso_rr_path \fB\-update_r\fR disk_path iso_rr_path
Like -update but working recursively. I.e. all file objects below both Like -update but working recursively. I.e. all file objects below both
@ -583,7 +630,7 @@ should always be the same as with the first adding of disk_path as iso_rr_path.
If iso_rr_path does not exist yet, then it gets added. If disk_path does not If iso_rr_path does not exist yet, then it gets added. If disk_path does not
exist, then iso_rr_path gets deleted. exist, then iso_rr_path gets deleted.
.br .br
-update_r is also a convenient compromise between -add addressing and -cp_r -update_r is also a convenient compromise between -add addressing and -cpr
addressing: Its semantics is similar to -add and thus avoids the pitfalls addressing: Its semantics is similar to -add and thus avoids the pitfalls
inherited from cp -r behavior. Its syntax resembles cp, though. inherited from cp -r behavior. Its syntax resembles cp, though.
.TP .TP
@ -639,6 +686,23 @@ to the directory if it already contains all parts of the old disk file.
If not all parts are present, then only those present parts will If not all parts are present, then only those present parts will
be updated. be updated.
.TP .TP
\fB\-cpr\fR disk_path [***] iso_rr_path
Insert the given files or directory trees from filesystem
into the ISO image.
.br
The rules for generating the ISO addresses are similar as with
shell command cp -r. Nevertheless, directories of the iso_rr_path
are created if necessary. Especially a not yet existing iso_rr_path
will be handled as directory if multiple disk_paths are present.
The leafnames of the multiple disk_paths will be grafted under that
directory as would be done with an existing directory.
.br
If a single disk_path is present then a non-existing iso_rr_path will
get the same type as the disk_path.
.br
If a disk_path does not begin with '/' then -cdx is prepended.
If the iso_rr_path does not begin with '/' then -cd is prepended.
.TP
\fB\-rm\fR iso_rr_path [***] \fB\-rm\fR iso_rr_path [***]
Delete the given files from the ISO image. Delete the given files from the ISO image.
.br .br
@ -869,18 +933,23 @@ Combined -commit and -eject. When writing has finished do not make
-indev and/or -outdev. Eventually give up any non-ejected drive. -indev and/or -outdev. Eventually give up any non-ejected drive.
.TP .TP
\fB\-blank\fR mode \fB\-blank\fR mode
Blank media resp. invalidate ISO image on media if not -dummy Make media ready for writing from scratch (if not -dummy is activated).
is activated.
.br .br
This affects only the -outdev not the -indev. This affects only the -outdev not the -indev.
If both drives are the same and if the ISO image was altered If both drives are the same and if the ISO image was altered
then this command leads to a FAILURE event. then this command leads to a FAILURE event.
Defined modes are: Defined modes are:
fast, all, deformat, deformat_quickest as_needed, fast, all, deformat, deformat_quickest
.br
"as_needed" cares for used CD-RW, DVD-RW and for used overwriteable media
by applying -blank "fast". It applies -format "full" to yet unformatted
DVD-RAM or BD-RE.
.br .br
"fast" and "all" make CD-RW and unformatted DVD-RW re-usable, "fast" and "all" make CD-RW and unformatted DVD-RW re-usable,
or invalidate overwriteable ISO images. or invalidate overwriteable ISO images.
.br
"deformat" converts overwriteable DVD-RW into unformatted ones. "deformat" converts overwriteable DVD-RW into unformatted ones.
.br
"deformat_quickest" is a faster way to deformat or blank DVD-RW "deformat_quickest" is a faster way to deformat or blank DVD-RW
but produces media which are only suitable for a single session. but produces media which are only suitable for a single session.
xorriso will write onto them only if option -close is set to "on". xorriso will write onto them only if option -close is set to "on".
@ -891,28 +960,111 @@ reported percentages. Blanking was successful if no SORRY event or
worse occured. worse occured.
.TP .TP
\fB\-format\fR mode \fB\-format\fR mode
Convert unformatted DVD-RW into overwriteable ones, Convert unformatted DVD-RW into overwriteable ones, "de-ice" DVD+RW, format
"de-ice" DVD+RW. newly purchased BD-RE, re-format DVD-RAM or BD-RE.
For now, mode should be the word "full".
.br .br
This action has no effect on media if -dummy is activated. Defined modes are:
.br .br
Be warned that re-formatting DVD+RW is considered to be risky as_needed, full, fast, by_index_<num>, fast_by_index_<num>
to the media's health. DVD+RW get formatted as far as needed
during writing, but an entirely formatted media might be better
readable in some DVD players.
.br .br
On the other hand unreliable DVD+RW can sometimes be repaired by "as_needed" formats yet unformatted DVD-RW, DVD-RAM, BD-RE. Other media
re-formatting. are left untouched.
.br
"full" (re-)formats DVD-RW, DVD+RW, DVD-RAM, BD-RE.
.br
"fast" does the same as "full" but tries to be quicker.
.br
"by_index_" selects a format out of the descriptor list issued by option
-list_formats. The index number from that list is to be appended to the
mode word. E.g: "by_index_3".
.br
"fast_by_index_" does the same as "by_index_" but tries to be quicker.
.br
The formatting action has no effect on media if -dummy is activated.
.br
Formatting is normally needed only once during the lifetime of a media,
if ever. But it is a reason for re-formatting if:
.br
DVD-RW was deformatted by -blank,
.br
DVD+RW has read failures (re-formatting might help or not),
.br
DVD-RAM or BD-RE shall change their amount of defect reserve.
.br .br
The progress reports issued by some drives while formatting are The progress reports issued by some drives while formatting are
quite unrealistic. Do not conclude success or failure from the quite unrealistic. Do not conclude success or failure from the
reported percentages. Formatting was successful if no SORRY event reported percentages. Formatting was successful if no SORRY event
or worse occured. or worse occured. Be patient with apparently frozen progress.
.TP
\fB\-list_formats\fR
Put out a list of format descriptors as reported by the output drive for
the current media. The list gives the index number after "Format idx",
a MMC format code, the announced size in blocks (like "2236704s")
and the same size in MiB.
.br
MMC format codes are manifold. Most important are:
"00h" general formatting, "01h" increases reserve space for DVD-RAM,
"26h" for DVD+RW, "30h" for BD-RE with reserve space,
"31h" for BD-RE without reserve space.
.br
Smaller format size with DVD-RAM or BD-RE means more reserve space.
.TP .TP
.B Settings for data insertion: .B Settings for data insertion:
.TP .TP
\fB\-not_mgt\fR code[:code[...]]
Control the behavior of the exclusion lists.
.br
Exclusion processing happens before disk_paths get mapped to the ISO image
and before disk files get compared with image files.
The absolute disk path of the source is matched against the -not_paths list.
The leafname of the disk path is matched against the patterns in the -not_leaf
list. If a match is detected then the disk path will not be regarded as an
existing file and not be added to the ISO image.
.br
Several codes are defined.
The _on/_off settings persist until they are revoked by their_off/_on
counterparts.
.br
"erase" empties the lists which were accumulated by -not_paths and -not_leaf.
.br
"reset" is like "erase" but also re-installs default behavior.
.br
"off" disables exclusion processing temporarily without invalidating
the lists and settings.
.br
"on" re-enables exclusion processing.
.br
"param_off" applies exclusion processing only to paths below disk_path
parameter of commands. I.e. explicitely given disk_paths are exempted
from exclusion processing.
.br
"param_on" applies exclusion processing to command parameters as well as
to files below such parameters.
.br
"subtree_off" with "param_on" excludes parameter paths only if they
match a -not_paths item exactly.
.br
"subtree_on" additionally excludes parameter paths which lead to a file
address below any -not_paths item.
.br
"ignore_off" treats excluded disk files as if they were missing. I.e. they
get reported with -compare and deleted from the image with -update.
.br
"ignore_on" keeps excluded files out of -compare or -update activities.
.TP
\fB\-not_paths\fR disk_path [***]
Add the given paths to the list of excluded absolute disk paths. If a given
path is relative, then the current -cdx is prepended to form an absolute path.
Eventual pattern matching happens at definition time and not when exclusion
checks are made.
.br
(Do not forget to end the list of disk_paths by "--")
.TP
\fB\-not_leaf\fR pattern
Add a single shell parser style pattern to the list of exclusions for
disk leafnames. These patterns are evaluated when the exclusion checks are
made.
.TP
\fB\-follow\fR occasion[:occasion[...]] \fB\-follow\fR occasion[:occasion[...]]
Enable or disable resolution of symbolic links and mountpoints under Enable or disable resolution of symbolic links and mountpoints under
disk_paths. This applies to actions -add, -du*x, -ls*x, -findx, disk_paths. This applies to actions -add, -du*x, -ls*x, -findx,
@ -1183,6 +1335,22 @@ A special property of this option is that the first -report_about setting
among the start arguments is in effect already when the first operations among the start arguments is in effect already when the first operations
of xorriso begin. Only "-report_about" with dash "-" is recognized that way. of xorriso begin. Only "-report_about" with dash "-" is recognized that way.
.TP .TP
\fB\-error_behavior\fR occasion behavior
Control the program behavior at problem event occasions.
.br
For now this applies only to occasion "image_loading" which is given while
an image tree is read from the input device. There are three behaviors
available:
.br
"best_effort" goes on with reading after events with severity below FAILURE
if the threshold of option -abort_on allows this.
.br
"failure" aborts image tree reading on first event of at least SORRY.
It issues an own FAILURE event.
.br
"fatal" acts like "failure" but issues the own event as FATAL.
This is the default.
.TP
.B Dialog mode control: .B Dialog mode control:
.TP .TP
\fB\-dialog\fR "on"|"off" \fB\-dialog\fR "on"|"off"
@ -1240,14 +1408,20 @@ use -rollback to revoke the whole session.
.TP .TP
\fB\-toc\fR \fB\-toc\fR
.br .br
Show media specific table of content. This is the media Show media specific table of content. This is the media session history,
structure, not the ISO image directory tree. In case of not the ISO image directory tree.
overwriteable media holding a valid ISO image, a single .br
session gets fabricated from the ISO image size info. In case of overwriteable media holding a valid ISO image, a single session
gets fabricated from the ISO image size info. But if the first session on the
overwriteable media was written by xorriso then in most cases a complete
session history can be emulated.
.br .br
A drive which is incapable of writing may show any media as CD-ROM or DVD-ROM A drive which is incapable of writing may show any media as CD-ROM or DVD-ROM
with only one or two sessions on it. The last of these sessions is supposed with only one or two sessions on it. The last of these sessions is supposed
to be the most recent real session then. to be the most recent real session then.
.br
Some read-only drives and media show no usable session history at all.
Eventually option -rom_toc_scan might help.
.TP .TP
\fB\-devices\fR \fB\-devices\fR
Show list of available MMC drives with the addresses of Show list of available MMC drives with the addresses of
@ -1264,7 +1438,7 @@ who is able to see all drives.
.br .br
Drives which are occupied by other processes get not shown. Drives which are occupied by other processes get not shown.
.TP .TP
\fB\-print-size\fR \fB\-print_size\fR
Print the foreseeable consumption of 2048 byte blocks Print the foreseeable consumption of 2048 byte blocks
by next -commit. This can last a while as a -commit gets by next -commit. This can last a while as a -commit gets
prepared and only in last moment is revoked by this option. prepared and only in last moment is revoked by this option.
@ -1437,8 +1611,8 @@ Personality "\fBmkisofs\fR" accepts the options listed with:
.br .br
-as mkisofs -help -- -as mkisofs -help --
.br .br
Among them: -R (always on), -J, -graft-points, -o, -path-list, -print-size, -V, Among them: -R (always on), -J, -graft-points, -o, -path-list, -m, -print-size,
-v, -version, pathspecs as with xorriso -add. A lot of options are not -V, -v, -version, pathspecs as with xorriso -add. A lot of options are not
supported and lead to failure of the mkisofs emulation. Some are ignored, supported and lead to failure of the mkisofs emulation. Some are ignored,
but better do not rely on this tolerance. but better do not rely on this tolerance.
.br .br
@ -1564,8 +1738,7 @@ This transport becomes visible with -report_about "ALL".
If path is not empty it gives the address of a plain text file where If path is not empty it gives the address of a plain text file where
a log record gets appended after each session. This log can be used to a log record gets appended after each session. This log can be used to
determine the start_lba of a session for mount option sbsector= from determine the start_lba of a session for mount option sbsector= from
date or volume id. With non-multi-session media this is currently the only date or volume id.
way to obtain this parameter.
.br .br
Record format is: timestamp start_lba size volume-id Record format is: timestamp start_lba size volume-id
.br .br
@ -1658,19 +1831,15 @@ Re-add some wanted stuff.
Because no -dialog "on" is given, the program will then end by committing the Because no -dialog "on" is given, the program will then end by committing the
session to media. session to media.
.br .br
\fB$\fR cd /home/me
.br
\fB$\fR xorriso -outdev /dev/sr2 \\ \fB$\fR xorriso -outdev /dev/sr2 \\
.br .br
-blank fast \\ -blank as_needed \\
.br .br
-pathspecs on \\ -map /home/me/sounds /sounds \\
.br .br
-add \\ -map /home/me/pictures /pictures \\
.br
/sounds=/home/me/sounds \\
.br
/pictures \\
.br
-- \\
.br .br
-rm_r \\ -rm_r \\
.br .br
@ -1682,12 +1851,12 @@ session to media.
.br .br
-- \\ -- \\
.br .br
-add \\ -cd / \\
.br .br
/pictures/confidential/work* -add pictures/confidential/work*
.br .br
Note that '/pictures/*private*' is a pattern for iso_rr_paths Note that '/pictures/*private*' is a pattern for iso_rr_paths
while /pictures/confidential/work* gets expanded by the shell while pictures/confidential/work* gets expanded by the shell
with addresses from the hard disk. with addresses from the hard disk.
.SS .SS
.B A dialog session doing about the same .B A dialog session doing about the same
@ -1702,7 +1871,7 @@ made ready for being overwritten and the loaded ISO image is made empty.
In order to be able to eject the media, the session needs to be committed In order to be able to eject the media, the session needs to be committed
explicitely. explicitely.
.br .br
.B $ xorriso -pathspecs on -dialog on -page 20 80 .B $ xorriso -dialog on -page 20 80 -disk_pattern on
.br .br
enter option and arguments : enter option and arguments :
.br .br
@ -1710,11 +1879,11 @@ enter option and arguments :
.br .br
enter option and arguments : enter option and arguments :
.br .br
.B \-blank fast .B \-blank as_needed
.br .br
enter option and arguments : enter option and arguments :
.br .br
.B \-add /sounds=/home/me/sounds /pictures .B \-map /home/me/sounds /sounds -map /home/me/pictures /pictures
.br .br
enter option and arguments : enter option and arguments :
.br .br
@ -1722,7 +1891,11 @@ enter option and arguments :
.br .br
enter option and arguments : enter option and arguments :
.br .br
.B \-add /pictures/confidential/office /pictures/confidential/factory .B \-cdx /home/me/pictures -cd /pictures
.br
enter option and arguments :
.br
.B \-add confidential/office confidential/factory
.br .br
enter option and arguments : enter option and arguments :
.br .br
@ -1754,15 +1927,9 @@ Add new directory trees /sounds and /movies. Burn to the same media and eject.
.br .br
-chmod go-rwx /pictures/restricted -- \\ -chmod go-rwx /pictures/restricted -- \\
.br .br
-pathsspecs on \\ -map /home/me/prepared_for_dvd/sounds_dummy /sounds \\
.br .br
-add \\ -map /home/me/prepared_for_dvd/movies /movies \\
.br
/sounds=/home/me/prepared_for_dvd/sounds_dummy \\
.br
/movies=/home/me/prepared_for_dvd/movies \\
.br
-- \\
.br .br
-commit -eject all -commit -eject all
.SS .SS
@ -1777,7 +1944,7 @@ first and only session to the output drive.
.br .br
... ...
.br .br
-outdev /dev/sr0 -blank fast \\ -outdev /dev/sr0 -blank as_needed \\
.br .br
-commit -eject all -commit -eject all
.SS .SS
@ -1842,14 +2009,19 @@ compare them with their disk counterparts,
add disk file objects which are missing yet, add disk file objects which are missing yet,
overwrite those which are different on disk, overwrite those which are different on disk,
and delete those which have vanished on disk. and delete those which have vanished on disk.
But do not add or overwrite files matching *.o, *.swp.
.br .br
\fB$\fR xorriso -dev /dev/sr0 \\ \fB$\fR xorriso -dev /dev/sr0 \\
.br
-volid PROJECTS_MAIL_"$(date '+%Y_%m_%d_%H%M%S')" \\
.br
-not_leaf '*.o' -not_leaf '*.swp' \\
.br .br
-update_r /home/thomas/open_source_projects /open_source_projects \\ -update_r /home/thomas/open_source_projects /open_source_projects \\
.br .br
-update_r /home/thomas/personal_mail /personal_mail \\ -update_r /home/thomas/personal_mail /personal_mail \\
.br .br
-commit_eject all -commit -toc -eject all
.br .br
To be used several times on the same media, whenever an update of To be used several times on the same media, whenever an update of
the two disk trees to the media is desired. Begin with blank media and start the two disk trees to the media is desired. Begin with blank media and start
@ -1860,11 +2032,15 @@ This makes most sense with backups on non-erasable media like CD-R,
DVD-R, DVD+R if the full backup leaves substantial remaining capacity DVD-R, DVD+R if the full backup leaves substantial remaining capacity
on media and if the expected changes are much smaller than the full backup. on media and if the expected changes are much smaller than the full backup.
An update run will probably save no time but last longer than a full backup. An update run will probably save no time but last longer than a full backup.
Another good reason may be given if read speed is much higher than write speed.
.br .br
With \fBmount\fR option \fB"sbsector="\fR it is possible to access the session With \fBmount\fR option \fB"sbsector="\fR it is possible to access the session
trees which represent the older backup versions. Multi-session media can tell trees which represent the older backup versions. Multi-session media and
the sbsector by xorriso option -toc, as "data lba:". For other media one most overwriteable media written by xorriso can tell
may set before writing a suitable path for xorriso option -session_log where the sbsector by xorriso option -toc.
.br
Another way to keep track of incremental sessions is to
set before writing a suitable path for xorriso option -session_log where
the sbsector number gets recorded as the second word in each line. the sbsector number gets recorded as the second word in each line.
.br .br
With CD media, Linux mount accepts session numbers directly by its option With CD media, Linux mount accepts session numbers directly by its option
@ -1873,8 +2049,7 @@ With CD media, Linux mount accepts session numbers directly by its option
\fBDo not write more than about 50 sessions\fR to one multi-session media. \fBDo not write more than about 50 sessions\fR to one multi-session media.
Theoretical limits are higher but in practice the media deteriorate more early. Theoretical limits are higher but in practice the media deteriorate more early.
It might also be that your operating system has a session limit with mount. It might also be that your operating system has a session limit with mount.
Always have a blank media ready to perform a full backup in case the update An overview of sessions is given by option -toc.
attempt fails. An overview of sessions is given by option -toc.
.br .br
Sessions on multi-session media are separated by several MB of unused blocks. Sessions on multi-session media are separated by several MB of unused blocks.
So with small sessions the payload capacity can become substantially lower So with small sessions the payload capacity can become substantially lower
@ -1886,14 +2061,17 @@ automatically.
Have at least two media which you use alternatingly. So only older backups Have at least two media which you use alternatingly. So only older backups
get endangered by the new write operation, while the newest backup is get endangered by the new write operation, while the newest backup is
stored safely on a different media. stored safely on a different media.
Always have a blank media ready to perform a full backup in case the update
attempt fails due to insufficient remaining capacity.
.br .br
If you have enough re-useable media for a round-robin scheme then better do If you have enough re-useable media for a round-robin scheme then better do
full backups with blank media each time. Blanking can be achieved by full backups with blank media each time. Blanking can be achieved by
either a separate run: either a separate run:
.br .br
\fB$\fR xorriso -outdev /dev/sr0 -blank fast -eject all \fB$\fR xorriso -outdev /dev/sr0 -blank as_needed -eject all
.br .br
or in the update run by using option -blank "fast" before option -update_r. or in the update run by using option -blank "as_needed" before
option -update_r.
.br .br
.SH FILES .SH FILES
.SS .SS

File diff suppressed because it is too large Load Diff

View File

@ -268,6 +268,14 @@ int Xorriso_option_eject(struct XorrisO *xorriso, char *which, int flag);
*/ */
int Xorriso_option_end(struct XorrisO *xorriso, int flag); int Xorriso_option_end(struct XorrisO *xorriso, int flag);
/* Option -errfile_log marked|plain path|-|"" */
int Xorriso_option_errfile_log(struct XorrisO *xorriso,
char *mode, char *path, int flag);
/* Option -error_behavior */
int Xorriso_option_error_behavior(struct XorrisO *xorriso,
char *occasion, char *behavior, int flag);
/* Option -iso_rr_pattern "on"|"ls"|"off" */ /* Option -iso_rr_pattern "on"|"ls"|"off" */
int Xorriso_option_iso_rr_pattern(struct XorrisO *xorriso, char *mode, int Xorriso_option_iso_rr_pattern(struct XorrisO *xorriso, char *mode,
int flag); int flag);
@ -298,6 +306,15 @@ int Xorriso_option_history(struct XorrisO *xorriso, char *line, int flag);
/* Option -joliet "on"|"off" */ /* Option -joliet "on"|"off" */
int Xorriso_option_joliet(struct XorrisO *xorriso, char *mode, int flag); int Xorriso_option_joliet(struct XorrisO *xorriso, char *mode, int flag);
/* Option -list_formats */
int Xorriso_option_list_formats(struct XorrisO *xorriso, int flag);
/* Option -load session|track|sbsector value */
/* @return <=0 error , 1 success, 2 revoked by -reassure
*/
int Xorriso_option_load(struct XorrisO *xorriso, char *adr_mode,
char *adr_value, int flag);
/* Option -logfile */ /* Option -logfile */
int Xorriso_option_logfile(struct XorrisO *xorriso, char *channel, int Xorriso_option_logfile(struct XorrisO *xorriso, char *channel,
char *fileadr, int flag); char *fileadr, int flag);
@ -322,6 +339,13 @@ int Xorriso_option_lsi(struct XorrisO *xorriso, int argc, char **argv,
int Xorriso_option_lsx(struct XorrisO *xorriso, int argc, char **argv, int Xorriso_option_lsx(struct XorrisO *xorriso, int argc, char **argv,
int *idx, int flag); int *idx, int flag);
/* Option -map */
/* @param flag bit0=do not report the added item
bit1=do not reset pacifier, no final pacifier message
*/
int Xorriso_option_map(struct XorrisO *xorriso, char *disk_path,
char *iso_path, int flag);
/* Option -mark */ /* Option -mark */
int Xorriso_option_mark(struct XorrisO *xorriso, char *mark, int flag); int Xorriso_option_mark(struct XorrisO *xorriso, char *mark, int flag);
@ -336,6 +360,13 @@ int Xorriso_option_mvi(struct XorrisO *xorriso, int argc, char **argv,
/* Option -no_rc */ /* Option -no_rc */
int Xorriso_option_no_rc(struct XorrisO *xorriso, int flag); int Xorriso_option_no_rc(struct XorrisO *xorriso, int flag);
/* Option -not_leaf */
int Xorriso_option_not_leaf(struct XorrisO *xorriso, char *pattern, int flag);
/* Option -not_paths */
int Xorriso_option_not_paths(struct XorrisO *xorriso, int argc, char **argv,
int *idx, int flag);
/* Option -options_from_file*/ /* Option -options_from_file*/
/* @return <=0 error , 1 = success , 3 = request to end program run */ /* @return <=0 error , 1 = success , 3 = request to end program run */
int Xorriso_option_options_from_file(struct XorrisO *xorriso, char *adr, int Xorriso_option_options_from_file(struct XorrisO *xorriso, char *adr,
@ -362,7 +393,7 @@ int Xorriso_option_pkt_output(struct XorrisO *xorriso, char *mode, int flag);
/* Option -print */ /* Option -print */
int Xorriso_option_print(struct XorrisO *xorriso, char *text, int flag); int Xorriso_option_print(struct XorrisO *xorriso, char *text, int flag);
/* Option -print-size /* Option -print_size
@param flag bit0= report in mkisofs compatible form on real stdout @param flag bit0= report in mkisofs compatible form on real stdout
*/ */
int Xorriso_option_print_size(struct XorrisO *xorriso, int flag); int Xorriso_option_print_size(struct XorrisO *xorriso, int flag);
@ -382,6 +413,9 @@ int Xorriso_option_pwdi(struct XorrisO *xorriso, int flag);
/* Option -pwdx */ /* Option -pwdx */
int Xorriso_option_pwdx(struct XorrisO *xorriso, int flag); int Xorriso_option_pwdx(struct XorrisO *xorriso, int flag);
/* Option -reassure "on"|"tree"|"off" */
int Xorriso_option_reassure(struct XorrisO *xorriso, char *mode, int flag);
/* Option -report_about */ /* Option -report_about */
int Xorriso_option_report_about(struct XorrisO *xorriso, char *severity, int Xorriso_option_report_about(struct XorrisO *xorriso, char *severity,
int flag); int flag);
@ -390,8 +424,8 @@ int Xorriso_option_report_about(struct XorrisO *xorriso, char *severity,
int Xorriso_option_return_with(struct XorrisO *xorriso, char *severity, int Xorriso_option_return_with(struct XorrisO *xorriso, char *severity,
int exit_value, int flag); int exit_value, int flag);
/* Option -reassure "on"|"tree"|"off" */ /* Option -revoke_exclusions */
int Xorriso_option_reassure(struct XorrisO *xorriso, char *mode, int flag); int Xorriso_option_revoke_exclusions(struct XorrisO *xorriso, int flag);
/* Options -rm alias -rmi , -rm_r alias -rm_ri , -rmdir alias -rmdiri */ /* Options -rm alias -rmi , -rm_r alias -rm_ri , -rmdir alias -rmdiri */
/* @param flag bit0=recursive , bit2= remove empty directory: rmdir */ /* @param flag bit0=recursive , bit2= remove empty directory: rmdir */
@ -399,10 +433,15 @@ int Xorriso_option_rmi(struct XorrisO *xorriso, int argc, char **argv,
int *idx, int flag); int *idx, int flag);
/* Option -rollback */ /* Option -rollback */
/* @return <=0 error , 1 success, 2 revoked by -reassure /* @param flag bit0= do not -reassure
@return <=0 error , 1 success, 2 revoked by -reassure
*/ */
int Xorriso_option_rollback(struct XorrisO *xorriso, int flag); int Xorriso_option_rollback(struct XorrisO *xorriso, int flag);
/* Option -rom_toc_scan */
int Xorriso_option_rom_toc_scan(struct XorrisO *xorriso, char *mode,
int flag);
/* Option -session_log */ /* Option -session_log */
int Xorriso_option_session_log(struct XorrisO *xorriso, char *path, int flag); int Xorriso_option_session_log(struct XorrisO *xorriso, char *path, int flag);

View File

@ -2,7 +2,7 @@
<HEAD> <HEAD>
<META NAME="description" CONTENT="xorriso, creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions"> <META NAME="description" CONTENT="xorriso, creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions">
<META NAME="keywords" CONTENT="xorriso, libburn, libburnia, burn, CD, DVD, ISO, ISO 9660, RockRidge, Rock Ridge, linux, recording, burning, CD-R, CD-RW, DVD-R, DVD-RW, DVD+RW, DVD+R, DVD+R/DL, scdbackup"> <META NAME="keywords" CONTENT="xorriso, libburn, libburnia, burn, CD, DVD, ISO, ISO 9660, RockRidge, Rock Ridge, linux, recording, burning, CD-R, CD-RW, DVD-R, DVD-RW, DVD+RW, DVD+R, DVD+R DL, scdbackup">
<META NAME="robots" CONTENT="follow"> <META NAME="robots" CONTENT="follow">
<TITLE>xorriso homepage english</TITLE> <TITLE>xorriso homepage english</TITLE>
</HEAD> </HEAD>
@ -58,14 +58,14 @@ and to MMC-5 for DVD).
GPL software included:<BR> GPL software included:<BR>
</H2> </H2>
<DL> <DL>
<DT>libburn-0.4.3</DT> <DT>libburn-0.4.9</DT>
<DD>reads and writes data from and to CD and DVD.</DD> <DD>reads and writes data from and to CD and DVD.</DD>
<DD>(founded by Derek Foreman and Ben Jansens, <DD>(founded by Derek Foreman and Ben Jansens,
furthered since August 2006 by team of libburnia-project.org)</DD> furthered since August 2006 by team of libburnia-project.org)</DD>
<DT>libisofs-0.6.3</DT> <DT>libisofs-0.6.4</DT>
<DD>operates ISO 9660 images.</DD> <DD>operates ISO 9660 images.</DD>
<DD>(By Vreixo Formoso and Mario Danic from team of libburnia-project.org)</DD> <DD>(By Vreixo Formoso and Mario Danic from team of libburnia-project.org)</DD>
<DT>libisoburn-0.1.1</DT> <DT>libisoburn-0.1.6</DT>
<DD>coordinates libburn and libisofs, emulates multi-session where needed.</DD> <DD>coordinates libburn and libisofs, emulates multi-session where needed.</DD>
<DD>(By Vreixo Formoso and Thomas Schmitt <DD>(By Vreixo Formoso and Thomas Schmitt
from team of libburnia-project.org)</DD> from team of libburnia-project.org)</DD>
@ -115,7 +115,8 @@ to overwriteable media, to regular files, and to block devices.
Scans for optical drives, blanks re-useable optical media. Scans for optical drives, blanks re-useable optical media.
</LI> </LI>
<LI> <LI>
Suitable for: CD-R, CD-RW, DVD-R, DVD-RW, DVD+R, DVD+R/DL, DVD+RW, DVD-RAM. Suitable for:
CD-R, CD-RW, DVD-R, DVD-RW, DVD+R, DVD+R DL, DVD+RW, DVD-RAM, BD-RE.
</LI> </LI>
<LI> <LI>
Reads its instructions from command line arguments, dialog, and batch files. Reads its instructions from command line arguments, dialog, and batch files.
@ -151,8 +152,9 @@ may accept pathspecs of form target=source as known from program mkisofs.</DT>
<DT>Get info about a particular drive and loaded media:</DT> <DT>Get info about a particular drive and loaded media:</DT>
<DD>$<KBD>&nbsp;xorriso -indev /dev/sr0 -du / -- -toc 2>&amp;1 | less</KBD></DD> <DD>$<KBD>&nbsp;xorriso -indev /dev/sr0 -du / -- -toc 2>&amp;1 | less</KBD></DD>
<DT>Make re-usable media writable again, delete any ISO 9660 image:</DT> <DT>Make re-usable media writable again, delete any ISO 9660 image,
<DD>$<KBD>&nbsp;xorriso -outdev /dev/sr0 -blank fast -eject all</KBD></DD> eventually prepare yet unused BD-RE:</DT>
<DD>$<KBD>&nbsp;xorriso -outdev /dev/sr0 -blank as_needed -eject all</KBD></DD>
<DT> <DT>
<HR> <HR>
@ -174,17 +176,17 @@ adjust permissions to make it publicly read-only,
write it to media and immediately eject media without write it to media and immediately eject media without
previously reloading the written image. previously reloading the written image.
</DT> </DT>
<DD>$<KBD>&nbsp;xorriso -outdev /dev/sr0 -blank fast -pathspecs on \</KBD></DD> <DD>$<KBD>&nbsp;cd /home/me</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-add /sounds=/home/me/sounds \</KBD></DD> <DD>$<KBD>&nbsp;xorriso -outdev /dev/sr0 -blank as_needed \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <DD><KBD>&nbsp;&nbsp;-map /home/me/sounds /sounds \</KBD></DD>
/pictures=/home/me/pictures -- \</KBD></DD> <DD><KBD>&nbsp;&nbsp;-map /home/me/pictures /pictures \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-rm_r /sounds/indecent '/pictures/*private*' -- \</KBD></DD> <DD><KBD>&nbsp;&nbsp;-rm_r /sounds/indecent '/pictures/*private*' -- \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-add /pictures/private/horses=/home/me/pictures/private/horses -- \</KBD></DD> <DD><KBD>&nbsp;&nbsp;-cd / \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-add pictures/private/horses* -- \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-chmod_r a+r,a-w / -- \</KBD></DD> <DD><KBD>&nbsp;&nbsp;-chmod_r a+r,a-w / -- \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-find / -type d -exec chmod a+x -- \</KBD></DD> <DD><KBD>&nbsp;&nbsp;-find / -type d -exec chmod a+x -- \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-volid SOUNDS_PICS_2008_01_16 \</KBD></DD> <DD><KBD>&nbsp;&nbsp;-volid SOUNDS_PICS_2008_01_16 \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-commit_eject all</KBD></DD> <DD><KBD>&nbsp;&nbsp;-commit_eject all</KBD></DD>
<DT> <DT>
<HR> <HR>
</DT> </DT>
@ -195,15 +197,14 @@ rename /pictures/private/horses,
add new directory trees /sounds and /movies, add new directory trees /sounds and /movies,
disallow any access for group and others. disallow any access for group and others.
Finally write as additional session to media and eject:</DT> Finally write as additional session to media and eject:</DT>
<DD>$<KBD>&nbsp;xorriso -dev /dev/sr0 -pathspecs on \</KBD></DD> <DD>$<KBD>&nbsp;xorriso -dev /dev/sr0 \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-rm_r /sounds -- \</KBD></DD> <DD><KBD>&nbsp;&nbsp;-rm_r /sounds -- \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-mv /pictures/private/horses /horse_show -- \</KBD></DD> <DD><KBD>&nbsp;&nbsp;-mv /pictures/private/horses /horse_show -- \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-add /sounds=/home/me/prepared_for_dvd/sounds_dummy \</KBD></DD> <DD><KBD>&nbsp;&nbsp;-map /home/me/prepared_for_dvd/sounds_dummy /sounds \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /movies=/home/me/prepared_for_dvd/movies -- \</KBD></DD> <DD><KBD>&nbsp;&nbsp;-map /home/me/prepared_for_dvd/movies /movies \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-chmod_r go-rwx / -- \</KBD></DD> <DD><KBD>&nbsp;&nbsp;-chmod_r go-rwx / -- \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-volid SOUNDS_PICS_2008_01_17 \</KBD></DD> <DD><KBD>&nbsp;&nbsp;-volid SOUNDS_PICS_2008_01_17 \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-commit_eject all</KBD></DD> <DD><KBD>&nbsp;&nbsp;-commit_eject all</KBD></DD>
<DT> <DT>
<HR> <HR>
</DT> </DT>
@ -230,9 +231,11 @@ run. It will write eventually pending changes to media, if that has not
already been done by a previous -commit.</DT> already been done by a previous -commit.</DT>
<DD>$<KBD>&nbsp;xorriso -dialog on</KBD></DD> <DD>$<KBD>&nbsp;xorriso -dialog on</KBD></DD>
<DD><KBD>enter option and arguments :</KBD></DD> <DD><KBD>enter option and arguments :</KBD></DD>
<DD><KBD><B>-dev /dev/sr0 -pathspecs on</B></KBD></DD> <DD><KBD><B>-dev /dev/sr0</B></KBD></DD>
<DD><KBD>enter option and arguments :</KBD></DD> <DD><KBD>enter option and arguments :</KBD></DD>
<DD><KBD><B>-add /sounds=/home/me/prepared_for_dvd/sounds_dummy /movies=/home/me/prepared_for_dvd/movies</B></KBD></DD> <DD><KBD><B>-map /home/me/prepared_for_dvd/sounds_dummy /sounds</B></KBD></DD>
<DD><KBD>enter option and arguments :</KBD></DD>
<DD><KBD><B>-map /home/me/prepared_for_dvd/movies /movies</B></KBD></DD>
<DD>Available navigation commands: -cd, -ls, -du, -find</DD> <DD>Available navigation commands: -cd, -ls, -du, -find</DD>
<DD><KBD>enter option and arguments :</KBD></DD> <DD><KBD>enter option and arguments :</KBD></DD>
<DD><KBD><B>-commit</B></KBD></DD> <DD><KBD><B>-commit</B></KBD></DD>
@ -244,18 +247,23 @@ already been done by a previous -commit.</DT>
<HR> <HR>
</DT> </DT>
<DT>The following command can be run on blank media to create a complete <DT>The following command can be run on blank media to create a
copy of the mentioned disk directory trees, and it can be run on appendable copy of the mentioned disk directory trees, and it can be run on appendable
media to perform a minimal set of change operations which update the media to perform a minimal set of change operations which update the
old ISO copies to match the new disk trees. On CD-R[W], DVD-R[W] and DVD+R old ISO copies to match the new disk trees.
older states can be retrieved by help of mount option "session=". Older states can be retrieved by help of mount option "session=" from CD-R[W],
by help of "sbsector=" from other media.
So this constitutes true incremental backup. So this constitutes true incremental backup.
On overwriteable media only the newest state is accessible. <BR>
The copies will be complete, except all file names ending
with ".o" or ".swp" which are excluded by options -not_leaf.
</DT> </DT>
<DD>$<KBD>&nbsp;xorriso -dev /dev/sr0 \</KBD></DD> <DD>$<KBD>&nbsp;xorriso -dev /dev/sr0 \</KBD></DD>
<DD><KBD>&nbsp;&nbsp; -volid PROJECTS_MAIL_"$(date '+%Y_%m_%d_%H%M%S')" \</KBD></DD>
<DD><KBD>&nbsp;&nbsp; -not_leaf '*.o' -not_leaf '*.swp' \</KBD></DD>
<DD><KBD>&nbsp;&nbsp; -update_r /home/thomas/open_source_projects /open_source_projects \</KBD></DD> <DD><KBD>&nbsp;&nbsp; -update_r /home/thomas/open_source_projects /open_source_projects \</KBD></DD>
<DD><KBD>&nbsp;&nbsp; -update_r /home/thomas/personal_mail /personal_mail \</KBD></DD> <DD><KBD>&nbsp;&nbsp; -update_r /home/thomas/personal_mail /personal_mail \</KBD></DD>
<DD><KBD>&nbsp;&nbsp; -commit_eject all \</KBD></DD> <DD><KBD>&nbsp;&nbsp; -commit -toc -eject all</KBD></DD>
<DT> <DT>
<HR> <HR>
@ -287,25 +295,10 @@ Testers wanted who are willing to risk some double layer DVD media.
<A NAME="download"></A> <A NAME="download"></A>
<P> <P>
<DL> <DL>
<DT>Download as source code (see README):</DT> <DT><H3>Download as source code (see README):</H3></DT>
<DD><A HREF="xorriso-0.1.2.pl00.tar.gz">xorriso-0.1.2.pl00.tar.gz</A> <DD><A HREF="xorriso-0.1.6.pl00.tar.gz">xorriso-0.1.6.pl00.tar.gz</A>
(950 KB). (980 KB).
</DD> </DD>
<!--
<DD>&nbsp;</DD>
<DT>Download as single x86 binaries (untar and move to /usr/bin/xorriso):</DT>
<DD><A HREF="xorriso_0.1.0.pl00-x86-suse9_0.tar.gz">
xorriso_0.1.0.pl00-x86-suse9_0.tar.gz</A>, ( KB),
<DL>
<DD>runs on SuSE 9.0 (2.4.21) , SuSE 10.2 (2.6.18.2) and others.</DD>
</DL>
<DD><A HREF="xorriso_0.1.0.pl00-x86-suse9_0-static.tar.gz">
xorriso_0.1.0.pl00-x86-suse9_0-static.tar.gz</A>, ( KB), -static compiled,
<DL>
<DD>runs on many other systems.</DD>
-->
</DL> </DL>
</DD> </DD>
</DL> </DL>
@ -328,29 +321,22 @@ an <A HREF="http://www.opensource.org/">Open Source</A> approved license</DD>
</P> </P>
<HR> <HR>
<P> <P>
Enhancements towards previous stable version xorriso-0.1.0: Bug fixes towards xorriso-0.1.4.pl00:
<UL> <UL>
<LI>Improved attribute transfer from disk for implicit target directories</LI> <LI>-update_r and others did not work properly with relative paths</LI>
<LI>New option -as "cdrecord" emulates a narrow set of cdrecord gestures</LI>
<LI>New option -as "mkisofs" emulates a narrow set of mkisofs gestures</LI>
<LI>New option -publisher</LI>
<LI>New option -errfile_log</LI>
<LI>Support for DVD+R/DL media</LI>
<LI>New options -compare , -compare_r and according -find -exec action</LI>
<LI>New options -update , -update_r and according -find -exec action</LI>
<LI>New -find actions "rm", "rm_r", new -findx -type "m" -exec "empty_iso_dir"
</LI>
<LI>New option -cut_out</LI>
</UL> </UL>
Bug fixes towards xorriso-0.1.0.pl00: </P>
<P>
Enhancements towards previous stable version xorriso-0.1.4.pl00:
<UL> <UL>
<LI>-report_about HINT or higher did not report at all</LI> <LI>Support for BD-RE</LI>
<LI>speed=number without unit or media type letter was always CD speed</LI> <LI>New options -map and -map_single</LI>
<LI>It was possible to write to appendable media which was not -indev</LI> <LI>New options -not_paths, -not_leaf, -not_list, -not_mgt, -as mkisofs -m</LI>
<LI>-follow param did not work for adding non-directory symbolic links</LI> <LI>Emulated -toc on overwriteable media, new -toc layout with volume id</LI>
<LI>It was not possible to do: -add /THIS=a /b=THIS --</LI> <LI>New option -load makes alternative sessions accessible</LI>
<LI>New -blank and -format modes 'as_needed'</LI>
<LI>New option -list_formats and -format mode 'by_index_' </LI>
</UL> </UL>
</P> </P>
@ -358,27 +344,25 @@ Bug fixes towards xorriso-0.1.0.pl00:
<P> <P>
<DL> <DL>
<DT><H3>Development snapshot, version 0.1.3 :</H3></DT> <DT><H3>Development snapshot, version 0.1.7 :</H3></DT>
<DD>Bug fixes towards xorriso-0.1.2.pl00: <DD>Bug fixes towards xorriso-0.1.6.pl00:
<UL> <UL>
<LI>-as mkisofs -no-pad was misspelled -nopad</LI> <!--
<LI>Implicite directory attribute copying with -cut_out was wrong</LI> -->
<!-- <LI>- none yet -</LI> --> <LI>- none yet -</LI>
</UL> </UL>
</DD> </DD>
<DD>Enhancements towards stable version 0.1.2.pl00: <DD>Enhancements towards stable version 0.1.6.pl00:
<UL> <UL>
<LI>Coordination of -cut_out, -compare and -update</LI> <!--
<LI>New option -session_log</LI> -->
<LI>New option -split_size allows automated splitting of oversized files</LI> <LI>- none yet -</LI>
<LI>Improved performance with reading directory trees</LI>
<!-- <LI>- none yet -</LI> -->
</UL> </UL>
</DD> </DD>
<DD>&nbsp;</DD> <DD>&nbsp;</DD>
<DD><A HREF="README_xorriso_devel">README 0.1.3</A> <DD><A HREF="README_xorriso_devel">README 0.1.7</A>
<DD><A HREF="xorriso_help_devel">xorriso_0.1.3 -help</A></DD> <DD><A HREF="xorriso_help_devel">xorriso_0.1.7 -help</A></DD>
<DD><A HREF="man_1_xorriso_devel.html">man xorriso (as of 0.1.3)</A></DD> <DD><A HREF="man_1_xorriso_devel.html">man xorriso (as of 0.1.7)</A></DD>
<DD>&nbsp;</DD> <DD>&nbsp;</DD>
<DT>If you want to distribute development versions of xorriso, then use <DT>If you want to distribute development versions of xorriso, then use
this tarball which produces static linking between xorriso and the this tarball which produces static linking between xorriso and the
@ -388,8 +372,8 @@ libburnia libraries.
installation see README) installation see README)
</DD> </DD>
<DD> <DD>
<A HREF="xorriso-0.1.3.tar.gz">xorriso-0.1.3.tar.gz</A> <A HREF="xorriso-0.1.7.tar.gz">xorriso-0.1.7.tar.gz</A>
(960 KB). (980 KB).
</DD> </DD>
<DT>A dynamically linked development version of xorriso can be obtained <DT>A dynamically linked development version of xorriso can be obtained
from repositories of from repositories of
@ -418,16 +402,6 @@ vanilla tools like make and gcc are needed.</DD>
</DD> </DD>
<DD>&nbsp;</DD> <DD>&nbsp;</DD>
<!--
<DD>Binary (untar and move to /usr/bin/xorriso):</DD>
<DD><A HREF="xorriso_0.1.1-x86-suse9_0.tar.gz">
xorriso_0.1.1-x86-suse9_0.tar.gz</A>, ( KB).
</DD>
<DD><A HREF="xorriso_0.1.1-x86-suse9_0-static.tar.gz">
xorriso_0.1.1-x86-suse9_0-static.tar.gz</A>, ( KB)
</DD>
-->
</DL> </DL>
</P> </P>

View File

@ -18,7 +18,7 @@
#ifndef Xorriso_private_includeD #ifndef Xorriso_private_includeD
#define Xorriso_private_includeD yes #define Xorriso_private_includeD yes
#define Xorriso_program_versioN "0.1.3" #define Xorriso_program_versioN "0.1.6"
/** The source code release timestamp */ /** The source code release timestamp */
#include "xorriso_timestamp.h" #include "xorriso_timestamp.h"
@ -46,6 +46,8 @@
typedef int (*Cleanup_app_handler_T)(); typedef int (*Cleanup_app_handler_T)();
struct LinkiteM; struct LinkiteM;
struct ExclusionS;
/* maximum number of history lines to be reported with -status:long_history */ /* maximum number of history lines to be reported with -status:long_history */
#define Xorriso_status_history_maX 100 #define Xorriso_status_history_maX 100
@ -110,6 +112,25 @@ struct XorrisO { /* the global context of xorriso */
/* >>> put libburn/isoburn aspects here */ /* >>> put libburn/isoburn aspects here */
int toc_emulation_flag; /* bit0= bit3 for isoburn_drive_aquire()
scan -ROM profiles for ISO sessions
*/
int image_start_mode; /* From what address to load the ISO image
bit0-15= addressing mode
0= automatic lba as deduced from media
1= value is session number
2= value is track number
3= value is lba
bit30= interference with normal msc1 processing
is enabled. Without this bit,
isoburn_set_msc1() will not be called.
bit31= image loading has happened,
setting is kept for rollback only.
Always apply as 0=auto.
*/
char image_start_value[81]; /* value according image_start_mode */
char indev[SfileadrL]; char indev[SfileadrL];
void *in_drive_handle; /* interpreted only by xorrisoburn.c */ void *in_drive_handle; /* interpreted only by xorrisoburn.c */
void *in_volset_handle; /* interpreted only by xorrisoburn.c */ void *in_volset_handle; /* interpreted only by xorrisoburn.c */
@ -164,6 +185,14 @@ struct XorrisO { /* the global context of xorriso */
int temp_mem_limit; int temp_mem_limit;
struct ExclusionS *disk_exclusions;
int disk_excl_mode; /* bit0= on (else off)
bit1= parameter too (else rekursion only)
bit2= whole subtree banned (else only exact path)
bit3= when comparing ignore excluded files rather
than to treat them as truely missing on disk
*/
int use_stdin; /* use raw stdin even if readline support is compiled */ int use_stdin; /* use raw stdin even if readline support is compiled */
int result_page_length; int result_page_length;
int result_page_width; int result_page_width;
@ -184,6 +213,8 @@ struct XorrisO { /* the global context of xorriso */
int errfile_mode; /* bit0= marked */ int errfile_mode; /* bit0= marked */
FILE *errfile_fp; FILE *errfile_fp;
int img_read_error_mode; /* 0=best_effort , 1=failure , 2=fatal */
char return_with_text[20]; char return_with_text[20];
int return_with_severity; int return_with_severity;
int return_with_value; int return_with_value;
@ -353,6 +384,9 @@ int Xorriso_update_interpreter(struct XorrisO *xorriso, void *boss_iter,
int compare_result, char *disk_path, int compare_result, char *disk_path,
char *iso_rr_path, int flag); char *iso_rr_path, int flag);
int Xorriso_path_is_excluded(struct XorrisO *xorriso, char *path, int flag);
int Sfile_str(char target[SfileadrL], char *source, int flag); int Sfile_str(char target[SfileadrL], char *source, int flag);
double Sfile_microtime(int flag); double Sfile_microtime(int flag);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.04.20.111419" #define Xorriso_timestamP "2008.05.18.070001"

View File

@ -499,14 +499,14 @@ int Xorriso_create_empty_iso(struct XorrisO *xorriso, int flag)
*/ */
int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag) int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
{ {
int ret, hret, not_writeable= 0, has_what; int ret, hret, not_writeable= 0, has_what, aquire_flag;
uint32_t size; uint32_t size;
struct burn_drive_info *dinfo= NULL, *out_dinfo, *in_dinfo; struct burn_drive_info *dinfo= NULL, *out_dinfo, *in_dinfo;
struct burn_drive *drive, *out_drive, *in_drive; struct burn_drive *drive, *out_drive, *in_drive;
enum burn_disc_status state; enum burn_disc_status state;
IsoImage *volset = NULL; IsoImage *volset = NULL;
struct isoburn_read_opts *ropts= NULL; struct isoburn_read_opts *ropts= NULL;
char adr_data[SfileadrL], *libburn_adr, *boot_fate; char adr_data[SfileadrL], *libburn_adr, *boot_fate, *sev;
if((flag&3)==0) { if((flag&3)==0) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
@ -550,15 +550,33 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
} }
if(dinfo==NULL) { if(dinfo==NULL) {
ret= isoburn_drive_aquire(&dinfo, libburn_adr, 1|((flag&(8|4))>>1)); aquire_flag= 1 | ((flag&(8|4))>>1) | ((xorriso->toc_emulation_flag&1)<<3);
ret= isoburn_drive_aquire(&dinfo, libburn_adr, aquire_flag);
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
if(ret<=0) { if(ret<=0) {
sprintf(xorriso->info_text,"Cannot aquire drive '%s'", adr); sprintf(xorriso->info_text,"Cannot aquire drive '%s'", adr);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex; ret= 0; goto ex;
} }
if(flag&1)
if(xorriso->image_start_mode&(1<<31)) /* used up setting */
xorriso->image_start_mode= 0; /* no need to perform auto setting */
} }
drive= dinfo[0].drive; drive= dinfo[0].drive;
if(flag&1) {
if(xorriso->image_start_mode&(1<<31)) /* used up setting */
xorriso->image_start_mode&= ~0xffff; /* perform auto setting */
if((xorriso->image_start_mode&(1<<30))) { /* if enabled at all */
ret= isoburn_set_msc1(drive, xorriso->image_start_mode & 0xffff,
xorriso->image_start_value, 0);
if(ret<=0)
goto ex;
if(xorriso->image_start_mode&(1<<31))
xorriso->image_start_mode= 0; /* disable msc1 setting completely */
else
xorriso->image_start_mode|= (1<<31); /* mark as used up */
}
}
state= isoburn_disc_get_status(drive); state= isoburn_disc_get_status(drive);
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
if(flag&1) { if(flag&1) {
@ -625,11 +643,32 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
Xorriso_set_image_severities(xorriso, 1); /* No DEBUG messages */ Xorriso_set_image_severities(xorriso, 1); /* No DEBUG messages */
Xorriso_pacifier_reset(xorriso, 0); Xorriso_pacifier_reset(xorriso, 0);
isoburn_set_read_pacifier(drive, Xorriso__read_pacifier, (void *) xorriso); isoburn_set_read_pacifier(drive, Xorriso__read_pacifier, (void *) xorriso);
if(isoburn_read_image(drive, ropts, &volset) <= 0) {
/* <<< Trying to work around too much tolerance on bad image trees.
Better would be a chance to instruct libisofs what to do in
case of image read errors. There is a risk to mistake other SORRYs.
*/
if(xorriso->img_read_error_mode>0)
iso_set_abort_severity("SORRY");
ret= isoburn_read_image(drive, ropts, &volset);
/* <<< Resetting to normal thresholds */
if(xorriso->img_read_error_mode>0)
Xorriso_set_abort_severity(xorriso, 0);
if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
Xorriso_set_image_severities(xorriso, 0); Xorriso_set_image_severities(xorriso, 0);
sprintf(xorriso->info_text,"Cannot read ISO image volset"); Xorriso_give_up_drive(xorriso, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); sprintf(xorriso->info_text,"Cannot read ISO image tree");
sev= "FAILURE";
if(xorriso->img_read_error_mode==2)
sev= "FATAL";
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, sev, 0);
if(xorriso->img_read_error_mode!=0)
Xorriso_msgs_submit(xorriso, 0, "You might get a partial or altered ISO image tree by option -error_behavior 'image_loading' 'best_effort'",
0, "HINT", 0);
ret= 3; goto ex; ret= 3; goto ex;
} }
Xorriso_pacifier_callback(xorriso, "nodes read", xorriso->pacifier_count, 0, Xorriso_pacifier_callback(xorriso, "nodes read", xorriso->pacifier_count, 0,
@ -811,7 +850,8 @@ no_track:;
padding= xorriso->padding / 2048; padding= xorriso->padding / 2048;
if(xorriso->padding > padding * 2048) if(xorriso->padding > padding * 2048)
padding++; padding++;
if(img_sectors>0 && (profile==0x09 || profile==0x0a)) { /* CD-R , CD-RW */ if(img_sectors>0 && ret>0 &&
(profile==0x09 || profile==0x0a)) { /* CD-R , CD-RW */
if(img_sectors + padding < Xorriso_cd_min_track_sizE) { if(img_sectors + padding < Xorriso_cd_min_track_sizE) {
padding= Xorriso_cd_min_track_sizE - img_sectors; padding= Xorriso_cd_min_track_sizE - img_sectors;
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
@ -849,15 +889,16 @@ ex:;
*/ */
int Xorriso_write_session(struct XorrisO *xorriso, int flag) int Xorriso_write_session(struct XorrisO *xorriso, int flag)
{ {
int ret, relax= 0, i; int ret, relax= 0, i, profile, status, num_formats;
int major, minor, micro; int major, minor, micro;
char xorriso_id[256], *img_id; unsigned dummy;
char xorriso_id[256], *img_id, profile_name[80];
struct isoburn_imgen_opts *sopts= NULL; struct isoburn_imgen_opts *sopts= NULL;
struct burn_drive_info *dinfo, *source_dinfo; struct burn_drive_info *dinfo, *source_dinfo;
struct burn_drive *drive, *source_drive; struct burn_drive *drive, *source_drive;
struct burn_disc *disc= NULL; struct burn_disc *disc= NULL;
struct burn_write_opts *burn_options; struct burn_write_opts *burn_options;
off_t readcounter= 0,writecounter= 0; off_t readcounter= 0,writecounter= 0, size;
int num_sessions= 0, num_tracks= 0; int num_sessions= 0, num_tracks= 0;
struct burn_session **sessions; struct burn_session **sessions;
struct burn_track **tracks; struct burn_track **tracks;
@ -869,6 +910,28 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
"on attempt to write", 2); "on attempt to write", 2);
if(ret<=0) if(ret<=0)
return(0); return(0);
ret= burn_disc_get_profile(drive, &profile, profile_name);
if(ret>0 && (!(flag&1)) &&
(profile==0x12 || profile==0x43)) { /* DVD-RAM or BD-RE */
ret= burn_disc_get_formats(drive, &status, &size, &dummy, &num_formats);
if(ret>0 && status==BURN_FORMAT_IS_UNFORMATTED) {
sprintf(xorriso->info_text,
"Unformatted %s media detected. Trying -format fast.",
profile_name);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
ret= Xorriso_format_media(xorriso, 1);
if(ret<=0) {
sprintf(xorriso->info_text, "Automatic formatting of %s failed",
profile_name);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(ret);
}
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
"on attempt to write", 2);
if(ret<=0)
return(0);
}
}
if(xorriso->out_drive_handle == xorriso->in_drive_handle) { if(xorriso->out_drive_handle == xorriso->in_drive_handle) {
source_drive= drive; source_drive= drive;
@ -889,7 +952,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
"-indev differs from -outdev and -outdev media is not blank"); "-indev differs from -outdev and -outdev media is not blank");
else else
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"-indev differs from -outdev and -outdev media holds valid ISO image"); "-indev differs from -outdev and -outdev media holds non-zero data");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
@ -1006,6 +1069,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
if(ret<=0) if(ret<=0)
goto ex; goto ex;
if(!isoburn_drive_wrote_well(drive)) { if(!isoburn_drive_wrote_well(drive)) {
isoburn_cancel_prepared_write(source_drive, drive, 0);
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"libburn indicates failure with writing."); "libburn indicates failure with writing.");
@ -1020,7 +1084,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
burn_track_get_counters(tracks[0],&readcounter,&writecounter); burn_track_get_counters(tracks[0],&readcounter,&writecounter);
xorriso->session_blocks= (int) (writecounter/ (off_t) 2048); xorriso->session_blocks= (int) (writecounter/ (off_t) 2048);
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"ISO image produced: %d sectors. Written to media: %d sectors at LBA %d\n", "ISO image produced: %d sectors\nWritten to media : %d sectors at LBA %d\n",
(int) (readcounter/ (off_t) 2048), (int) (readcounter/ (off_t) 2048),
xorriso->session_blocks, xorriso->session_lba); xorriso->session_blocks, xorriso->session_lba);
Xorriso_info(xorriso, 0); Xorriso_info(xorriso, 0);
@ -1265,6 +1329,7 @@ int Xorriso_node_from_path(struct XorrisO *xorriso, IsoImage *volume,
@param flag bit0= do not produce problem events (unless faulty path format) @param flag bit0= do not produce problem events (unless faulty path format)
bit1= work purely literally, do not use libisofs bit1= work purely literally, do not use libisofs
bit2= (with bit1) this is an address in the disk world bit2= (with bit1) this is an address in the disk world
bit3= return root directory as "/" and not as ""
@return -1 = faulty path format, 0 = not found , @return -1 = faulty path format, 0 = not found ,
1 = found simple node , 2 = found directory 1 = found simple node , 2 = found directory
*/ */
@ -1278,8 +1343,11 @@ int Xorriso_normalize_img_path(struct XorrisO *xorriso, char *wd,
char path[SfileadrL], *apt, *npt, sfe[5*SfileadrL], *cpt; char path[SfileadrL], *apt, *npt, sfe[5*SfileadrL], *cpt;
eff_path[0]= 0; eff_path[0]= 0;
if(img_path[0]==0) if(img_path[0]==0) {
if(flag&8)
strcpy(eff_path, "/");
return(2); /* root directory */ return(2); /* root directory */
}
if(!(flag&2)) { if(!(flag&2)) {
ret= Xorriso_get_volume(xorriso, &volume, 0); ret= Xorriso_get_volume(xorriso, &volume, 0);
@ -1303,8 +1371,11 @@ int Xorriso_normalize_img_path(struct XorrisO *xorriso, char *wd,
img_path); img_path);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FATAL", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FATAL", 0);
return(-1); return(-1);
} else if(path[1]==0) } else if(path[1]==0) {
if(flag&8)
strcpy(eff_path, "/");
return(2); /* root directory */ return(2); /* root directory */
}
for(npt= apt; !done; apt= npt+1) { for(npt= apt; !done; apt= npt+1) {
npt= strchr(apt, '/'); npt= strchr(apt, '/');
@ -1617,7 +1688,12 @@ cannot_open_dir:;
{ret= -1; goto ex;} {ret= -1; goto ex;}
} }
/* >>> compare exclusions against disk_path resp. name */; /* compare exclusions against disk_path resp. name */
ret= Xorriso_path_is_excluded(xorriso, disk_path, 0); /* (is never param) */
if(ret<0)
{ret= -1; goto ex;}
if(ret>0)
continue;
strcpy(img_name, name); strcpy(img_name, name);
if(Xorriso_much_too_long(xorriso, strlen(img_path), 0)<=0) if(Xorriso_much_too_long(xorriso, strlen(img_path), 0)<=0)
@ -1862,9 +1938,12 @@ int Xorriso_copy_properties(struct XorrisO *xorriso,
Set to NULL if calling this function from outside ISO world Set to NULL if calling this function from outside ISO world
@param flag bit0= mkdir: graft in as empty directory, not as copy from disk @param flag bit0= mkdir: graft in as empty directory, not as copy from disk
bit1= do not report added files bit1= do not report added files
bit2= -follow: this is not a command parameter bit2= -follow, -not_*: this is not a command parameter
bit3= use offset and cut_size for cut_out_node bit3= use offset and cut_size for cut_out_node
@return <=0 = error , 1 = added simple node , 2 = added directory bit4= return 3 on rejection by exclusion or user
bit5= if directory then do not add sub tree
@return <=0 = error , 1 = added simple node , 2 = added directory ,
3 = rejected
*/ */
int Xorriso_graft_in(struct XorrisO *xorriso, void *boss_iter, int Xorriso_graft_in(struct XorrisO *xorriso, void *boss_iter,
char *disk_path, char *img_path, char *disk_path, char *img_path,
@ -1879,10 +1958,11 @@ int Xorriso_graft_in(struct XorrisO *xorriso, void *boss_iter,
int target_is_split; int target_is_split;
struct stat stbuf; struct stat stbuf;
ret= Xorriso_path_is_excluded(xorriso, disk_path, !(flag&4));
/* >>> compare exclusions against disk_path resp. name if(ret<0)
but no leaf patter if flag&4 */; return(ret);
if(ret>0)
return(3*!!(flag&16));
for(cpt= img_path; 1; cpt++) { for(cpt= img_path; 1; cpt++) {
cpt= strstr(cpt,"/."); cpt= strstr(cpt,"/.");
@ -1998,7 +2078,7 @@ int Xorriso_graft_in(struct XorrisO *xorriso, void *boss_iter,
sprintf(xorriso->info_text, "User revoked adding of: %s", sprintf(xorriso->info_text, "User revoked adding of: %s",
Text_shellsafe(disk_path, sfe, 0)); Text_shellsafe(disk_path, sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
return(0); return(3*!!(flag&16));
} }
node= NULL; node= NULL;
goto handle_path_node; goto handle_path_node;
@ -2045,10 +2125,12 @@ attach_source:;
} else if(is_dir) { } else if(is_dir) {
Xorriso_transfer_properties(xorriso, &stbuf, (IsoNode *) dir, 0); Xorriso_transfer_properties(xorriso, &stbuf, (IsoNode *) dir, 0);
ret= Xorriso_add_tree(xorriso, dir, img_path, disk_path, NULL, flag&2); if(!(flag&32)) {
if(ret<=0) ret= Xorriso_add_tree(xorriso, dir, img_path, disk_path, NULL,
return(ret); flag&2);
if(ret<=0)
return(ret);
}
} else { } else {
if(resolve_link) { if(resolve_link) {
ret= Xorriso_resolve_link(xorriso, disk_path, resolved_disk_path, 0); ret= Xorriso_resolve_link(xorriso, disk_path, resolved_disk_path, 0);
@ -2097,6 +2179,9 @@ int Xorriso_cut_out(struct XorrisO *xorriso, char *disk_path,
2|4); 2|4);
if(ret<=0) if(ret<=0)
return(ret); return(ret);
ret= Xorriso_path_is_excluded(xorriso, disk_path, !(flag&1));
if(ret!=0)
return(0);
if(lstat(eff_source, &stbuf)==-1) { if(lstat(eff_source, &stbuf)==-1) {
Xorriso_msgs_submit(xorriso, 0, eff_source, 0, "ERRFILE", 0); Xorriso_msgs_submit(xorriso, 0, eff_source, 0, "ERRFILE", 0);
@ -2195,26 +2280,46 @@ int Xorriso_process_msg_queues(struct XorrisO *xorriso, int flag)
} }
#define Xorriso_use_isoburn_toC yes
/*
*/
#define Xorriso_new_toc_formaT yes
/* @param flag bit0=short report form /* @param flag bit0=short report form
bit1=report about output drive bit1=report about output drive
*/ */
int Xorriso_toc(struct XorrisO *xorriso, int flag) int Xorriso_toc(struct XorrisO *xorriso, int flag)
{ {
int num_sessions= 0, num_tracks= 0, lba= 0, nwa= -1, pmin, psec, pframe, ret; int num_sessions= 0, num_tracks= 0, lba= 0, nwa= -1, pmin, psec, pframe, ret;
int track_count= 0, session_no, track_no, profile_no= -1; int track_count= 0, session_no, track_no, profile_no= -1, track_size;
int last_track_start= 0, last_track_size= -1, num_data= 0, is_data= 0; int last_track_start= 0, last_track_size= -1, num_data= 0, is_data= 0;
int is_inout_drive= 0, drive_role; int is_inout_drive= 0, drive_role, status, num_formats;
int num_payload= 0, num_wasted= 0, num_nondata= 0; int num_payload= 0, num_wasted= 0, num_nondata= 0;
char profile_name[80],*respt,*devadr; char profile_name[80],*respt,*devadr;
struct burn_disc *disc= NULL;
struct burn_session **sessions;
struct burn_track **tracks;
struct burn_toc_entry toc_entry; struct burn_toc_entry toc_entry;
struct burn_drive_info *dinfo; struct burn_drive_info *dinfo;
struct burn_drive *drive; struct burn_drive *drive;
enum burn_disc_status s; enum burn_disc_status s;
char mem_text[80]; char mem_text[80];
off_t start_byte= 0, num_free= 0; off_t start_byte= 0, num_free= 0, size;
unsigned dummy;
#ifdef Xorriso_use_isoburn_toC
struct isoburn_toc_disc *disc= NULL;
struct isoburn_toc_session **sessions;
struct isoburn_toc_track **tracks;
#else
struct burn_disc *disc= NULL;
struct burn_session **sessions;
struct burn_track **tracks;
#endif /* ! Xorriso_use_isoburn_toC */
#ifdef Xorriso_new_toc_formaT
int image_blocks;
char volume_id[33];
struct burn_toc_entry next_toc_entry;
#endif
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive, ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
"on attempt to print Table Of Content", flag&2); "on attempt to print Table Of Content", flag&2);
@ -2275,11 +2380,25 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
if(xorriso->request_to_abort) if(xorriso->request_to_abort)
return(1); return(1);
#ifdef Xorriso_use_isoburn_toC
disc= isoburn_toc_drive_get_disc(drive);
#else
disc= burn_drive_get_disc(drive); disc= burn_drive_get_disc(drive);
#endif
#ifdef Xorriso_new_toc_formaT
sprintf(respt, "TOC layout : %3s , %9s , %10s , %s\n",
"Idx", "sbsector", "Size", "Volume Id");
if(!(flag&1))
Xorriso_result(xorriso,0);
#endif
if (disc==NULL) { if (disc==NULL) {
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
ret= isoburn_get_min_start_byte(drive, &start_byte, 0); ret= isoburn_get_min_start_byte(drive, &start_byte, 0);
nwa= start_byte / 2048; nwa= start_byte / 2048;
if(ret<=0) { if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
if(flag&1) if(flag&1)
@ -2288,39 +2407,129 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
return(0); return(0);
} }
/* fabricate TOC */ /* fabricate TOC */
#ifdef Xorriso_new_toc_formaT
ret= isoburn_read_iso_head(drive, 0, &image_blocks, volume_id, 1);
if(ret>0) {
sprintf(respt, "ISO session : %3d , %9d , %9ds , %s\n",
1, 0, image_blocks, volume_id);
nwa= image_blocks;
} else {
nwa= 0;
ret= burn_disc_get_formats(drive, &status, &size, &dummy,
&num_formats);
if(ret>0 && status==BURN_FORMAT_IS_FORMATTED)
nwa= size/2048;
sprintf(respt, "Other session: %3d , %9d , %9ds , \n",
1, 0, nwa);
}
#else /* Xorriso_new_toc_formaT */
sprintf(respt, "Media content: session %2d ", 1); sprintf(respt, "Media content: session %2d ", 1);
sprintf(respt+strlen(respt), "track %2d %s lba: %9d\n", 1, "data ", 0); sprintf(respt+strlen(respt), "track %2d %s lba: %8d\n", 1, "data ", 0);
if(!(flag&1))
Xorriso_result(xorriso,0);
sprintf(respt, "Media content: session %2d ", 1);
sprintf(respt+strlen(respt), "leadout lba: %9d\n", nwa);
#endif /* ! Xorriso_new_toc_formaT */
if(!(flag&1)) if(!(flag&1))
Xorriso_result(xorriso,0); Xorriso_result(xorriso,0);
last_track_start= lba; last_track_start= lba;
sprintf(respt, "Media content: session %2d ", 1);
sprintf(respt+strlen(respt), "leadout lba: %9d\n", nwa);
if(!(flag&1))
Xorriso_result(xorriso,0);
num_payload= num_data= last_track_size= nwa; num_payload= num_data= last_track_size= nwa;
num_sessions= 1; num_sessions= 1;
} else { } else {
#ifdef Xorriso_use_isoburn_toC
sessions= isoburn_toc_disc_get_sessions(disc, &num_sessions);
#else
sessions= burn_disc_get_sessions(disc, &num_sessions); sessions= burn_disc_get_sessions(disc, &num_sessions);
#endif
for (session_no= 0; session_no<num_sessions && !(xorriso->request_to_abort); for (session_no= 0; session_no<num_sessions && !(xorriso->request_to_abort);
session_no++) { session_no++) {
tracks = burn_session_get_tracks(sessions[session_no], &num_tracks);
#ifdef Xorriso_use_isoburn_toC
tracks= isoburn_toc_session_get_tracks(sessions[session_no], &num_tracks);
#else
tracks= burn_session_get_tracks(sessions[session_no], &num_tracks);
#endif
if (tracks==NULL) if (tracks==NULL)
continue; continue;
for(track_no= 0; track_no<num_tracks && !(xorriso->request_to_abort); for(track_no= 0; track_no<num_tracks && !(xorriso->request_to_abort);
track_no++) { track_no++) {
track_count++; track_count++;
is_data= 0; is_data= 0;
#ifdef Xorriso_use_isoburn_toC
isoburn_toc_track_get_entry(tracks[track_no], &toc_entry);
#else
burn_track_get_entry(tracks[track_no], &toc_entry); burn_track_get_entry(tracks[track_no], &toc_entry);
#endif
if (toc_entry.extensions_valid & 1) { if (toc_entry.extensions_valid & 1) {
/* DVD extension valid */ /* DVD extension valid */
lba= toc_entry.start_lba; lba= toc_entry.start_lba;
track_size= toc_entry.track_blocks;
} else { } else {
lba= burn_msf_to_lba(toc_entry.pmin, toc_entry.psec, toc_entry.pframe); lba= burn_msf_to_lba(toc_entry.pmin, toc_entry.psec,
toc_entry.pframe);
if(track_no==num_tracks-1) {
#ifdef Xorriso_use_isoburn_toC
isoburn_toc_session_get_leadout_entry(sessions[session_no],
&next_toc_entry);
#else
burn_session_get_leadout_entry(sessions[session_no],
&next_toc_entry);
#endif
} else {
#ifdef Xorriso_use_isoburn_toC
isoburn_toc_track_get_entry(tracks[track_no+1], &next_toc_entry);
#else
burn_track_get_entry(tracks[track_no+1], &next_toc_entry);
#endif
}
track_size= burn_msf_to_lba(next_toc_entry.pmin, next_toc_entry.psec,
next_toc_entry.pframe) - lba;
} }
#ifdef Xorriso_new_toc_formaT
if(flag&1)
ret= 0;
else
ret= isoburn_read_iso_head(drive, lba, &image_blocks, volume_id, 1);
if(ret>0 && track_no==0) {
sprintf(respt, "ISO session : %3d , %9d , %9ds , %s\n",
session_no+1, lba, image_blocks , volume_id);
} else if(ret>0) {
sprintf(respt, "ISO track : %3d , %9d , %9ds , %s\n",
track_count, lba, image_blocks , volume_id);
} else if(track_no==0) {
sprintf(respt, "Other session: %3d , %9d , %9ds , \n",
session_no+1, lba, track_size);
} else {
sprintf(respt, "Other track : %3d , %9d , %9ds , \n",
track_count, lba, track_size);
}
#else /* Xorriso_new_toc_formaT */
sprintf(respt, "Media content: session %2d ", session_no+1); sprintf(respt, "Media content: session %2d ", session_no+1);
sprintf(respt+strlen(respt), "track %2d %s lba: %9d\n", sprintf(respt+strlen(respt), "track %2d %s lba: %9d\n",
track_count, ((toc_entry.control&7)<4?"audio":"data "), lba); track_count, ((toc_entry.control&7)<4?"audio":"data "), lba);
#endif /* ! Xorriso_new_toc_formaT */
if(!(flag&1)) if(!(flag&1))
Xorriso_result(xorriso,0); Xorriso_result(xorriso,0);
if(track_no>0) if(track_no>0)
@ -2329,7 +2538,13 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
if((toc_entry.control&7)>=4) /* data track */ if((toc_entry.control&7)>=4) /* data track */
is_data= 1; is_data= 1;
} }
#ifdef Xorriso_use_isoburn_toC
isoburn_toc_session_get_leadout_entry(sessions[session_no], &toc_entry);
#else
burn_session_get_leadout_entry(sessions[session_no], &toc_entry); burn_session_get_leadout_entry(sessions[session_no], &toc_entry);
#endif
if (toc_entry.extensions_valid & 1) { if (toc_entry.extensions_valid & 1) {
lba= toc_entry.start_lba; lba= toc_entry.start_lba;
burn_lba_to_msf(lba, &pmin, &psec, &pframe); burn_lba_to_msf(lba, &pmin, &psec, &pframe);
@ -2337,10 +2552,14 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
lba= burn_msf_to_lba(pmin, psec, pframe); lba= burn_msf_to_lba(pmin, psec, pframe);
lba= burn_msf_to_lba(toc_entry.pmin, toc_entry.psec, toc_entry.pframe); lba= burn_msf_to_lba(toc_entry.pmin, toc_entry.psec, toc_entry.pframe);
} }
#ifndef Xorriso_new_toc_formaT
sprintf(respt, "Media content: session %2d ", session_no+1); sprintf(respt, "Media content: session %2d ", session_no+1);
sprintf(respt+strlen(respt), "leadout lba: %9d\n", lba); sprintf(respt+strlen(respt), "leadout lba: %9d\n", lba);
if(!(flag&1)) if(!(flag&1))
Xorriso_result(xorriso,0); Xorriso_result(xorriso,0);
#endif /* ! Xorriso_new_toc_formaT */
last_track_size= lba - last_track_start; last_track_size= lba - last_track_start;
num_payload+= last_track_size; num_payload+= last_track_size;
if(is_data) if(is_data)
@ -2353,20 +2572,11 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
num_nondata= lba - num_data; num_nondata= lba - num_data;
Sfile_scale(((double) num_data) * 2048.0, mem_text,5,1e4,1); Sfile_scale(((double) num_data) * 2048.0, mem_text,5,1e4,1);
#ifdef NIX
sprintf(respt, "Media summary: %d session%s, %d data blocks, %s",
num_sessions, (num_sessions==1 ? "" : "s"), num_data, mem_text);
if(num_nondata>0) {
Sfile_scale(((double) num_nondata) * 2048.0, mem_text,5,1e4,1);
sprintf(respt+strlen(respt), ", %s non-data", mem_text);
}
#else
sprintf(respt, "Media summary: %d session%s, %d data blocks, %s data", sprintf(respt, "Media summary: %d session%s, %d data blocks, %s data",
num_sessions, (num_sessions==1 ? "" : "s"), num_data, mem_text); num_sessions, (num_sessions==1 ? "" : "s"), num_data, mem_text);
num_free= isoburn_disc_available_space(drive, NULL); num_free= isoburn_disc_available_space(drive, NULL);
Sfile_scale((double) num_free, mem_text,5,1e4,1); Sfile_scale((double) num_free, mem_text,5,1e4,1);
sprintf(respt+strlen(respt), ", %s free", mem_text); sprintf(respt+strlen(respt), ", %s free", mem_text);
#endif
sprintf(respt+strlen(respt), "\n"); sprintf(respt+strlen(respt), "\n");
Xorriso_result(xorriso,0); Xorriso_result(xorriso,0);
@ -2381,7 +2591,13 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
} }
if (disc!=NULL) if (disc!=NULL)
#ifdef Xorriso_use_isoburn_toC
isoburn_toc_disc_free(disc);
#else
burn_disc_free(disc); burn_disc_free(disc);
#endif
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
return(1); return(1);
} }
@ -2489,6 +2705,7 @@ int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
double percent = 1.0; double percent = 1.0;
int current_profile; int current_profile;
char current_profile_name[80]; char current_profile_name[80];
time_t start_time;
char mode_names[4][80]= {"all", "fast", "deformat", "deformat_quickest"}; char mode_names[4][80]= {"all", "fast", "deformat", "deformat_quickest"};
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive, ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
@ -2498,8 +2715,6 @@ int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
burn_disc_get_profile(drive, &current_profile, current_profile_name); burn_disc_get_profile(drive, &current_profile, current_profile_name);
/* >>> */;
disc_state = isoburn_disc_get_status(drive); disc_state = isoburn_disc_get_status(drive);
if(current_profile == 0x13) { /* overwriteable DVD-RW */ if(current_profile == 0x13) { /* overwriteable DVD-RW */
/* Depending on flag bit1 formatted DVD-RW will get blanked to sequential /* Depending on flag bit1 formatted DVD-RW will get blanked to sequential
@ -2551,11 +2766,14 @@ int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
burn_disc_erase(drive, (flag&1)); burn_disc_erase(drive, (flag&1));
else else
isoburn_disc_erase(drive, (flag&1)); isoburn_disc_erase(drive, (flag&1));
start_time= time(0);
usleep(1000000); usleep(1000000);
while (burn_drive_get_status(drive, &p) != BURN_DRIVE_IDLE) { while (burn_drive_get_status(drive, &p) != BURN_DRIVE_IDLE) {
Xorriso_process_msg_queues(xorriso,0);
if(p.sectors>0 && p.sector>=0) /* display 1 to 99 percent */ if(p.sectors>0 && p.sector>=0) /* display 1 to 99 percent */
percent = 1.0 + ((double) p.sector+1.0) / ((double) p.sectors) * 98.0; percent = 1.0 + ((double) p.sector+1.0) / ((double) p.sectors) * 98.0;
sprintf(xorriso->info_text, "Blanking ( %.1f%% done )", percent); sprintf(xorriso->info_text, "Blanking ( %.1f%% done in %d seconds )",
percent, (int) (time(0) - start_time));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "UPDATE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "UPDATE", 0);
usleep(1000000); usleep(1000000);
} }
@ -2565,35 +2783,94 @@ int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
return(1); return(1);
} }
/* @return 0=failure, did not touch media , -1=failure, altered media
/* @param flag bit0= try to achieve faster formatting
bit7= by_index mode:
bit8 to bit15 contain the index of the format to use.
@return 0=failure, did not touch media , -1=failure, altered media
1=success, altered media , 2=success, did not touch media 1=success, altered media , 2=success, did not touch media
*/ */
int Xorriso_format_media(struct XorrisO *xorriso, int flag) int Xorriso_format_media(struct XorrisO *xorriso, int flag)
{ {
int ret, mode_flag= 0; int ret, mode_flag= 0, index, status, num_formats;
unsigned dummy;
struct burn_drive_info *dinfo; struct burn_drive_info *dinfo;
struct burn_drive *drive; struct burn_drive *drive;
struct burn_progress p;
double percent = 1.0;
int current_profile; int current_profile;
char current_profile_name[80]; char current_profile_name[80];
off_t size= 0;
time_t start_time;
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive, ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
"on attempt to -format", 2); "on attempt to -format", 2);
if(ret<=0) if(ret<=0)
return(0); return(0);
mode_flag= 4; /* format to full size */
burn_disc_get_profile(drive, &current_profile, current_profile_name); burn_disc_get_profile(drive, &current_profile, current_profile_name);
if(current_profile == 0x14) {
; /* ok DVD-RW sequential */ if(flag&128) { /* by_index */
} else if(current_profile == 0x1a) { index= (flag>>8) & 0xff;
mode_flag= 2; ret= burn_disc_get_formats(drive, &status, &size, &dummy, &num_formats);
if(ret<=0)
num_formats= 0;
if(ret<=0 || index<0 || index>=num_formats) {
if(num_formats>0)
sprintf(xorriso->info_text,
"-format by_index_%d: format descriptors range from index 0 to %d",
index, num_formats-1);
else
sprintf(xorriso->info_text,
"-format by_index_%d: no format descriptors available", index);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
mode_flag= (flag & 0xff80) | 4; /* with size taken from descriptor */
if(flag&1)
mode_flag|= (1<<6);
} else if(current_profile == 0x12) { /* DVD+RAM */
mode_flag= 6; /* format to default payload size */
if(flag&1)
mode_flag|= (1<<6);
} else if(current_profile == 0x13) { /* DVD-RW */
if(flag&1) {
sprintf(xorriso->info_text,
"Detected formatted DVD-RW. Thus omitting desired fast format run.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
return(2);
}
} else if(current_profile == 0x14) { /* DVD-RW sequential */
if(flag&1) {
size= 128*1024*1024;
mode_flag= 1; /* format to size, then write size of zeros */
}
} else if(current_profile == 0x1a) { /* DVD+RW */
if(flag&1) {
sprintf(xorriso->info_text,
"Detected DVD+RW. Thus omitting desired fast format run.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
return(2);
}
} else if(current_profile == 0x43) { /* BD-RE */
mode_flag= 6; /* format to default payload size */
if(flag&1)
mode_flag|= (1<<6);
} else { } else {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"Can only -format DVD+RW and sequential DVD-RW"); "-format: Unsuitable media detected.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
sprintf(xorriso->info_text,"Media current: %s (%4.4xh)", sprintf(xorriso->info_text,"Media current: %s (%4.4xh)",
current_profile_name, current_profile); current_profile_name, current_profile);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
return 0; return(0);
} }
if(xorriso->do_dummy) { if(xorriso->do_dummy) {
@ -2603,11 +2880,19 @@ int Xorriso_format_media(struct XorrisO *xorriso, int flag)
} }
sprintf(xorriso->info_text, "Beginning to format media.\n"); sprintf(xorriso->info_text, "Beginning to format media.\n");
Xorriso_info(xorriso, 0); Xorriso_info(xorriso, 0);
burn_disc_format(drive, (off_t) 0, mode_flag); burn_disc_format(drive, size, mode_flag);
ret= Xorriso_pacifier_loop(xorriso, drive, 0); start_time= time(0);
if(ret<=0) usleep(1000000);
return(ret); while (burn_drive_get_status(drive, &p) != BURN_DRIVE_IDLE) {
Xorriso_process_msg_queues(xorriso,0);
if(p.sectors>0 && p.sector>=0) /* display 1 to 99 percent */
percent = 1.0 + ((double) p.sector+1.0) / ((double) p.sectors) * 98.0;
sprintf(xorriso->info_text, "Formatting ( %.1f%% done in %d seconds )",
percent, (int) (time(0) - start_time));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "UPDATE", 0);
usleep(1000000);
}
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, "Formatting done\n"); sprintf(xorriso->info_text, "Formatting done\n");
@ -2616,6 +2901,135 @@ int Xorriso_format_media(struct XorrisO *xorriso, int flag)
} }
/* @param flag bit2= formatting rather than blanking
@return 0=failure, did not touch media , -1=failure, altered media
1=success, altered media , 2=success, did not touch media
*/
int Xorriso_blank_as_needed(struct XorrisO *xorriso, int flag)
{
int ret, is_formatted= -1, status, num_formats;
struct burn_drive_info *dinfo;
struct burn_drive *drive;
enum burn_disc_status disc_state;
unsigned dummy;
int current_profile;
char current_profile_name[80];
off_t size;
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
"on attempt to blank or format", 2);
if(ret<=0)
return(0);
burn_disc_get_profile(drive, &current_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(current_profile == 0x12 || current_profile == 0x43) { /* DVD+RAM , BD-RE */
if(is_formatted<0) {
sprintf(xorriso->info_text,
"-blank or -format: Unclear formatting status of %s",
current_profile_name);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
if(!is_formatted) {
ret= Xorriso_format_media(xorriso, 0);
return(ret);
}
} else if(current_profile == 0x14 && (flag&4)) { /* DVD-RW sequential */
ret= Xorriso_format_media(xorriso, 0);
return(ret);
}
disc_state = isoburn_disc_get_status(drive);
if(disc_state != BURN_DISC_BLANK && !(flag&4)) {
ret= Xorriso_blank_media(xorriso, 1);
return(ret);
}
sprintf(xorriso->info_text, "%s as_needed: no need for action detected",
(flag&4) ? "-format" : "-blank");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
return(2);
}
/* @return <=0 error, 1 success
*/
int Xorriso_list_formats(struct XorrisO *xorriso, int flag)
{
int ret, i, status, num_formats, profile_no, type;
off_t size;
unsigned dummy;
char status_text[80], profile_name[90], *respt;
struct burn_drive_info *dinfo;
struct burn_drive *drive;
respt= xorriso->result_line;
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
"on attempt to obtain format descriptor list", 2);
if(ret<=0)
return(0);
ret= burn_drive_get_drive_role(drive);
if(ret!=1) {
sprintf(xorriso->info_text,
"output device is not an MMC drive. -list_format does not apply");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
ret= 2; goto ex;
}
ret = burn_disc_get_formats(drive, &status, &size, &dummy,
&num_formats);
if(ret<=0) {
sprintf(xorriso->info_text, "Cannot obtain format list info");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
ret= Xorriso_toc(xorriso, 3);
if(ret<=0)
goto ex;
ret= burn_disc_get_profile(drive, &profile_no, profile_name);
if(ret<=0)
goto ex;
if(status == BURN_FORMAT_IS_UNFORMATTED)
sprintf(status_text, "unformatted, up to %.1f MiB",
((double) size) / 1024.0 / 1024.0);
else if(status == BURN_FORMAT_IS_FORMATTED) {
if(profile_no==0x12 || profile_no==0x13 || profile_no==0x1a ||
profile_no==0x43)
sprintf(status_text, "formatted, with %.1f MiB",
((double) size) / 1024.0 / 1024.0);
else
sprintf(status_text, "written, with %.1f MiB",
((double) size) / 1024.0 / 1024.0);
} else if(status == BURN_FORMAT_IS_UNKNOWN) {
if (profile_no > 0)
sprintf(status_text, "intermediate or unknown");
else
sprintf(status_text, "no media or unknown media");
} else
sprintf(status_text, "illegal status according to MMC-5");
sprintf(respt, "Format status: %s\n", status_text);
Xorriso_result(xorriso,0);
for (i= 0; i < num_formats; i++) {
ret= burn_disc_get_format_descr(drive, i, &type, &size, &dummy);
if (ret <= 0)
continue;
sprintf(respt, "Format idx %-2d: %2.2Xh , %.fs , %.1f MiB\n",
i, type, ((double) size) / 2048.0, ((double) size) / 1024.0/1024.0);
Xorriso_result(xorriso,0);
}
ret= 1;
ex:;
return(ret);
}
int Xorriso_cannot_create_iter(struct XorrisO *xorriso, int iso_error,int flag) int Xorriso_cannot_create_iter(struct XorrisO *xorriso, int iso_error,int flag)
{ {
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
@ -3299,6 +3713,8 @@ int Xorriso_iso_lstat(struct XorrisO *xorriso, char *path, struct stat *stbuf,
ret= Xorriso_fake_stbuf(xorriso, path, stbuf, &node, 0); ret= Xorriso_fake_stbuf(xorriso, path, stbuf, &node, 0);
if(ret>0) if(ret>0)
return(0); return(0);
if(ret<0)
return(-2);
return(-1); return(-1);
} }
@ -4189,7 +4605,7 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
IsoDirIter *iter= NULL; IsoDirIter *iter= NULL;
IsoDir *dir_node= NULL; IsoDir *dir_node= NULL;
IsoNode *node, *iso_node; IsoNode *node, *iso_node;
IsoImage *volume; IsoImage *volume= NULL;
struct stat stbuf; struct stat stbuf;
char *name; char *name;
off_t mem; off_t mem;
@ -4225,7 +4641,6 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
if(ret<=0) if(ret<=0)
{ret= 0; goto ex;} {ret= 0; goto ex;}
ret= Xorriso_fake_stbuf(xorriso, "", dir_stbuf, &iso_node, 1); ret= Xorriso_fake_stbuf(xorriso, "", dir_stbuf, &iso_node, 1);
dir_node= (IsoDir *) iso_node;
if(ret<=0) if(ret<=0)
goto ex; goto ex;
@ -4245,8 +4660,18 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
if(ret<=0) if(ret<=0)
goto ex; goto ex;
if(ret==2) { if(ret==2) {
deleted= 1; /* re-determine dir_node in case it has a new persona */
goto ex; ret= Xorriso_node_from_path(xorriso, volume, path, &iso_node, 1);
if(ret==0) {
deleted= 1;
{ret= 2; goto ex;}
}
if(ret<0)
{ret= 0; goto ex;}
dir_node= (IsoDir *) iso_node;
ret= Xorriso_fake_stbuf(xorriso, "", dir_stbuf, &iso_node, 1);
if(ret<=0)
goto ex;
} }
if(ret==3) if(ret==3)
no_dive= 1; no_dive= 1;
@ -4257,7 +4682,7 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
mem= boss_mem; mem= boss_mem;
hflag= 1; hflag= 1;
if(action==1 || action==2 || action==3 || action==14) if(action==1 || action==2 || action==3 || action==17)
hflag|= 2; /* need freedom to manipulate image */ hflag|= 2; /* need freedom to manipulate image */
if(action==14 || action==17) if(action==14 || action==17)
hflag|= 4; /* need LBA sorted iteration for good data reading performance */ hflag|= 4; /* need LBA sorted iteration for good data reading performance */
@ -4298,8 +4723,24 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
goto ex; goto ex;
ret= Xorriso_findi_action(xorriso, job, iter, mem, ret= Xorriso_findi_action(xorriso, job, iter, mem,
abs_path, path, node, depth, 1|(flag&2)); abs_path, path, node, depth, 1|(flag&2));
if(ret==2) /* node has been deleted */ if(ret==2) { /* node has been deleted */
/* re-determine node in case it has a new persona */
if(volume==NULL) {
ret= Xorriso_get_volume(xorriso, &volume, 0);
if(ret<=0)
{ret= -1; goto ex;}
}
ret= Xorriso_node_from_path(xorriso, volume, abs_path, &node, 1);
if(ret==0)
continue; continue;
if(ret<0)
{ret= 0; goto ex;}
ret= Xorriso_fake_stbuf(xorriso, "", &stbuf, &node, 1);
if(ret<0)
goto ex;
if(ret==0)
continue;
}
no_dive= (ret==3); no_dive= (ret==3);
if(ret<=0) { if(ret<=0) {
if(Xorriso_eval_problem_status(xorriso, ret, 1|2)<0) if(Xorriso_eval_problem_status(xorriso, ret, 1|2)<0)
@ -4397,21 +4838,23 @@ int Xorriso_set_publisher(struct XorrisO *xorriso, char *name, int flag)
/* @param flag bit0=prepare for a burn run */ /* @param flag bit0=prepare for a burn run */
int Xorriso_set_abort_severity(struct XorrisO *xorriso, int flag) int Xorriso_set_abort_severity(struct XorrisO *xorriso, int flag)
{ {
int ret; int ret, abort_on_number;
char *sev_text;
static int note_number= -1, failure_number= -1;
/* ??? <<< On MISHAP use FAILURE as abort severity known to libisofs. if(note_number==-1)
On ERRFILE use NEVER. Xorriso__text_to_sev("NOTE", &note_number, 0);
The pacifier loop will care for canceling libburn on MISHAP if(failure_number==-1)
and thus also cancel the image generation. Xorriso__text_to_sev("FAILURE", &failure_number, 0);
with libisofs-0.6.4 this should not be necessary sev_text= xorriso->abort_on_text;
Shall it be uphold anyway ? ret= Xorriso__text_to_sev(xorriso->abort_on_text, &abort_on_number, 0);
*/ if(ret<=0)
if((flag&1) && strcmp(xorriso->abort_on_text, "MISHAP")==0) return(ret);
ret= iso_set_abort_severity("FAILURE"); if(abort_on_number<note_number)
else if((flag&1) && strcmp(xorriso->abort_on_text, "ERRFILE")==0) sev_text= "NOTE";
ret= iso_set_abort_severity("NEVER"); else if(abort_on_number>failure_number)
else sev_text= "FAILURE";
ret= iso_set_abort_severity(xorriso->abort_on_text); ret= iso_set_abort_severity(sev_text);
return(ret>=0); return(ret>=0);
} }
@ -4703,7 +5146,8 @@ int Xorriso_get_profile(struct XorrisO *xorriso, int *profile_number,
*profile_number= 0; *profile_number= 0;
profile_name[0]= 0; profile_name[0]= 0;
if(xorriso->out_drive_handle==NULL) if(((flag&2) && xorriso->out_drive_handle==NULL) ||
((!(flag&2)) && xorriso->in_drive_handle==NULL))
return(0); return(0);
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive, ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
"on attempt to determine media type", flag&2); "on attempt to determine media type", flag&2);

View File

@ -21,7 +21,7 @@ struct FindjoB;
*/ */
#define xorriso_libisoburn_req_major 0 #define xorriso_libisoburn_req_major 0
#define xorriso_libisoburn_req_minor 1 #define xorriso_libisoburn_req_minor 1
#define xorriso_libisoburn_req_micro 3 #define xorriso_libisoburn_req_micro 6
int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag); int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag);
@ -62,10 +62,29 @@ int Xorriso_show_devices(struct XorrisO *xorriso, int flag);
int Xorriso_tell_media_space(struct XorrisO *xorriso, int Xorriso_tell_media_space(struct XorrisO *xorriso,
int *media_space, int *free_space, int flag); int *media_space, int *free_space, int flag);
/* @param flag bit0=fast , bit1=deformat
@return 0=failure, did not touch media , -1=failure, altered media
1=success, altered media , 2=success, did not touch media
*/
int Xorriso_blank_media(struct XorrisO *xorriso, int flag); int Xorriso_blank_media(struct XorrisO *xorriso, int flag);
/* @param flag bit0= try to achieve faster formatting
@return 0=failure, did not touch media , -1=failure, altered media
1=success, altered media , 2=success, did not touch media
*/
int Xorriso_format_media(struct XorrisO *xorriso, int flag); int Xorriso_format_media(struct XorrisO *xorriso, int flag);
/* @return <=0 error, 1 success
*/
int Xorriso_list_formats(struct XorrisO *xorriso, int flag);
/* @param flag bit2= formatting rather than blanking
@return 0=failure, did not touch media , -1=failure, altered media
1=success, altered media , 2=success, did not touch media
*/
int Xorriso_blank_as_needed(struct XorrisO *xorriso, int flag);
/* @param boss_iter Opaque internal handle. Use NULL outside xorrisoburn.c : /* @param boss_iter Opaque internal handle. Use NULL outside xorrisoburn.c :
If not NULL then this is an iterator suitable for If not NULL then this is an iterator suitable for
iso_dir_iter_remove() which is then to be used instead iso_dir_iter_remove() which is then to be used instead
@ -158,7 +177,9 @@ int Xorriso_set_abort_severity(struct XorrisO *xorriso, int flag);
int Xorriso_report_lib_versions(struct XorrisO *xorriso, int flag); int Xorriso_report_lib_versions(struct XorrisO *xorriso, int flag);
/* @return 0= stbuf content is valid , -1 = path not found */ /* @return 0= stbuf content is valid ,
-1 = path not found , -2 = severe error occured
*/
int Xorriso_iso_lstat(struct XorrisO *xorriso, char *path, struct stat *stbuf, int Xorriso_iso_lstat(struct XorrisO *xorriso, char *path, struct stat *stbuf,
int flag); int flag);