Compare commits

...

73 Commits

Author SHA1 Message Date
Thomas Schmitt a26df9c49f Bug fix: Command -truncate_overwritable on ISO image without MD5 caused double free of memory 2024-04-27 18:53:40 +02:00
Thomas Schmitt 2af1e90639 Bug fix: Command -load "volid" did not work with constant search text 2024-04-27 18:51:22 +02:00
Thomas Schmitt ccb29eae32 Correction to commit 86261b7: Sector bitmaps could not be read any more 2024-04-27 18:41:56 +02:00
Thomas Schmitt abf4375b63 Corrected a comment about Xorriso_findi_iter() 2024-04-20 16:56:34 +02:00
Thomas Schmitt 3955462767 Mentioned in man xorrecord that write_start_address= expects bytes not blocks 2024-04-19 18:03:53 +02:00
Thomas Schmitt 7f9d140d0d Small correction of commit 646d15a 2024-04-19 12:52:57 +02:00
Thomas Schmitt fb23fe1446 Follow-up to commit ba12014: Made use of more isoburn*_v2() calls 2024-04-03 18:56:09 +02:00
Thomas Schmitt ffaa15ed53 Prevented possible overflow of struct elto_img_par.extract_size 2024-04-02 20:11:08 +02:00
Thomas Schmitt 4fe385baed Made struct xorriso_md5_state ready for long block addresses 2024-03-28 15:51:52 +01:00
Thomas Schmitt 14676ef132 Made Xorriso_format_media() ready for long block adresses 2024-03-24 10:09:54 +01:00
Thomas Schmitt fcad0813dc Made Xorriso_blank_media() ready for long block adresses 2024-03-24 09:48:04 +01:00
Thomas Schmitt c74f175972 Made struct XorrisO ready for long block adresses 2024-03-24 09:32:01 +01:00
Thomas Schmitt 5de4a8dd45 Made Xorriso_adjust_relocated_sb() ready for long block adresses 2024-03-23 22:21:43 +01:00
Thomas Schmitt 2d8678a11b Made Xorriso_adjust_session_size() ready for long block adresses 2024-03-23 19:42:37 +01:00
Thomas Schmitt 41a91dfe86 Made Xorriso_overwrite_iso_head() ready for long block adresses, part 2 2024-03-23 18:52:54 +01:00
Thomas Schmitt fa7ba62660 Made Xorriso_refresh_ts_tags() ready for long block adresses 2024-03-23 18:30:44 +01:00
Thomas Schmitt 8c61d88404 Made Xorriso_update_iso_lba0() ready for long block adresses 2024-03-22 22:32:58 +01:00
Thomas Schmitt 9377f667b5 Made Xorriso_overwrite_iso_head() ready for long block adresses 2024-03-22 17:59:56 +01:00
Thomas Schmitt f1e00c3e4c Made Xorriso_burn_track() ready for long block adresses 2024-03-22 17:19:00 +01:00
Thomas Schmitt ce3f23b75d Made Xorriso_pacifier_loop() ready for long block adresses 2024-03-22 14:34:45 +01:00
Thomas Schmitt c8788712fc Made Xorriso_write_session() ready for long block adresses 2024-03-21 22:25:31 +01:00
Thomas Schmitt d635037661 Made Xorriso_set_system_area() ready for long block adresses 2024-03-21 21:34:11 +01:00
Thomas Schmitt fb780b59cb Made Xorriso_sanitize_image_size() ready for long block adresses 2024-03-21 20:42:23 +01:00
Thomas Schmitt 2d3302db51 Made Xorriso__file_start_lba() ready for long block adresses 2024-03-21 19:28:34 +01:00
Thomas Schmitt 698bee2621 Made Xorriso__start_end_lbas() ready for long block adresses 2024-03-21 17:52:51 +01:00
Thomas Schmitt ec7ab520ba Made Xorriso_path_from_lba() ready for long block adresses 2024-03-21 16:07:16 +01:00
Thomas Schmitt 458b0cb3de Made Xorriso_obtain_indev_readsize() ready for long block adresses 2024-03-21 09:44:51 +01:00
Thomas Schmitt 5e03c659e3 Updated copyright date in various recently changed files 2024-03-20 22:52:07 +01:00
Thomas Schmitt 4c7cfe96d9 Made Xorriso_assert_volid() ready for long block adresses 2024-03-20 22:38:23 +01:00
Thomas Schmitt cdffa4efee Made struct ExprtesT test -lba_range ready for long block adresses 2024-03-20 16:05:35 +01:00
Thomas Schmitt 435521a2c9 Made Xorriso_tell_media_space() ready for long block adresses 2024-03-20 12:45:09 +01:00
Thomas Schmitt c64e48d588 Made Xorriso_tell_media_space() ready for long block adresses 2024-03-19 21:54:14 +01:00
Thomas Schmitt 662b305d12 Made Xorriso_toc() ready for long block adresses 2024-03-19 19:59:06 +01:00
Thomas Schmitt 82deb547c0 Made Xorriso_aquire_drive() ready for long block adresses 2024-03-19 12:24:00 +01:00
Thomas Schmitt d24634af3d Bug fix: -outdev holding an ISO filesystem could get attached wrong start LBA 2024-03-19 10:02:06 +01:00
Thomas Schmitt e6e93a9803 Made Xorriso_make_read_options() ready for long block adresses 2024-03-18 22:43:29 +01:00
Thomas Schmitt b8b0f41320 Made Xorriso_make_mount_cmd() ready for long block adresses 2024-03-18 21:40:38 +01:00
Thomas Schmitt 949a4c3bd0 Updated copyright date in read_run.c 2024-03-18 21:20:17 +01:00
Thomas Schmitt 19e1ceec26 Made Xorriso_check_media() ready for long block adresses 2024-03-18 18:38:53 +01:00
Thomas Schmitt 969ee9d6f5 Made struct CheckmediajoB ready for long block adresses 2024-03-18 09:44:24 +01:00
Thomas Schmitt ba12014d46 Made structs SpotlistiteM and SpotlisT ready for long block adresses 2024-03-17 22:07:23 +01:00
Thomas Schmitt 86261b7972 Introduced xorriso sector bitmap v3 with 8-byte N and S 2024-03-17 17:09:00 +01:00
Thomas Schmitt 73b3923f72 Made struct SectorbitmaP ready for long block adresses 2024-03-17 16:26:38 +01:00
Thomas Schmitt a07addd083 Replaced non-API isoburn_get_track_lba() by isoburn_get_track_lba_v2() 2024-03-10 12:30:44 +01:00
Thomas Schmitt bae9516439 Made isoburn_make_iso_read_opts() ready for long block adresses 2024-03-10 12:24:09 +01:00
Thomas Schmitt d0682a17b9 Made isoburn_set_msc1() ready for long block adresses 2024-03-10 12:13:20 +01:00
Thomas Schmitt aebd2b92ca Made isoburn_welcome_media() ready for large block adresses 2024-03-10 11:57:58 +01:00
Thomas Schmitt fbeec724d7 Made use of _v2 calls when creating an isoburn_imgen_opts object 2024-03-10 11:12:26 +01:00
Thomas Schmitt bdc9164787 Made isoburn_prepare_disc_aux ready for unsigned 32 bit 2024-03-10 08:59:06 +01:00
Thomas Schmitt 9003e477e7 Made off_t sized burn_toc_entry fields valid in fabricated entries 2024-03-10 08:55:44 +01:00
Thomas Schmitt 8d33881cd6 New API call isoburn_prepare_blind_grow_v2() 2024-03-10 08:26:09 +01:00
Thomas Schmitt dd92a6e0d7 New API calls isoburn_attach_start_lba_v2(), isoburn_disc_get_msc1_v2(), isoburn_disc_track_lba_nwa_v2() 2024-03-09 23:37:12 +01:00
Thomas Schmitt 646d15af46 New API call isoburn_get_attached_start_lba_v2() 2024-03-09 22:21:18 +01:00
Thomas Schmitt 423c14828c New API calls isoburn_igopt_get_effective_lba_v2(), isoburn_igopt_get_data_start_v2() 2024-03-09 22:05:18 +01:00
Thomas Schmitt e7326e0e6c New API calls isoburn_read_iso_head_v2(), isoburn_get_mount_params_v2() 2024-03-09 21:49:26 +01:00
Thomas Schmitt a86d1378ff New API calls isoburn_toc_disc_get_sectors_v2, isoburn_toc_session_get_sectors_v2, isoburn_toc_track_get_emul_v2 2024-03-09 19:31:19 +01:00
Thomas Schmitt c1e563341d Augmented structs isoburn, isoburn_toc_entry, isoburn_imgen_opts for long block addresses 2024-03-09 19:08:11 +01:00
Thomas Schmitt 280c78a2a6 Demanding libburn 1.5.7 2024-03-09 18:03:13 +01:00
Thomas Schmitt 92c4d5b45a Updated change log and web page 2023-11-21 11:50:57 +01:00
Thomas Schmitt aace531ca8 Improved handling of hidden boot images in -boot_image cmd/as_mkisofs/replay 2023-11-21 11:32:38 +01:00
Thomas Schmitt 651f42955d New -as mkisofs options -cut_out and -hide_iso_path 2023-11-20 11:50:38 +01:00
Thomas Schmitt e383d3adbe Updated change log and web page 2023-08-08 19:32:31 +02:00
Thomas Schmitt 2de0667393 Using Xorriso_change_is_pending() bit1 at end of program 2023-08-08 13:45:38 +02:00
Thomas Schmitt ab0bfdb04f New bit1 with API call Xorriso_change_is_pending() issues a note if return is 0 and indev and outdev point to different drives 2023-08-08 13:43:51 +02:00
Thomas Schmitt 0b7e4f934e New -append_partition pseudo partition_number "all" und pseudo type_code "revoke" 2023-08-07 15:26:51 +02:00
Thomas Schmitt aaaa0a99c4 Let -boot_image show_status display info about -append_partition status 2023-08-06 15:31:25 +02:00
Thomas Schmitt f3af549e92 Bug fix: -boot_image and -append_partition were not perceived as image manipulation which makes production of an ISO image worthwhile. Thanks Cameron Seader. 2023-08-06 15:24:28 +02:00
Thomas Schmitt 1a44cbda91 Silenced some harmless warnings of Fedora build process 2023-07-21 09:00:53 +02:00
Thomas Schmitt 11c5f6585a Enabled recognition of multi-session emulation with partition offset 16 and GPT 2023-07-12 20:32:56 +02:00
Thomas Schmitt 9b17a8a24a Updated change log and web page 2023-06-20 19:43:06 +02:00
Thomas Schmitt 1807f04f4d Updated change log and web page 2023-06-12 21:46:04 +02:00
Thomas Schmitt a22f6b8391 Documented changes and release timestamp 2023-06-07 23:17:20 +02:00
Thomas Schmitt 5a869b17a9 Version leap to libisoburn-1.5.7 2023-06-07 22:46:21 +02:00
67 changed files with 2128 additions and 897 deletions

View File

@ -1,3 +1,25 @@
git clone git@dev.lovelyhq.com:libburnia/libisoburn.git
(to become libisoburn-1.5.8 or higher)
===============================================================================
* Bug fix: -boot_image and -append_partition were not perceived as image
manipulation which makes production of an ISO image worthwhile.
Thanks Cameron Seader.
* New -append_partition pseudo partition_number "all" and
pseudo type_code "revoke"
* New bit1 with API call Xorriso_change_is_pending() issues a note if
return is 0 and indev and outdev point to different drives
* New -as mkisofs options -cut_out and -hide_iso_path
* Improved handling of hidden boot images in -boot_image cmd/as_mkisofs/replay
GNU xorriso-1.5.6.pl02.tar.gz Wed Jun 14 2023
===============================================================================
* Bug fix: On non-GNU/Linux systems ssize_t was not defined in libisofs file
rockridge.h . Report and fix proposal by Rui Chen.
GNU xorriso-1.5.6.pl01.tar.gz Mon Jun 12 2023
===============================================================================
(A failed attempt to create a tarball with a fixed libisofs/rockridge.h)
libisoburn-1.5.6.tar.gz Wed Jun 07 2023
===============================================================================
* Bug fix: False -status failure with -boot_image --interval:appended_partition

View File

@ -1,6 +1,6 @@
AC_INIT([libisoburn], [1.5.6], [http://libburnia-project.org])
AC_INIT([libisoburn], [1.5.7], [http://libburnia-project.org])
AC_PREREQ([2.50])
dnl AC_CONFIG_HEADER([config.h])
dnl AC_CONFIG_HEADER([config.h])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
@ -24,7 +24,7 @@ dnl
dnl These three are only copies to provide libtool with unused LT_RELEASE
ISOBURN_MAJOR_VERSION=1
ISOBURN_MINOR_VERSION=5
ISOBURN_MICRO_VERSION=6
ISOBURN_MICRO_VERSION=7
dnl ISOBURN_VERSION=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION.$ISOBURN_MICRO_VERSION
@ -38,15 +38,15 @@ dnl Generate libisoburn.so.1.x.y
dnl SONAME will become LT_CURRENT - LT_AGE
dnl
dnl ts C30607
dnl This is the release version 1.5.6 = libisoburn.so.1.113.0
dnl ### This is the development version after above stable release
dnl LT_CURRENT++, LT_AGE++ have not happened yet.
dnl ### LT_CURRENT++, LT_AGE++ has happened meanwhile.
dnl ### This is the release version 1.5.6 = libisoburn.so.1.113.0
dnl This is the development version after above stable release
dnl ### LT_CURRENT++, LT_AGE++ have not happened yet.
dnl LT_CURRENT++, LT_AGE++ has happened meanwhile.
dnl
dnl SONAME = 114 - 113 = 1 . Library name = libisoburn.so.1.113.0
dnl SONAME = 115 - 114 = 1 . Library name = libisoburn.so.1.114.0
LT_RELEASE=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION
LT_CURRENT=114
LT_AGE=113
LT_CURRENT=115
LT_AGE=114
LT_REVISION=0
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
@ -459,7 +459,7 @@ if test x$enable_pkg_check_modules = xyes; then
dnl If PKG_CHECK_MODULES is to be used after this if-block,
dnl then it might be necessary to perform PKG_PROG_PKG_CONFIG before the block.
LIBBURN_REQUIRED=1.5.6
LIBBURN_REQUIRED=1.5.7
LIBISOFS_REQUIRED=1.5.6
PKG_CHECK_MODULES(LIBBURN, libburn-1 >= $LIBBURN_REQUIRED)
PKG_CHECK_MODULES(LIBISOFS, libisofs-1 >= $LIBISOFS_REQUIRED)

View File

@ -23,7 +23,7 @@
# And, well, a graphical widget set would be nice.
set own_version "1.5.6"
set own_version "1.5.7"
# Minimum version of xorriso to be used as backend process.
# Older versions of xorriso do not offer commands -msg_op and -launch_frontend

View File

@ -6,7 +6,7 @@
*/
/* libburn wrappers for libisoburn
Copyright 2007 - 2017 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007 - 2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -362,7 +362,7 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
enum burn_disc_status s;
#ifndef Hardcoded_cd_rW
int lba, nwa;
off_t lba, nwa;
#endif
s= burn_disc_get_status(d);
@ -505,7 +505,7 @@ static int isoburn_welcome_media(struct isoburn **o, struct burn_drive *d,
#ifdef Hardcoded_cd_rW
(*o)->nwa= Hardcoded_cd_rw_nwA;
#else
ret= burn_disc_track_lba_nwa(d, NULL, 0, &lba, &nwa);
ret= burn_disc_track_lba_nwa_v2(d, NULL, 0, &lba, &nwa);
if(ret>0)
(*o)->nwa= nwa;
if((*o)->nwa < (*o)->zero_nwa)
@ -786,7 +786,7 @@ off_t isoburn_disc_available_space(struct burn_drive *d,
return((off_t) 0);
local_opts= burn_write_opts_new(d);
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, o->nwa * (off_t) 2048);
}
avail= burn_disc_available_space(d, eff_opts);
if(local_opts!=NULL)
@ -796,9 +796,9 @@ off_t isoburn_disc_available_space(struct burn_drive *d,
}
int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba)
int isoburn_disc_get_msc1_v2(struct burn_drive *d, off_t *start_lba)
{
int ret;
int ret, int_lba;
struct isoburn *o;
#ifdef Hardcoded_cd_rW
@ -824,13 +824,35 @@ int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba)
*start_lba= 0;
return(1);
}
return(burn_disc_get_msc1(d, start_lba));
ret= burn_disc_get_msc1(d, &int_lba);
if(ret <= 0)
return(ret);
*start_lba= int_lba;
return(ret);
}
int isoburn_disc_track_lba_nwa(struct burn_drive *d,
struct burn_write_opts *opts,
int trackno, int *lba, int *nwa)
int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba)
{
int ret;
off_t long_lba;
ret= isoburn_disc_get_msc1_v2(d, &long_lba);
if(ret <= 0)
return(ret);
if(long_lba > 0x7fffffff) {
*start_lba= 0x7fffffff;
ret= 0;
} else {
*start_lba= long_lba;
}
return(ret);
}
int isoburn_disc_track_lba_nwa_v2(struct burn_drive *d,
struct burn_write_opts *opts,
int trackno, off_t *lba, off_t *nwa)
{
int ret;
struct isoburn *o;
@ -858,19 +880,45 @@ int isoburn_disc_track_lba_nwa(struct burn_drive *d,
s= isoburn_disc_get_status(d);
if(s == BURN_DISC_BLANK) /* We do not believe in anything but nwa = lba = 0 */
return(1);
return(burn_disc_track_lba_nwa(d, opts, trackno, lba, nwa));
return(burn_disc_track_lba_nwa_v2(d, opts, trackno, lba, nwa));
}
int isoburn_disc_track_lba_nwa(struct burn_drive *d,
struct burn_write_opts *opts,
int trackno, int *lba, int *nwa)
{
int ret;
off_t long_lba, long_nwa;
ret= isoburn_disc_track_lba_nwa_v2(d, opts, trackno, &long_lba, &long_nwa);
if(ret <= 0)
return(ret);
if(long_lba > 0x7fffffff) {
*lba= 0x7fffffff;
} else {
*lba= long_lba;
}
if(long_nwa > 0x7fffffff) {
*nwa= 0x7fffffff;
ret= 0;
} else {
*nwa= long_nwa;
}
return(ret);
}
int isoburn_get_msc2(struct isoburn *o,
struct burn_write_opts *opts, int *msc2, int flag)
struct burn_write_opts *opts, off_t *msc2, int flag)
{
int ret, lba, nwa;
int ret;
off_t lba, nwa;
if(o->fabricated_msc2>=0)
*msc2= o->fabricated_msc2;
else {
ret= isoburn_disc_track_lba_nwa(o->drive, opts, 0, &lba, &nwa);
ret= isoburn_disc_track_lba_nwa_v2(o->drive, opts, 0, &lba, &nwa);
if(ret<=0)
return(ret);
*msc2= nwa;
@ -878,6 +926,7 @@ int isoburn_get_msc2(struct isoburn *o,
return(1);
}
/* @param flag bit0= truncate (else do not truncate)
bit1= do not warn if call is inappropriate to drive
bit2= only set if truncation is currently enabled
@ -1251,7 +1300,7 @@ int isoburn_report_iso_error(int iso_error_code, char msg_text[], int os_errno,
@return 1 seems to be a valid ISO image , 0 format not recognized, <0 error
*/
int isoburn_read_iso_head_parse(unsigned char *data,
int *image_blocks, char *info, int flag)
off_t *image_blocks, char *info, int flag)
{
int i, info_mode;
@ -1284,7 +1333,7 @@ int isoburn_read_iso_head_parse(unsigned char *data,
}
return(1);
}
/* API
@param flag bit0-7: info return mode
@ -1300,11 +1349,12 @@ int isoburn_read_iso_head_parse(unsigned char *data,
@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)
int isoburn_read_iso_head_v2(struct burn_drive *d, off_t lba,
off_t *image_blocks, char *info, int flag)
{
unsigned char *buffer= NULL;
int ret, info_mode, capacity, role;
int ret, info_mode, role;
off_t capacity;
off_t data_count, to_read;
struct isoburn *o;
@ -1324,14 +1374,14 @@ int isoburn_read_iso_head(struct burn_drive *d, int lba,
/* >>> ??? return always 0 ? */
{ret= (-1*!!(flag&(1<<15))); goto ex;}
ret = burn_get_read_capacity(d, &capacity, 0);
ret = burn_get_read_capacity_v2(d, &capacity, 0);
if (ret <= 0 && (role == 2 || role == 4)) {
/* Might be a block device on a system where libburn cannot determine its
size. Try to read anyway. */
capacity = 0x7ffffff0;
capacity = 0x7fffffffffffffff;
ret = 1;
}
to_read= (off_t) capacity * ((off_t) 2048);
to_read= capacity * ((off_t) 2048);
if(ret > 0 && to_read >= (off_t) (36 * 1024)) {
ret= isoburn_find_emulator(&o, d, 0);
if(ret > 0)
@ -1339,7 +1389,7 @@ int isoburn_read_iso_head(struct burn_drive *d, int lba,
{ret= (-1 * !!(flag & (1 << 15))); goto ex;}
if(to_read >= (off_t) (64 * 1024))
to_read= 64 * 1024;
ret = burn_read_data(d, ((off_t) lba) * (off_t) 2048, (char *) buffer,
ret = burn_read_data(d, lba * (off_t) 2048, (char *) buffer,
to_read, &data_count, 32); /* error messages as DEBUG */
} else
ret= 0;
@ -1368,8 +1418,23 @@ ex:;
}
int isoburn_make_toc_entry(struct isoburn *o, int *session_count, int lba,
int track_blocks, char *volid, int flag)
int isoburn_read_iso_head(struct burn_drive *d, int lba,
int *image_blocks, char *info, int flag)
{
int ret;
off_t long_image_blocks;
ret= isoburn_read_iso_head_v2(d, (off_t) lba, &long_image_blocks, info, flag);
if(ret <= 0)
return(ret);
/* The old behavior was to return negative numbers on overflow */
*image_blocks= (int) long_image_blocks;
return(ret);
}
int isoburn_make_toc_entry(struct isoburn *o, int *session_count, off_t lba,
off_t track_blocks, char *volid, int flag)
{
int ret;
struct isoburn_toc_entry *item;
@ -1406,9 +1471,10 @@ no_memory:;
*/
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, scan_count= 0, probe_minus_16= 0, growisofs_nwa, role;
int with_enclosure= 0, readable_blocks= -1;
int ret, session_count= 0, read_flag= 0;
int probe_minus_16= 0, role, with_enclosure= 0;
off_t image_size= 0, lba, track_blocks, scan_start= 0, scan_count= 0;
off_t growisofs_nwa, readable_blocks= -1;
struct isoburn *o;
char *msg= NULL, *size_text= NULL, *sev, volid[33], *volid_pt= NULL;
time_t start_time, last_pacifier, now;
@ -1427,13 +1493,13 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
if(o->emulation_mode<=0 && !(flag&1))
{ret= 0; goto ex;}
ret= burn_get_read_capacity(d, &readable_blocks, 0);
ret= burn_get_read_capacity_v2(d, &readable_blocks, 0);
if(ret <= 0) {
role = burn_drive_get_drive_role(d);
if (role == 2 || role == 4)
/* Might be a block device on a system where libburn cannot determine its
size. Try to read anyway. */
readable_blocks= 0x7ffffff0; /* try to read anyway */
readable_blocks= 0x7fffffffffffffff; /* try to read anyway */
else
readable_blocks= -1;
}
@ -1444,11 +1510,11 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
lba= 0;
if(flag & 2) {
/* If there is a PVD at LBA 32 then this is an image with emulated TOC */
ret= isoburn_read_iso_head(d, 32, &image_size, NULL, 0);
ret= isoburn_read_iso_head_v2(d, 32, &image_size, NULL, 0);
if(ret > 0)
lba= 32;
} else {
ret= isoburn_read_iso_head(d, lba, &image_size, NULL, 0);
ret= isoburn_read_iso_head_v2(d, lba, &image_size, NULL, 0);
if(ret<=0)
{ret= 0; goto failure;}
lba= o->target_iso_head_size / 2048;
@ -1488,7 +1554,7 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
probe_minus_16= 0;
}
ret= isoburn_read_iso_head(d, lba, &track_blocks, volid, read_flag);
ret= isoburn_read_iso_head_v2(d, lba, &track_blocks, volid, read_flag);
if(ret > 0) {
volid_pt= volid;
} else {
@ -1505,8 +1571,8 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
break;
}
sprintf(msg,
"Chain of ISO session headers broken at #%d, LBA %ds",
session_count+1, lba);
"Chain of ISO session headers broken at #%d, LBA %.fs",
session_count+1, (double) lba);
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
if(with_enclosure) {
@ -1523,8 +1589,8 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
lba-= 16;
if(readable_blocks >= 0 && lba + track_blocks > readable_blocks) {
sprintf(msg, "ISO image size %ds larger than readable size %ds",
lba + track_blocks, readable_blocks);
sprintf(msg, "ISO image size %.fs larger than readable size %.fs",
(double) (lba + track_blocks), (double) readable_blocks);
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
track_blocks= readable_blocks - lba;
}
@ -1562,8 +1628,8 @@ failure:;
isoburn_toc_entry_destroy(&(o->toc), 1);
if(with_enclosure && o->emulation_mode == 1) {
if(readable_blocks >= 0 && image_size > readable_blocks) {
sprintf(msg, "ISO image size %ds larger than readable size %ds",
image_size, readable_blocks);
sprintf(msg, "ISO image size %.fs larger than readable size %.fs",
(double) image_size, (double) readable_blocks);
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
image_size= readable_blocks;
}
@ -1727,10 +1793,11 @@ failure:;
}
int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc)
off_t isoburn_toc_disc_get_sectors_v2(struct isoburn_toc_disc *disc)
{
struct isoburn_toc_entry *t;
int ret= 0, num_sessions, num_tracks, open_sessions= 0, session_idx= -1;
int num_sessions, num_tracks, open_sessions= 0, session_idx= -1;
off_t ret= 0;
struct burn_session **sessions;
struct burn_track **tracks;
struct burn_toc_entry entry;
@ -1761,7 +1828,9 @@ int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc)
}
if(num_tracks > 0) {
burn_track_get_entry(tracks[num_tracks - 1], &entry);
if(entry.extensions_valid & 1)
if(entry.extensions_valid & 8)
ret= entry.long_start_lba + entry.long_track_blocks;
else if(entry.extensions_valid & 1)
ret= entry.start_lba + entry.track_blocks;
}
}
@ -1773,6 +1842,17 @@ int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc)
}
int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc)
{
off_t ret;
ret= isoburn_toc_disc_get_sectors_v2(disc);
if(ret > 0x7fffffff)
return((int) 0x7fffffff);
return((int) ret);
}
struct isoburn_toc_session **isoburn_toc_disc_get_sessions(
struct isoburn_toc_disc *disc, int *num)
{
@ -1787,10 +1867,11 @@ int isoburn_toc_disc_get_incmpl_sess(struct isoburn_toc_disc *disc)
}
int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s)
off_t isoburn_toc_session_get_sectors_v2(struct isoburn_toc_session *s)
{
struct isoburn_toc_entry *t;
int count= 0, i;
int i;
off_t count= 0;
if(s==NULL)
return(0);
@ -1801,17 +1882,28 @@ int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s)
t= t->next;
}
} else if(s->session!=NULL)
count= burn_session_get_sectors(s->session);
count= burn_session_get_sectors_v2(s->session);
return(count);
}
int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s)
{
off_t ret;
ret= isoburn_toc_session_get_sectors_v2(s);
if(ret > 0x7fffffff)
return((int) 0x7fffffff);
return((int) ret);
}
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->extensions_valid= 1 | 8;
entry->adr= 1;
entry->control= 4;
entry->session= session_no & 255;
@ -1819,7 +1911,13 @@ int isoburn_toc_entry_finish(struct burn_toc_entry *entry,
entry->point= track_no & 255;
entry->point_msb= (track_no >> 8) & 255;
burn_lba_to_msf(entry->start_lba, &pmin, &psec, &pframe);
if(entry->start_lba < 0) {
pmin= 255;
psec= 59;
pframe=74;
} else {
burn_lba_to_msf(entry->start_lba, &pmin, &psec, &pframe);
}
if(pmin<=255)
entry->pmin= pmin;
else
@ -1844,7 +1942,13 @@ void isoburn_toc_session_get_leadout_entry(struct isoburn_toc_session *s,
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->long_start_lba= t->toc_entry->start_lba + t->toc_entry->track_blocks;
if(entry->long_start_lba > 0x7fffffff) {
entry->start_lba= -1;
} else {
entry->start_lba= entry->long_start_lba;
}
entry->long_track_blocks= 0;
entry->track_blocks= 0;
isoburn_toc_entry_finish(entry, s->toc_entry->session, t->toc_entry->track_no,
0);
@ -1870,15 +1974,26 @@ void isoburn_toc_track_get_entry(struct isoburn_toc_track *t,
}
if(t->toc_entry==NULL)
return;
entry->start_lba= t->toc_entry->start_lba;
entry->track_blocks= t->toc_entry->track_blocks;
entry->long_start_lba= t->toc_entry->start_lba;
if(entry->long_start_lba > 0x7fffffff) {
entry->start_lba= -1;
} else {
entry->start_lba= entry->long_start_lba;
}
entry->long_track_blocks= t->toc_entry->track_blocks;
if(entry->long_track_blocks > 0x7fffffff) {
entry->track_blocks= -1;
} else {
entry->track_blocks= entry->long_track_blocks;
}
isoburn_toc_entry_finish(entry, t->toc_entry->session, t->toc_entry->track_no,
0);
}
int isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba,
int *image_blocks, char volid[33], int flag)
int isoburn_toc_track_get_emul_v2(struct isoburn_toc_track *t,
off_t *start_lba, off_t *image_blocks,
char volid[33], int flag)
{
if(t->toc_entry == NULL)
return(0);
@ -1892,6 +2007,32 @@ int isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba,
}
int isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba,
int *image_blocks, char volid[33], int flag)
{
int ret;
off_t long_lba, long_image_blocks;
ret= isoburn_toc_track_get_emul_v2(t, &long_lba, &long_image_blocks, volid,
flag);
if(ret <= 0)
return(ret);
if(long_lba > 0x7fffffff) {
*start_lba= 0x7fffffff;
ret= 0;
} else {
*start_lba= long_lba;
}
if(long_image_blocks > 0x7fffffff) {
*image_blocks= 0x7fffffff;
ret= 0;
} else {
*image_blocks= long_image_blocks;
}
return(ret);
}
void isoburn_toc_disc_free(struct isoburn_toc_disc *d)
{
if(d->disc!=NULL)
@ -1901,15 +2042,19 @@ void isoburn_toc_disc_free(struct isoburn_toc_disc *d)
}
int isoburn_get_track_lba(struct isoburn_toc_track *track, int *lba, int flag)
int isoburn_get_track_lba(struct isoburn_toc_track *track, off_t *lba,
int flag)
{
struct burn_toc_entry entry;
isoburn_toc_track_get_entry(track, &entry);
if (entry.extensions_valid & 1)
if (entry.extensions_valid & 8) {
*lba= entry.long_start_lba;
} else if (entry.extensions_valid & 1) {
*lba= entry.start_lba;
else
} else {
*lba= burn_msf_to_lba(entry.pmin, entry.psec, entry.pframe);
}
return(1);
}
@ -1940,8 +2085,10 @@ int isoburn_drive_set_msgs_submit(struct burn_drive *d,
int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
int flag)
{
int ret, num_sessions= 0, num_tracks, adr_num, i, j, total_tracks;
int lba, best_lba, size, re_valid= 0, track_count= 0;
int ret, num_sessions= 0, num_tracks, i, j, total_tracks;
int re_valid= 0, track_count= 0;
off_t adr_num, lba, best_lba, size;
double adr_double;
time_t start_time= 0, last_pacifier= 0, now;
char volid[33], *msg= NULL;
struct isoburn *o;
@ -1965,7 +2112,11 @@ int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
{ret= -1; goto ex;}
start_time= last_pacifier= time(NULL);
adr_num= atoi(adr_value);
adr_num= -1;
adr_double= -1.0;
sscanf(adr_value, "%lf", &adr_double);
if(adr_double >= -1.0e16 && adr_double <= 1.0e16) /* ~ 2 exp 53 */
adr_num= adr_double;
if(adr_mode!=3 || (flag & 2)) {
disc= isoburn_toc_drive_get_disc(d);
if(disc==NULL) {
@ -2027,7 +2178,8 @@ not_found:;
}
if((flag & 1) && o->fabricated_msc1 >= 16) {
/* adr_num is possibly 16 blocks too high */
ret= isoburn_read_iso_head(d, o->fabricated_msc1, &size,volid, 1|(1<<14));
ret= isoburn_read_iso_head_v2(d, o->fabricated_msc1, &size, volid,
1 | (1 << 14));
if(ret==2)
o->fabricated_msc1-= 16;
}
@ -2055,12 +2207,12 @@ not_found:;
isoburn_msgs_submit(o, 0x00060000, msg, 0, "UPDATE", 0);
}
track_count++;
ret= isoburn_toc_track_get_emul(tracks[0], &lba, &size, volid, 0);
ret= isoburn_toc_track_get_emul_v2(tracks[0], &lba, &size, volid, 0);
if(ret < 0)
continue;
if(ret == 0) {
isoburn_get_track_lba(tracks[0], &lba, 0);
ret= isoburn_read_iso_head(d, lba, &size, volid, 1);
ret= isoburn_read_iso_head_v2(d, lba, &size, volid, 1);
if(ret<=0)
continue;
}
@ -2104,13 +2256,13 @@ ex:;
}
int isoburn_get_mount_params(struct burn_drive *d,
int adr_mode, char *adr_value,
int *lba, int *track, int *session,
char volid[33], int flag)
int isoburn_get_mount_params_v2(struct burn_drive *d,
int adr_mode, char *adr_value,
off_t *lba, int *track, int *session,
char volid[33], int flag)
{
int msc1_mem, ret, total_tracks, num_sessions, num_tracks, i, j, track_lba;
int size, is_iso= 0;
int ret, total_tracks, num_sessions, num_tracks, i, j, is_iso= 0;
off_t msc1_mem, track_lba, size;
struct isoburn *o;
struct isoburn_toc_disc *disc= NULL;
struct isoburn_toc_session **sessions= NULL;
@ -2147,7 +2299,7 @@ int isoburn_get_mount_params(struct burn_drive *d,
}
}
}
ret= isoburn_read_iso_head(d, *lba, &size, volid, 1);
ret= isoburn_read_iso_head_v2(d, *lba, &size, volid, 1);
if(ret <= 0)
volid[0]= 0;
else
@ -2161,3 +2313,24 @@ ex:;
}
int isoburn_get_mount_params(struct burn_drive *d,
int adr_mode, char *adr_value,
int *lba, int *track, int *session,
char volid[33], int flag)
{
int ret;
off_t long_lba;
ret= isoburn_get_mount_params_v2(d, adr_mode, adr_value, &long_lba,
track, session, volid, flag);
if(ret <= 0)
return(ret);
if(long_lba > 0x7fffffff) {
*lba= 0x7fffffff;
ret= 0;
} else {
*lba= long_lba;
}
return(ret);
}

View File

@ -405,7 +405,8 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
IsoWriteOpts *wopts,
int flag)
{
int ret, rec_mtime, new_img, lba, nwa, i, guid_mode;
int ret, rec_mtime, new_img, i, guid_mode;
off_t lba, nwa;
struct burn_drive *out_d;
new_img= flag&1;
@ -508,7 +509,7 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
out_o->min_start_byte= 0;
}
}
ret = isoburn_disc_track_lba_nwa(out_d, NULL, 0, &lba, &nwa);
ret = isoburn_disc_track_lba_nwa_v2(out_d, NULL, 0, &lba, &nwa);
opts->effective_lba= nwa;
ret= isoburn_get_msc2(out_o, NULL, &nwa, 0);
if (ret != 1) {
@ -595,7 +596,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
IsoWriteOpts *wopts= NULL;
enum burn_disc_status state;
int ret, fifo_chunks, i, new_img, early_indev_release;
uint32_t data_start= -1;
uint32_t data_start= 0xffffffff;
size_t buffer_size= 0, buffer_free= 0;
char *msg= NULL;
@ -693,7 +694,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
ret= iso_write_opts_get_data_start(wopts, &data_start, 0);
opts->data_start_lba= -1;
if(ret > 0 && data_start <= 0x7FFFFFFF)
if(ret > 0)
opts->data_start_lba= data_start;
/* TODO check return values for failure. properly clean-up on error */
@ -742,10 +743,11 @@ int isoburn_prepare_new_image(struct burn_drive *d, struct burn_disc **disc,
}
/* API since 0.2.2 */
int isoburn_prepare_blind_grow(struct burn_drive *d, struct burn_disc **disc,
struct isoburn_imgen_opts *opts,
struct burn_drive *out_drive, int nwa)
/* API since 1.5.8 */
int isoburn_prepare_blind_grow_v2(struct burn_drive *d,
struct burn_disc **disc,
struct isoburn_imgen_opts *opts,
struct burn_drive *out_drive, off_t nwa)
{
int ret;
struct isoburn *o= NULL;
@ -767,6 +769,18 @@ int isoburn_prepare_blind_grow(struct burn_drive *d, struct burn_disc **disc,
}
/* API since 0.2.2 */
int isoburn_prepare_blind_grow(struct burn_drive *d, struct burn_disc **disc,
struct isoburn_imgen_opts *opts,
struct burn_drive *out_drive, int nwa)
{
int ret;
ret= isoburn_prepare_blind_grow_v2(d, disc, opts, out_drive, (off_t) nwa);
return(ret);
}
/* API @since 0.1.0
@param flag bit0= this is a regular end, not an abort
give up source reference
@ -1502,20 +1516,57 @@ int isoburn_igopt_get_fifo_size(struct isoburn_imgen_opts *o, int *fifo_size)
}
int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba)
int isoburn_igopt_get_effective_lba_v2(struct isoburn_imgen_opts *o,
off_t *lba)
{
*lba= o->effective_lba;
return(1);
}
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba)
int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba)
{
int ret;
off_t long_lba;
ret= isoburn_igopt_get_effective_lba_v2(o, &long_lba);
if(ret <= 0)
return(ret);
if(long_lba > 0x7fffffff) {
*lba= 0x7fffffff;
ret= 0;
} else {
*lba= long_lba;
}
return(ret);
}
int isoburn_igopt_get_data_start_v2(struct isoburn_imgen_opts *o, off_t *lba)
{
*lba= o->data_start_lba;
return(1);
}
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba)
{
int ret;
off_t long_lba;
ret= isoburn_igopt_get_data_start_v2(o, &long_lba);
if(ret <= 0)
return(ret);
if(long_lba > 0x7fffffff) {
*lba= 0x7fffffff;
ret= 0;
} else {
*lba= long_lba;
}
return(ret);
}
int isoburn_igopt_set_scdbackup_tag(struct isoburn_imgen_opts *o, char *name,
char *timestamp, char *tag_written)
{

View File

@ -3,7 +3,7 @@
Class struct of libisoburn.
Copyright 2007 - 2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Copyright 2007 - 2023 Thomas Schmitt <scdbackup@gmx.net>
Copyright 2007 - 2024 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -27,8 +27,8 @@
struct isoburn_toc_entry {
int session;
int track_no; /* point */
int start_lba;
int track_blocks;
off_t start_lba;
off_t track_blocks;
char *volid; /* For caching a volume id from emulated toc on overwritables */
struct isoburn_toc_entry *next;
@ -82,26 +82,26 @@ struct isoburn {
/* If >= 0, this address is used as reply for isoburn_disc_get_msc1()
*/
int fabricated_msc1;
off_t fabricated_msc1;
/* If >= 0, this address is used in isoburn_disc_track_lba_nwa()
as reply parameter nwa.
(The other nwa parameters below apply only to the effective write address
on random access media. msc2 is handed to libisofs but not to libburn.)
*/
int fabricated_msc2;
off_t fabricated_msc2;
/* The nwa to be used for a first session on the present kind of overwritable
media (usually Libisoburn_overwriteable_starT, but might be forced to 0)
*/
int zero_nwa;
off_t zero_nwa;
/* Start address as given by image examination (bytes, not blocks) */
off_t min_start_byte;
/* Aligned start address to be used for processing (counted in blocks) */
int nwa;
off_t nwa;
/* Truncate to .nwa an eventual regular file serving as output drive */
@ -142,7 +142,7 @@ struct isoburn {
IsoImage *image;
/* The start LBA of the image */
int image_start_lba;
off_t image_start_lba;
/* The block data source from which the existing image is read.
*/
@ -256,7 +256,7 @@ int isoburn_set_start_byte(struct isoburn *o, off_t value, int flag);
@return <=0 is failure , >0 success
*/
int isoburn_get_msc2(struct isoburn *o,
struct burn_write_opts *opts, int *msc2, int flag);
struct burn_write_opts *opts, off_t *msc2, int flag);
/** Get a data source suitable for read from a drive using burn_read_data()
function.
@ -629,14 +629,14 @@ struct isoburn_imgen_opts {
If <0 : Invalid
If >=0: Valid block number. Block size is always 2 KiB.
*/
int effective_lba;
off_t effective_lba;
/** Output value: Block address of data section start as predicted by
libisofs.
If < 16: Invalid
If >=16: Valid block number. Block size is always 2 KiB.
*/
int data_start_lba;
off_t data_start_lba;
/**
* If not empty: Parameters "name" and "timestamp" for a scdbackup stream

View File

@ -7,7 +7,7 @@
libisofs related functions of libisoburn.
Copyright 2007 - 2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Copyright 2007 - 2020 Thomas Schmitt <scdbackup@gmx.net>
Copyright 2007 - 2024 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -87,6 +87,18 @@ uint32_t iso_read_lsb(const uint8_t *buf, int bytes)
}
static
uint64_t iso_read_lsb64(const uint8_t *buf)
{
int i;
uint64_t ret = 0;
for (i=0; i < 8; i++)
ret += ((uint64_t) buf[i]) << (i * 8);
return ret;
}
/* API function. See libisoburn.h
*/
IsoImage *isoburn_get_attached_image(struct burn_drive *d)
@ -106,7 +118,7 @@ IsoImage *isoburn_get_attached_image(struct burn_drive *d)
/* API */
int isoburn_get_attached_start_lba(struct burn_drive *d)
off_t isoburn_get_attached_start_lba_v2(struct burn_drive *d)
{
int ret;
struct isoburn *o= NULL;
@ -120,6 +132,17 @@ int isoburn_get_attached_start_lba(struct burn_drive *d)
}
int isoburn_get_attached_start_lba(struct burn_drive *d)
{
off_t ret;
ret= isoburn_get_attached_start_lba_v2(d);
if(ret >= 0 && ret <= 0x7fffffff)
return((int) ret);
return(-1);
}
static void isoburn_idle_free_function(void *ignored)
{
return;
@ -144,22 +167,29 @@ int isoburn_make_iso_read_opts(struct burn_drive *d,
struct isoburn_read_opts *read_opts,
IsoReadOpts **ropts)
{
int ret, int_num, dummy;
int ret, int_num;
off_t off_t_num, dummy;
uint32_t ms_block;
char *msg= NULL;
msg= calloc(1, 160);
*ropts= NULL;
ret = isoburn_disc_get_msc1(d, &int_num);
ret = isoburn_disc_get_msc1_v2(d, &off_t_num);
if (ret <= 0)
{ret= -2; goto ex;}
ms_block= int_num;
if(off_t_num > 0xffffffff) {
sprintf(msg, "Start address is outside 32 bit range.");
isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
ms_block= off_t_num;
if (o != NULL)
o->image_start_lba= ms_block;
ret = isoburn_read_iso_head(d, int_num, &dummy, NULL, 0);
ret = isoburn_read_iso_head_v2(d, off_t_num, &dummy, NULL, 0);
if (ret <= 0) {
sprintf(msg, "No ISO 9660 image at LBA %d.", int_num);
sprintf(msg, "No ISO 9660 image at LBA %lu.",
(unsigned long int) ms_block);
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
{ret= 2; goto ex;}
}
@ -571,7 +601,7 @@ int isoburn_attach_image(struct burn_drive *d, IsoImage *image)
/* API */
int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag)
int isoburn_attach_start_lba_v2(struct burn_drive *d, off_t lba, int flag)
{
int ret;
struct isoburn *o;
@ -588,6 +618,14 @@ int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag)
}
int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag)
{
int ret;
ret= isoburn_attach_start_lba_v2(d, (off_t) lba, flag);
return(ret);
}
/* API function. See libisoburn.h
*/
int isoburn_activate_session(struct burn_drive *drive)
@ -640,6 +678,42 @@ int isoburn_get_img_partition_offset(struct burn_drive *drive,
}
/* Try to read partition start and size block number from given GPT entry */
int isoburn_get_gpt_entry(struct isoburn *o, int partno,
uint64_t *start_lba, uint64_t *size, int flag)
{
uint32_t part_start, entry_count, entry_size, part_lba, end_lba;
uint8_t *gpt, *part;
/* Check for GPT header block */
gpt = o->target_iso_head + 512;
if(memcmp(gpt, "EFI PART", 8) != 0)
return(0);
if(gpt[8] != 0x00 || gpt[9] != 0x00 || gpt[10] != 0x01 || gpt[11] != 0x00)
return(0);
part_start = iso_read_lsb64(gpt + 72);
entry_count = iso_read_lsb64(gpt + 80);
entry_size = iso_read_lsb64(gpt + 84);
/* Read partition entry */
if(partno < 1)
return(0);
if(((uint64_t) partno) > entry_count)
return(0);
if(part_start * 512 + partno * entry_size > 32768)
return(0);
part = o->target_iso_head + part_start * 512 + (partno - 1) * entry_size;
part_lba = iso_read_lsb64(part + 32);
end_lba = iso_read_lsb64(part + 40);
if(end_lba < part_lba)
return(0);
*start_lba = part_lba;
*size = end_lba - part_lba + 1;
return(1);
}
/* Check for MBR signature and a first partition that starts at a 2k block
and ends where the image ends.
If not too large or too small, accept its start as partition offset.
@ -649,6 +723,7 @@ static int isoburn_inspect_partition(struct isoburn *o, uint32_t img_size,
{
uint8_t *mbr, *part, *buf= NULL;
uint32_t offst, numsec;
uint64_t gpt_start_lba, gpt_size;
struct ecma119_pri_vol_desc *pvm;
off_t data_count;
int ret;
@ -671,9 +746,20 @@ static int isoburn_inspect_partition(struct isoburn *o, uint32_t img_size,
if(part[1] == 0 && part[2] == 0 && part[3] == 0)
{ret= 2; goto ex;} /* Zero C/H/S start address */
/* Does it match the normal ISO image ? */
offst= iso_read_lsb(part + 8, 4);
numsec= iso_read_lsb(part + 12, 4);
/* Is it GPT ? */
if(part[4] == 0xee && offst == 1) {
ret= isoburn_get_gpt_entry(o, 1, &gpt_start_lba, &gpt_size, 0);
if(ret > 0 && gpt_start_lba < ((uint64_t) 1) << 32 &&
gpt_size < ((uint64_t) 1) << 32) {
offst= gpt_start_lba;
numsec= gpt_size;
}
}
/* Does it match the normal ISO image ? */
if(offst < 64)
{ret= 2; goto ex;} /* Zero or unusably small partition start */
if((offst % 4) || (numsec % 4))
@ -736,7 +822,8 @@ ex:;
*/
int isoburn_start_emulation(struct isoburn *o, int flag)
{
int ret, i, capacity = -1, role, dummy;
int ret, i, role;
off_t capacity = -1, dummy;
off_t data_count, to_read;
struct burn_drive *drive;
struct ecma119_pri_vol_desc *pvm;
@ -764,13 +851,13 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
The data there point to the most recent session.
*/
role = burn_drive_get_drive_role(drive);
ret = burn_get_read_capacity(drive, &capacity, 0);
ret = burn_get_read_capacity_v2(drive, &capacity, 0);
if (ret <= 0)
capacity = -1;
if (role == 5) { /* random access write-only medium */
s = burn_disc_get_status(drive);
o->fabricated_disc_status= s;
burn_disc_track_lba_nwa(drive, NULL, 0, &dummy, &(o->nwa));
burn_disc_track_lba_nwa_v2(drive, NULL, 0, &dummy, &(o->nwa));
if(o->nwa < o->zero_nwa)
o->zero_nwa= 0;
{ret= 1; goto ex;}
@ -779,8 +866,8 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
size. Try to read anyway. */
to_read = o->target_iso_head_size;
memset(o->target_iso_head, 0, to_read);
if(capacity > 0 && (off_t) capacity * (off_t) 2048 < to_read)
to_read = (off_t) capacity * (off_t) 2048;
if(capacity > 0 && capacity * (off_t) 2048 < to_read)
to_read = capacity * (off_t) 2048;
ret = burn_read_data(drive, (off_t) 0, (char*)o->target_iso_head,
to_read, &data_count, 32 | 8);
if (ret <= 0) {

View File

@ -6,7 +6,7 @@
Lower level API definition of libisoburn.
Copyright 2007-2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Copyright 2007-2023 Thomas Schmitt <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -173,6 +173,8 @@ This can be achieved either:
/* Important: If you add a public API function then add its name to file
libisoburn/libisoburn.ver
in the node LIBISOBURN1_Major.Minor.Micro with the numbers of
the next release version.
*/
@ -237,8 +239,6 @@ int isoburn_is_compatible(int major, int minor, int micro, int flag);
So micro revisions {1,3,5,7,9} should never be used for
dynamic linking unless the proper library match can be
guaranteed by external circumstances.
@return 1 success, <=0 might in future become an error indication
*/
void isoburn_version(int *major, int *minor, int *micro);
@ -257,7 +257,7 @@ void isoburn_version(int *major, int *minor, int *micro);
*/
#define isoburn_libburn_req_major 1
#define isoburn_libburn_req_minor 5
#define isoburn_libburn_req_micro 6
#define isoburn_libburn_req_micro 7
/** The minimum compile time requirements of libisoburn towards libjte are
the same as of a suitable libisofs towards libjte.
@ -312,7 +312,7 @@ int isoburn_libburn_req(int *major, int *minor, int *micro);
*/
#define isoburn_header_version_major 1
#define isoburn_header_version_minor 5
#define isoburn_header_version_micro 6
#define isoburn_header_version_micro 7
/** Note:
Above version numbers are also recorded in configure.ac because libtool
wants them as parameters at build time.
@ -615,6 +615,11 @@ struct isoburn_toc_disc *isoburn_toc_drive_get_disc(struct burn_drive *d);
*/
int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc);
/** Like isoburn_toc_disc_get_sectors(), but with off_t return value.
@since 1.5.8
*/
off_t isoburn_toc_disc_get_sectors_v2(struct isoburn_toc_disc *disc);
/** Get the array of session handles and the number of complete sessions
from the table of content.
@ -649,6 +654,11 @@ int isoburn_toc_disc_get_incmpl_sess(struct isoburn_toc_disc *disc);
*/
int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s);
/** Like isoburn_toc_session_get_sectors(), but with off_t return value.
@since 1.5.8
*/
off_t isoburn_toc_session_get_sectors_v2(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()
@ -701,6 +711,12 @@ void isoburn_toc_track_get_entry(struct isoburn_toc_track *t,
int isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba,
int *image_blocks, char volid[33], int flag);
/** Like isoburn_toc_track_get_emul() but with off_t reply type.
@since 1.5.8
*/
int isoburn_toc_track_get_emul_v2(struct isoburn_toc_track *t,
off_t *start_lba, off_t *image_blocks,
char volid[33], int flag);
/** Release the memory associated with a master handle of a medium.
@ -740,6 +756,12 @@ void isoburn_toc_disc_free(struct isoburn_toc_disc *disc);
int isoburn_read_iso_head(struct burn_drive *d, int lba,
int *image_blocks, char *info, int flag);
/** Like isoburn_read_iso_head() but with off_t block address and count.
@since 1.5.8
*/
int isoburn_read_iso_head_v2(struct burn_drive *d, off_t lba,
off_t *image_blocks, char *info, int flag);
/** Try to convert the given entity address into various entity addresses
which would describe it.
@ -769,6 +791,14 @@ int isoburn_get_mount_params(struct burn_drive *d,
int *lba, int *track, int *session,
char volid[33], int flag);
/** Like isoburn_get_mount_params() but with off_t block address type.
@since 1.5.8
*/
int isoburn_get_mount_params_v2(struct burn_drive *d,
int adr_mode, char *adr_value,
off_t *lba, int *track, int *session,
char volid[33], int flag);
/* ----------------------------------------------------------------------- */
/*
@ -1545,6 +1575,12 @@ int isoburn_igopt_get_fifo_size(struct isoburn_imgen_opts *o, int *fifo_size);
*/
int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba);
/** Like isoburn_igopt_get_effective_lba(), but with off_t block addresses.
@since 1.5.8
*/
int isoburn_igopt_get_effective_lba_v2(struct isoburn_imgen_opts *o,
off_t *lba);
/** Obtain after image preparation the lowest block address of file content
data. Failure can occur if libisofs is too old to provide this information,
@ -1559,6 +1595,11 @@ int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba);
*/
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba);
/** Like isoburn_igopt_get_data_start(), but with off_t block addresses.
@since 1.5.8
*/
int isoburn_igopt_get_data_start_v2(struct isoburn_imgen_opts *o, off_t *lba);
/** Set or get parameters "name" and "timestamp" for a scdbackup checksum
tag. It will be appended to the libisofs session tag if the image starts at
@ -2006,7 +2047,7 @@ int isoburn_igopt_set_part_type_guid(struct isoburn_imgen_opts *opts,
The option set to be inquired.
@param num_entries
Number of array elements in part_flags[].
@param type_guids
@param guids
The array elements 0 to num_entries - 1 will get filled by the
16 flag bits of the images of the corresponding partition.
@param valids
@ -2427,6 +2468,11 @@ IsoImage *isoburn_get_attached_image(struct burn_drive *d);
*/
int isoburn_get_attached_start_lba(struct burn_drive *d);
/** Like isoburn_get_attached_start_lba(), but with off_t return value.
@since 1.5.8
*/
off_t isoburn_get_attached_start_lba_v2(struct burn_drive *d);
/** Load the ISO filesystem directory tree from the medium in the given drive.
This will give libisoburn the base on which it can let libisofs perform
@ -2546,6 +2592,11 @@ int isoburn_attach_image(struct burn_drive *d, IsoImage *image);
*/
int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag);
/** Like isoburn_attach_start_lba(), but with off_t result value.
@since 1.5.8
*/
int isoburn_attach_start_lba_v2(struct burn_drive *d, off_t lba, int flag);
/** Return the best possible estimation of the currently available capacity of
the medium. This might depend on particular write option settings and on
@ -2579,6 +2630,11 @@ off_t isoburn_disc_available_space(struct burn_drive *d,
*/
int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba);
/** Like isoburn_disc_get_msc1(), but with off_t result value.
@since 1.5.8
*/
int isoburn_disc_get_msc1_v2(struct burn_drive *d, off_t *start_lba);
/** Use this with trackno==0 to obtain the predicted start block number of the
new session. The interesting number is returned in parameter nwa.
@ -2594,6 +2650,13 @@ int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba);
int isoburn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
int trackno, int *lba, int *nwa);
/** Like isoburn_disc_track_lba_nwa(), but with off_t result value.
@since 1.5.8
*/
int isoburn_disc_track_lba_nwa_v2(struct burn_drive *d,
struct burn_write_opts *o,
int trackno, off_t *lba, off_t *nwa);
/** Obtain the size which was attributed to an emulated appendable on actually
overwritable media. This value is supposed to be <= 2048 * nwa as of
@ -2705,6 +2768,14 @@ int isoburn_prepare_blind_grow(struct burn_drive *in_drive,
struct isoburn_imgen_opts *opts,
struct burn_drive *out_drive, int nwa);
/** Like isoburn_prepare_blind_grow(), but with off_t nwa value.
@since 1.5.8
*/
int isoburn_prepare_blind_grow_v2(struct burn_drive *in_drive,
struct burn_disc **disc,
struct isoburn_imgen_opts *opts,
struct burn_drive *out_drive, off_t nwa);
/**
Revoke isoburn_prepare_*() instead of running isoburn_disc_write().

View File

@ -363,3 +363,18 @@ Xorriso_stop_msg_watcher;
local: *;
};
LIBISOBURN1_1.5.8 {
isoburn_attach_start_lba_v2;
isoburn_disc_get_msc1_v2;
isoburn_disc_track_lba_nwa_v2;
isoburn_get_attached_start_lba_v2;
isoburn_get_mount_params_v2;
isoburn_igopt_get_data_start_v2;
isoburn_igopt_get_effective_lba_v2;
isoburn_prepare_blind_grow_v2;
isoburn_read_iso_head_v2;
isoburn_toc_disc_get_sectors_v2;
isoburn_toc_session_get_sectors_v2;
isoburn_toc_track_get_emul_v2;
} LIBISOBURN1;

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH MERGE_DEBIAN_ISOS 1 "Version 1.5.5, Oct 19, 2022"
.TH MERGE_DEBIAN_ISOS 1 "Version 1.5.7, Jun 07, 2023"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -142,11 +142,11 @@ GNU xorriso tarball from
.br
You may use it without installing it after compilation and thus without
disturbing your system's package management. Assumed that you unpacked the
xorriso\-1.5.4 tarball in your $HOME directory and have successfully compiled
xorriso\-1.5.6 tarball in your $HOME directory and have successfully compiled
it, do:
.br
export XORRISO="$HOME"/xorriso\-1.5.4/xorriso/xorriso
export XORRISO="$HOME"/xorriso\-1.5.6/xorriso/xorriso
.br
merge_debian_isos merged.iso merge_mount/iso \\
@ -281,7 +281,7 @@ Thomas Schmitt <scdbackup@gmx.net>
.br
for libburnia\-project.org
.SH COPYRIGHT
Copyright (c) 2022 Thomas Schmitt
Copyright (c) 2023 Thomas Schmitt
.br
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of merge_debian_isos.

View File

@ -3,7 +3,7 @@ merge_debian_isos.texi.
merge_debian_isos - sh script to merge multiple debian-cd ISO images
Copyright (C) 2022 Thomas Schmitt
Copyright (C) 2023 Thomas Schmitt
Permission is granted to distribute this text freely.
INFO-DIR-SECTION Archiving
@ -14,7 +14,7 @@ END-INFO-DIR-ENTRY

File: merge_debian_isos.info, Node: Top, Next: Overview, Up: (dir)
merge_debian_isos 1.5.5
merge_debian_isos 1.5.7
***********************
merge_debian_isos - Program to merge multiple debian-cd ISO images
@ -140,10 +140,10 @@ compile the GNU xorriso tarball from
https://www.gnu.org/software/xorriso/#download
You may use it without installing it after compilation and thus without
disturbing your system's package management. Assumed that you unpacked
the xorriso-1.5.4 tarball in your $HOME directory and have successfully
the xorriso-1.5.6 tarball in your $HOME directory and have successfully
compiled it, do:
export XORRISO="$HOME"/xorriso-1.5.4/xorriso/xorriso
export XORRISO="$HOME"/xorriso-1.5.6/xorriso/xorriso
merge_debian_isos merged.iso merge_mount/iso \
debian-11.2.0-amd64-DVD-[12345].iso
@ -302,7 +302,7 @@ for libburnia-project.org
8.2 Copyright
=============
Copyright (c) 2022 Thomas Schmitt
Copyright (c) 2023 Thomas Schmitt
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of merge_debian_isos. If
you make use of the license to derive modified versions of

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename merge_debian_isos.info
@settitle merge_debian_isos 1.5.6
@settitle merge_debian_isos 1.5.7
@c %**end of header
@c
@c man-ignore-lines begin
@ -48,7 +48,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH MERGE_DEBIAN_ISOS 1 "Version 1.5.6, Jun 07, 2023"
@c man .TH MERGE_DEBIAN_ISOS 1 "Version 1.5.7, Jun 07, 2023"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -74,7 +74,7 @@ Permission is granted to distribute this text freely.
@end copying
@c man-ignore-lines end
@titlepage
@title Manual of GNU xorriso companion merge_debian_isos 1.5.6
@title Manual of GNU xorriso companion merge_debian_isos 1.5.7
@author Thomas Schmitt
@page
@vskip 0pt plus 1filll
@ -83,7 +83,7 @@ Permission is granted to distribute this text freely.
@contents
@ifnottex
@node Top
@top merge_debian_isos 1.5.6
@top merge_debian_isos 1.5.7
@c man-ignore-lines 1
@c man .SH NAME

View File

@ -15,7 +15,7 @@
# announces.
xdt_print_version() {
echo "xorriso-dd-target , version 1.5.6 , 2023.06.07.180001"
echo "xorriso-dd-target , version 1.5.7 , 2023.06.07.200919"
}

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH XORRISO-DD-TARGET 1 "Version 1.5.6, Jun 07, 2023"
.TH XORRISO-DD-TARGET 1 "Version 1.5.7, Jun 07, 2023"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:

View File

@ -14,7 +14,7 @@ END-INFO-DIR-ENTRY

File: xorriso-dd-target.info, Node: Top, Next: Overview, Up: (dir)
xorriso-dd-target 1.5.6
xorriso-dd-target 1.5.7
***********************
xorriso-dd-target - Device evaluator and disk image copier for GNU/Linux

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename xorriso-dd-target.info
@settitle GNU xorriso-dd-target 1.5.6
@settitle GNU xorriso-dd-target 1.5.7
@c %**end of header
@c
@c man-ignore-lines begin
@ -48,7 +48,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO-DD-TARGET 1 "Version 1.5.6, Jun 07, 2023"
@c man .TH XORRISO-DD-TARGET 1 "Version 1.5.7, Jun 07, 2023"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -74,7 +74,7 @@ Permission is granted to distribute this text freely.
@end copying
@c man-ignore-lines end
@titlepage
@title Manual of GNU xorriso companion xorriso-dd-target 1.5.6
@title Manual of GNU xorriso companion xorriso-dd-target 1.5.7
@author Thomas Schmitt
@page
@vskip 0pt plus 1filll
@ -83,7 +83,7 @@ Permission is granted to distribute this text freely.
@contents
@ifnottex
@node Top
@top xorriso-dd-target 1.5.6
@top xorriso-dd-target 1.5.7
@c man-ignore-lines 1
@c man .SH NAME

View File

@ -4,7 +4,7 @@
GNU xorriso. By Thomas Schmitt <scdbackup@gmx.net>
Derived from and supported by libburnia-project.org, published via:
http://www.gnu.org/software/xorriso/xorriso_eng.html
http://www.gnu.org/software/xorriso/xorriso-1.5.6.tar.gz
http://www.gnu.org/software/xorriso/xorriso-1.5.7.tar.gz
Provided under GPL version 3 or later. No warranty.
------------------------------------------------------------------------------
@ -49,10 +49,10 @@ Optional at compile time are:
If they were present at compile time, then the optional libraries have to
be present at runtime, too.
Obtain xorriso-1.5.6.tar.gz, take it to a directory of your choice and do:
Obtain xorriso-1.5.7.tar.gz, take it to a directory of your choice and do:
tar xzf xorriso-1.5.6.tar.gz
cd xorriso-1.5.6
tar xzf xorriso-1.5.7.tar.gz
cd xorriso-1.5.7
Within that directory execute:
@ -323,14 +323,17 @@ Sector maps describe the valid and invalid blocks on a media or a disk copy of
a media. xorriso creates and reads these file with its option -check_media.
The file begins with 32 bytes of cleartext of which the last one is a
newline character. The first 25 say "xorriso sector bitmap v2 ", the
remaining six characters give the size of the info text as decimal number.
newline character. The first 25 say "xorriso sector bitmap v2 " or
"xorriso sector bitmap v3 ". The remaining six characters give the size
of the info text as decimal number.
This number of bytes follows the first 32 and will not be interpreted
by xorriso. They are rather to inform a human reader about the media type
and its track layout.
After the info text there are two 4 byte signed integers, most significant
byte first. The first one, N, gives the number of bits in the following bitmap
and the second number S gives the number of 2 KiB blocks governed by a single
After the info text there are two signed integers, most significant byte
first. The number of bytes per integer is 4 for "v2" and 8 for "v3".
In both cases, the highest bit of the integers must be 0.
The first integer, N, gives the number of bits in the following bitmap.
The second number, S, gives the number of 2 KiB blocks governed by a single
bit in the map. Then come the bits in form of 8-bit bytes.
Data block M is covered by bit B=M/S in the map, bit number B is stored in
byte B/8 as bit B%8. A valid readable data block has its bit set to 1.
@ -395,9 +398,9 @@ and a matching dynamically linked xorriso binary.
This binary is very lean but depends on properly installed libraries of
suitable revision.
Dynamic library and compile time header requirements for libisoburn-1.5.4 :
- libburn.so.4 , version libburn-1.5.4 or higher
- libisofs.so.6 , version libisofs-1.5.4 or higher
Dynamic library and compile time header requirements for libisoburn-1.5.6 :
- libburn.so.4 , version libburn-1.5.6 or higher
- libisofs.so.6 , version libisofs-1.5.6 or higher
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
setup unless you have reason to enforce a newer bug fix level.
@ -521,7 +524,7 @@ By Mario Danic <mario.danic@gmail.com>, libburn, libisofs
Vreixo Formoso <metalpain2002@yahoo.es>, libisofs, libisoburn
Thomas Schmitt <scdbackup@gmx.net>, libburn, libisofs,
libisoburn, xorriso
Copyright (C) 2006-2023 Mario Danic, Vreixo Formoso, Thomas Schmitt.
Copyright (C) 2006-2024 Mario Danic, Vreixo Formoso, Thomas Schmitt.
libburnia-project.org is inspired by and in libburn still containing parts
of old
@ -540,7 +543,7 @@ Copyright (C) 2019-2021 Nio Wiklund alias sudodus, Thomas Schmitt
------------------------------------------------------------------------------
This text itself is
Copyright (c) 2007 - 2023 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2007 - 2024 Thomas Schmitt <scdbackup@gmx.net>
and is freely distributable.
It shall only be modified in sync with the technical properties of xorriso.
If you make use of the license to derive modified versions of xorriso

View File

@ -238,6 +238,10 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->indev_off_adr[0]= 0;
m->isofs_st_in= 0;
m->volset_change_pending= 0;
m->commit_attempts= 0;
m->print_size_attempts= 0;
m->write_session_counter= 0;
m->print_size_counter= 0;
m->no_volset_present= 0;
m->in_sector_map= NULL;
m->check_media_default= NULL;

View File

@ -19802,7 +19802,7 @@ ChangeLog
xorriso/changelog.txt
Updated change log and web page
------------------------------------ cycle - xorriso-1.5.3 - 2021.01.30.200107
------------------------------------ cycle - xorriso-1.5.5 - 2021.01.30.200107
2021.02.01.174513 [9fe4c4d]
@ -19811,7 +19811,7 @@ xorriso/changelog.txt
xorriso/xorriso_timestamp.h
Updated change log and web page
------------------------------------ cycle - xorriso-1.5.3 - 2021.02.01.174513
------------------------------------ cycle - xorriso-1.5.5 - 2021.02.01.174513
* Bug fix in libisofs:
Large amounts of AAIP data or many long file names could cause with
zisofs an unreadable filesystem after the warning "Calculated and
@ -19822,7 +19822,7 @@ xorriso/changelog.txt
xorriso/xorriso_timestamp.h
Updated change log
------------------------------------ cycle - xorriso-1.5.3 - 2021.02.03.115443
------------------------------------ cycle - xorriso-1.5.5 - 2021.02.03.115443
Heuristic correction of bug fix in021.02.01.174513 which led to contrary
miscalculations.
As of 06 Feb 2021 the reason for the need of this bug fix has been found.
@ -20437,7 +20437,7 @@ xorriso-dd-target/xorriso-dd-target.sig
test/merge_debian_isos.sig
Updated xorriso-dd-target.sig and merge_debian_isos.sig
[]
07 Jun 2023 [919c823]
ChangeLog
xorriso/changelog.txt
Documented changes and release timestamp
@ -20485,6 +20485,152 @@ Documented changes and release timestamp
Proof-of-concept by Ivan Shmakov on bugs.debian.org. (Closes: #1010098)
2023.06.07.200919 [5a869b1]
configure.ac
libisoburn/libisoburn.h
xorriso/README_gnu_xorriso
xorriso/xorriso.h
xorriso/xorrisoburn.h
xorriso/xorriso_main.c
xorriso/make_xorriso_standalone.sh
xorriso/configure_ac.txt
frontend/xorriso-tcltk
xorriso-dd-target/xorriso-dd-target
xorriso/xorriso_timestamp.h
xorriso/xorriso.texi
xorriso/xorriso.1
xorriso/xorriso.info
xorriso/xorrisofs.texi
xorriso/xorrisofs.1
xorriso/xorrisofs.info
xorriso/xorrecord.texi
xorriso/xorrecord.1
xorriso/xorrecord.info
xorriso/xorriso-tcltk.texi
xorriso/xorriso-tcltk.1
xorriso/xorriso-tcltk.info
xorriso-dd-target/xorriso-dd-target.texi
xorriso-dd-target/xorriso-dd-target.1
xorriso-dd-target/xorriso-dd-target.info
test/merge_debian_isos.texi
test/merge_debian_isos.1
test/merge_debian_isos.info
Version leap to libisoburn-1.5.7
07 Jun 2023 [a22f6b8]
ChangeLog
xorriso/changelog.txt
Updated change log and web page
------------------------------------ cycle - xorriso-1.5.7 - 2023.06.07.200919
------------------------------ release - xorriso-1.5.6.pl01 - 2023.06.12.080001
(A failed attempt to create a tarball with a fixed libisofs/rockridge.h)
------------------------------ release - xorriso-1.5.6.pl02 - 2023.06.14.170001
* Bug fix: On non-GNU/Linux systems ssize_t was not defined in libisofs file
rockridge.h . Report and fix proposal by Rui Chen.
------------------------------------ cycle - xorriso-1.5.7 - 2023.06.12.125306
* Bug fix: On non-GNU/Linux systems ssize_t was not defined in libisofs file
rockridge.h . Report and fix proposal by Rui Chen.
12 Jun 2023 [1807f04]
xorriso/xorriso_eng.html
xorriso/changelog.txt
Updated change log and web page
20 Jun 2023 [9b17a8a]
ChangeLog
xorriso/xorriso_eng.html
xorriso/changelog.txt
Updated change log and web page
2023.07.12.182812 [11c5f65]
libisoburn/isofs_wrap.c
Enabled recognition of multi-session emulation with partition offset 16 and GPT
2023.07.21.070020 [1a44cbd]
libisoburn/libisoburn.h
xorriso/sfile.h
xorriso/sfile.c
xorriso/misc_funct.h
xorriso/misc_funct.c
Silenced some harmless warnings of Fedora build process
2023.08.06.132334 [f3af549]
xorriso/opts_a_c.c
Bug fix: -boot_image and -append_partition were not perceived as image
manipulation which makes production of an ISO image worthwhile.
Thanks Cameron Seader.
2023.08.06.133040 [aaaa0a9]
xorriso/opts_a_c.c
Let -boot_image show_status display info about -append_partition status
2023.08.07.132608 [0b7e4f9]
xorriso/opts_a_c.c
xorriso/xorriso.texi
xorriso/xorriso.1
xorriso/xorriso.info
New -append_partition pseudo partition_number "all" and
pseudo type_code "revoke"
2023.08.08.114313 [ab0bfdb]
xorriso/xorriso.h
xorriso/xorriso_private.h
xorriso/base_obj.c
xorriso/opts_a_c.c
xorriso/opts_p_z.c
xorriso/iso_img.c
xorriso/write_run.c
New bit1 with API call Xorriso_change_is_pending() issues a note if
return is 0 and indev and outdev point to different drives
2023.08.08.114459 [2de0667]
xorriso/xorriso_main.c
Using Xorriso_change_is_pending() bit1 at end of program
08 Aug 2023 [e383d3a]
ChangeLog
xorriso/xorriso_eng.html
xorriso/changelog.txt
Updated change log and web page
------------------------------------ cycle - xorriso-1.5.7 - 2023.08.08.114459
* Bug fix: -boot_image and -append_partition were not perceived as image
manipulation which makes production of an ISO image worthwhile.
Thanks Cameron Seader.
* New -append_partition pseudo partition_number "all" and
pseudo type_code "revoke"
* New bit1 with API call Xorriso_change_is_pending() issues a note if
return is 0 and indev and outdev point to different drives
2023.11.20.105009 [651f429]
xorriso/emulators.c
xorriso/xorrisofs.texi
xorriso/xorrisofs.1
xorriso/xorrisofs.info
New -as mkisofs options -cut_out and -hide_iso_path
2023.11.21.103206 [aace531]
xorriso/lib_mgt.c
xorriso/iso_img.c
xorriso/iso_tree.c
Improved handling of hidden boot images in -boot_image cmd/as_mkisofs/replay
21 Nov 2023 []
ChangeLog
xorriso/xorriso_eng.html
xorriso/changelog.txt
Updated change log and web page
------------------------------------ cycle - xorriso-1.5.7 - 2023.11.21.103206
* New -as mkisofs options -cut_out and -hide_iso_path
* Improved handling of hidden boot images in -boot_image cmd/as_mkisofs/replay
[]
ChangeLog
xorriso/xorriso_eng.html
@ -20493,6 +20639,7 @@ Updated change log and web page
------------------------------------ cycle - xorriso-1.5.7 -
[]
ChangeLog
xorriso/xorriso_eng.html

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2020 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -39,14 +39,14 @@
struct SpotlistiteM {
int start_lba;
int blocks;
off_t start_lba;
off_t blocks;
int quality;
struct SpotlistiteM *next;
};
int Spotlistitem_new(struct SpotlistiteM **o, int start_lba, int blocks,
int Spotlistitem_new(struct SpotlistiteM **o, off_t start_lba, off_t blocks,
int quality, int flag)
{
struct SpotlistiteM *m;
@ -76,9 +76,9 @@ int Spotlistitem_destroy(struct SpotlistiteM **o, int flag)
struct SpotlisT {
struct SpotlistiteM *list_start;
struct SpotlistiteM *list_end;
int list_count;
off_t list_count;
struct SpotlistiteM *current_item;
int current_idx;
off_t current_idx;
};
@ -117,7 +117,7 @@ int Spotlist_destroy(struct SpotlisT **o, int flag)
}
int Spotlist_add_item(struct SpotlisT *o, int start_lba, int blocks,
int Spotlist_add_item(struct SpotlisT *o, off_t start_lba, off_t blocks,
int quality, int flag)
{
int ret;
@ -135,8 +135,9 @@ int Spotlist_add_item(struct SpotlisT *o, int start_lba, int blocks,
(o->list_count)++;
if(debug_verbous) {char quality_name[80];
fprintf(stderr, "debug: lba %10d , size %10d , quality '%s'\n",
start_lba, blocks, Spotlist__quality_name(quality, quality_name,
fprintf(stderr, "debug: lba %10.f , size %10.f , quality '%s'\n",
(double) start_lba, (double) blocks,
Spotlist__quality_name(quality, quality_name,
Xorriso_read_quality_invaliD, 0) + 2);
}
@ -144,15 +145,15 @@ int Spotlist_add_item(struct SpotlisT *o, int start_lba, int blocks,
}
int Spotlist_count(struct SpotlisT *o, int flag)
off_t Spotlist_count(struct SpotlisT *o, int flag)
{
return o->list_count;
}
int Spotlist_block_count(struct SpotlisT *o, int flag)
off_t Spotlist_block_count(struct SpotlisT *o, int flag)
{
int list_blocks= 0;
off_t list_blocks= 0;
struct SpotlistiteM *li;
for(li= o->list_start; li != NULL; li= li->next) {
@ -163,9 +164,9 @@ int Spotlist_block_count(struct SpotlisT *o, int flag)
}
int Spotlist_sector_size(struct SpotlisT *o, int read_chunk, int flag)
off_t Spotlist_sector_size(struct SpotlisT *o, off_t read_chunk, int flag)
{
int sector_size;
off_t sector_size;
struct SpotlistiteM *li;
sector_size= read_chunk * 2048;
@ -179,10 +180,10 @@ int Spotlist_sector_size(struct SpotlisT *o, int read_chunk, int flag)
}
int Spotlist_get_item(struct SpotlisT *o, int idx,
int *start_lba, int *blocks, int *quality, int flag)
int Spotlist_get_item(struct SpotlisT *o, off_t idx,
off_t *start_lba, off_t *blocks, int *quality, int flag)
{
int i;
off_t i;
struct SpotlistiteM *li;
if(idx < 0 || idx > o->list_count)
@ -249,7 +250,7 @@ char *Spotlist__quality_name(int quality, char name[80], int bad_limit,
/* ---------------------------- SectorbitmaP ------------------------------ */
int Sectorbitmap_new(struct SectorbitmaP **o, int sectors, int sector_size,
int Sectorbitmap_new(struct SectorbitmaP **o, off_t sectors, off_t sector_size,
int flag)
{
struct SectorbitmaP *m;
@ -288,13 +289,16 @@ int Sectorbitmap_destroy(struct SectorbitmaP **o, int flag)
int Sectorbitmap_from_file(struct SectorbitmaP **o, char *path, char *msg,
int *os_errno, int flag)
{
int ret, fd= -1, sectors, sector_size, i, todo, map_size, skip, bufsize= 1024;
int ret, fd= -1, todo, skip, bufsize= 1024;
off_t sectors, sector_size;
ssize_t i, map_size;
unsigned char *map;
unsigned char *buf;
unsigned char *buf, buf_head[26];
buf= TSOB_FELD(unsigned char, bufsize);
if(buf == NULL)
return(-1);
buf_head[0]= 0;
*os_errno= 0;
if(msg != NULL)
@ -319,9 +323,12 @@ wrong_filetype:;
}
ret= 0; goto ex;
}
if(strncmp((char *) buf, "xorriso sector bitmap v1 ", 32) == 0)
/* ok */;
else if(strncmp((char *) buf, "xorriso sector bitmap v2 ", 25) == 0) {
if(strncmp((char *) buf, "xorriso sector bitmap v1 ", 32) == 0) {
memcpy(buf_head, buf, 25);
} else if(strncmp((char *) buf, "xorriso sector bitmap v2 ", 25) == 0 ||
strncmp((char *) buf, "xorriso sector bitmap v3 ", 25) == 0) {
memcpy(buf_head, buf, 25);
buf_head[25]= 0;
skip= -1;
sscanf(((char *) buf) + 25, "%d", &skip);
if(skip < 0)
@ -336,17 +343,33 @@ wrong_filetype:;
}
} else
{ret= 0; goto wrong_filetype;}
ret= read(fd, buf, 8);
if(ret < 4)
goto wrong_filetype;
sectors= (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
sector_size= (buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7];
if(sectors <= 0 || sector_size <= 0)
goto wrong_filetype;
if(strncmp((char *) buf_head, "xorriso sector bitmap v1 ", 25) == 0 ||
strncmp((char *) buf_head, "xorriso sector bitmap v2 ", 25) == 0) {
ret= read(fd, buf, 8);
if(ret < 8)
goto wrong_filetype;
if((buf[0] & 128) || (buf[4] & 128))
goto wrong_filetype;
sectors= (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
sector_size= (buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7];
} else {
ret= read(fd, buf, 16);
if(ret < 16)
goto wrong_filetype;
if((buf[0] & 128) || (buf[8] & 128))
goto wrong_filetype;
sectors= ((off_t) buf[0] << 56) | ((off_t) buf[1] << 48) |
((off_t) buf[2] << 40) | ((off_t) buf[3] << 32) |
(buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7];
sector_size= ((off_t) buf[8] << 56) | ((off_t) buf[9] << 48) |
((off_t) buf[10] << 40) | ((off_t) buf[11] << 32) |
(buf[12] << 24) | (buf[13] << 16) | (buf[14] << 8) | buf[15];
}
ret= Sectorbitmap_new(o, sectors, sector_size, 0);
if(ret <= 0) {
if(msg != NULL)
sprintf(msg, "Cannot allocate bitmap memory for %d sectors", sectors);
sprintf(msg, "Cannot allocate bitmap memory for %.f sectors",
(double) sectors);
ret= -1; goto ex;
}
map= (*o)->map;
@ -375,7 +398,8 @@ ex:;
int Sectorbitmap_to_file(struct SectorbitmaP *o, char *path, char *info,
char *msg, int *os_errno, int flag)
{
int ret, fd= -1, j, l;
int fd= -1, j, l, version= 2;
ssize_t ret;
unsigned char buf[40];
*os_errno= 0;
@ -389,6 +413,8 @@ int Sectorbitmap_to_file(struct SectorbitmaP *o, char *path, char *info,
ret= 0; goto ex;
}
if(o->sectors > 0x7fffffff || o->sector_size > 0x7fffffff)
version= 3;
l= 0;
if(info != NULL)
l= strlen(info);
@ -396,7 +422,7 @@ int Sectorbitmap_to_file(struct SectorbitmaP *o, char *path, char *info,
strcpy(msg, "Info string is longer than 999999 bytes");
ret= 0; goto ex;
}
sprintf((char *) buf, "xorriso sector bitmap v2 %-6d\n", l);
sprintf((char *) buf, "xorriso sector bitmap v%d %-6d\n", version, l);
ret= write(fd, buf, 32);
if(ret != 32) {
@ -414,13 +440,24 @@ cannot_write:;
goto cannot_write;
}
for(j= 0; j < 4; j++) {
buf[j]= o->sectors >> (24 - j * 8);
buf[j+4]= o->sector_size >> (24 - j * 8);
if(version == 2) {
for(j= 0; j < 4; j++) {
buf[j]= o->sectors >> (24 - j * 8);
buf[j + 4]= o->sector_size >> (24 - j * 8);
}
ret= write(fd, buf, 8);
if(ret != 8)
goto cannot_write;
} else {
for(j= 0; j < 8; j++) {
buf[j]= o->sectors >> (56 - j * 8);
buf[j + 8]= o->sector_size >> (56 - j * 8);
}
ret= write(fd, buf, 16);
if(ret != 16)
goto cannot_write;
}
ret= write(fd, buf, 8);
if(ret != 8)
goto cannot_write;
ret= write(fd, o->map, o->map_size);
if(ret != o->map_size)
goto cannot_write;
@ -435,7 +472,7 @@ ex:;
/* @param flag bit0= sector bit value
*/
int Sectorbitmap_set(struct SectorbitmaP *o, int sector, int flag)
int Sectorbitmap_set(struct SectorbitmaP *o, off_t sector, int flag)
{
if(sector < 0 || sector >= o->sectors)
return(0);
@ -450,9 +487,9 @@ int Sectorbitmap_set(struct SectorbitmaP *o, int sector, int flag)
/* @param flag bit0= sector bit value
*/
int Sectorbitmap_set_range(struct SectorbitmaP *o,
int start_sector, int sectors, int flag)
off_t start_sector, off_t sectors, int flag)
{
int start_i, end_i, i;
off_t start_i, end_i, i;
unsigned char value;
if(start_sector < 0 || start_sector + sectors > o->sectors || sectors < 1)
@ -474,7 +511,7 @@ int Sectorbitmap_set_range(struct SectorbitmaP *o,
}
int Sectorbitmap_is_set(struct SectorbitmaP *o, int sector, int flag)
int Sectorbitmap_is_set(struct SectorbitmaP *o, off_t sector, int flag)
{
if(sector < 0 || sector >= o->sectors)
return(0);
@ -485,7 +522,7 @@ int Sectorbitmap_is_set(struct SectorbitmaP *o, int sector, int flag)
int Sectorbitmap_bytes_are_set(struct SectorbitmaP *o,
off_t start_byte, off_t end_byte, int flag)
{
int end_sector, i;
off_t end_sector, i;
end_sector= end_byte / o->sector_size;
for(i= start_byte / o->sector_size; i <= end_sector; i++)
@ -496,7 +533,7 @@ int Sectorbitmap_bytes_are_set(struct SectorbitmaP *o,
int Sectorbitmap_get_layout(struct SectorbitmaP *o,
int *sectors, int *sector_size, int flag)
off_t *sectors, off_t *sector_size, int flag)
{
*sectors= o->sectors;
*sector_size= o->sector_size;
@ -507,8 +544,8 @@ int Sectorbitmap_get_layout(struct SectorbitmaP *o,
int Sectorbitmap_copy(struct SectorbitmaP *from, struct SectorbitmaP *to,
int flag)
{
int i, run_start, run_value, start_sec, limit_sec, start_aligned;
int end_complete;
int run_value, start_aligned, end_complete;
off_t i, run_start, start_sec, limit_sec;
if(((off_t) from->sectors) * ((off_t) from->sector_size) >
((off_t) to->sectors) * ((off_t) to->sector_size))
@ -519,7 +556,7 @@ int Sectorbitmap_copy(struct SectorbitmaP *from, struct SectorbitmaP *to,
return(1);
}
run_start= 0;
run_value= Sectorbitmap_is_set(from, 0, 0);
run_value= Sectorbitmap_is_set(from, (off_t) 0, 0);
for(i= 1; i <= from->sectors; i++) {
if(i < from->sectors)
if(Sectorbitmap_is_set(from, i, 0) == run_value)
@ -726,7 +763,7 @@ int Xorriso_check_media_setup_job(struct XorrisO *xorriso,
strncmp(argv[i], "min_lba=", 8) == 0) {
num= -1;
sscanf(argv[i] + 8, "%lf", &num);
if(num > 0x7fffffff || num < 0)
if(num > 0x7fffffffffffffff || num < 0)
num= -1;
if(strncmp(argv[i], "max_lba=", 8) == 0)
job->max_lba= num;
@ -743,7 +780,7 @@ int Xorriso_check_media_setup_job(struct XorrisO *xorriso,
else if(argv[i][11] >= '1' && argv[i][11] <= '9') {
num= -1;
sscanf(argv[i] + 11, "%lf", &num);
if(num > 0x7fffffff || num < 0)
if(num > 0x7fffffffffffffff || num < 0)
goto bad_value;
job->patch_lba0_msc1= num;
job->patch_lba0= (num >= 32) + (strstr(argv[i] + 11, ":force") != NULL);
@ -864,9 +901,9 @@ int Xorriso_check_media_list_job(struct XorrisO *xorriso,
sprintf(report + strlen(report), " what=%s",
job->mode == 1 ? "disc" : "tracks");
if(all || job->min_lba != dflt->min_lba)
sprintf(report + strlen(report), " min_lba=%d", job->min_lba);
sprintf(report + strlen(report), " min_lba=%.f", (double) job->min_lba);
if(all || job->max_lba != dflt->max_lba)
sprintf(report + strlen(report), " max_lba=%d", job->max_lba);
sprintf(report + strlen(report), " max_lba=%.f", (double) job->max_lba);
if(all || job->retry != dflt->retry)
sprintf(report + strlen(report), " retry=%s",
job->retry == 1 ? "on" : job->retry == -1 ? "off" : "default");
@ -898,8 +935,9 @@ int Xorriso_check_media_list_job(struct XorrisO *xorriso,
if(job->patch_lba0 == 0)
sprintf(report + strlen(report), "off");
else if(job->patch_lba0_msc1 >= 0)
sprintf(report + strlen(report), "%d%s",
job->patch_lba0_msc1, job->patch_lba0 == 2 ? ":force" : "");
sprintf(report + strlen(report), "%.f%s",
(double) job->patch_lba0_msc1,
job->patch_lba0 == 2 ? ":force" : "");
else
sprintf(report + strlen(report), "%s",
job->patch_lba0 == 2 ? "force" : "on");
@ -942,7 +980,8 @@ int Xorriso_sectormap_to_spotlist(struct XorrisO *xorriso,
int flag)
{
struct SectorbitmaP *map;
int ret, i, sectors, sector_size, value, old_value= -1, old_start= -1;
int ret, value, old_value= -1;
off_t i, sectors, sector_size, old_start= -1;
map= job->sector_map;
if(map == NULL)
@ -1005,14 +1044,16 @@ ex:;
*/
int Xorriso_spotlist_to_sectormap(struct XorrisO *xorriso,
struct SpotlisT *spotlist,
int read_chunk,
off_t read_chunk,
struct SectorbitmaP **map,
int flag)
{
struct SectorbitmaP *m;
int map_sectors= -1, map_sector_size= -1, valid;
int list_sectors, list_blocks, sector_size, sector_blocks;
int replace_map= 0, count, i, lba, blocks, quality, ret, pass;
int valid;
off_t map_sectors= -1, map_sector_size= -1;
int replace_map= 0, quality, ret, pass;
off_t list_sectors, list_blocks, sector_size, sector_blocks;
off_t count, i, lba, blocks;
sector_size= Spotlist_sector_size(spotlist, read_chunk, 0);
sector_blocks= sector_size / 2048;
@ -1032,11 +1073,8 @@ int Xorriso_spotlist_to_sectormap(struct XorrisO *xorriso,
m= *map;
else {
if(*map != NULL) {
if(((off_t) (*map)->sectors) * ((off_t) (*map)->sector_size) >
((off_t) list_sectors) * ((off_t) sector_size))
list_sectors= (((off_t) (*map)->sectors) *
((off_t) (*map)->sector_size)) / ((off_t) sector_size)
+ 1;
if((*map)->sectors * (*map)->sector_size > list_sectors * sector_size)
list_sectors= (*map)->sectors * (*map)->sector_size / sector_size + 1;
}
ret= Sectorbitmap_new(&m, list_sectors, sector_size, 0);
if(ret <= 0)
@ -1102,10 +1140,11 @@ int Xorriso_open_job_data_to(struct XorrisO *xorriso,
int Xorriso_update_in_sector_map(struct XorrisO *xorriso,
struct SpotlisT *spotlist, int read_chunk,
struct SpotlisT *spotlist, off_t read_chunk,
struct CheckmediajoB *job, int flag)
{
int sectors, sector_size, sector_blocks, ret;
int ret;
off_t sectors, sector_size, sector_blocks;
struct SectorbitmaP *map;
Sectorbitmap_destroy(&(xorriso->in_sector_map), 0);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2020 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -13,6 +13,9 @@
#ifndef Xorriso_pvt_check_includeD
#define Xorriso_pvt_check_includeD yes
/* For ssize_t */
#include <unistd.h>
struct SpotlisT; /* List of intervals with different read qualities */
struct CheckmediajoB; /* Parameters for Xorriso_check_media() */
@ -29,7 +32,7 @@ int Xorriso_sectormap_to_spotlist(struct XorrisO *xorriso,
*/
int Xorriso_spotlist_to_sectormap(struct XorrisO *xorriso,
struct SpotlisT *spotlist,
int read_chunk,
off_t read_chunk,
struct SectorbitmaP **map,
int flag);
@ -47,33 +50,33 @@ int Xorriso_check_media_list_job(struct XorrisO *xorriso,
char *report, int flag);
int Xorriso_update_in_sector_map(struct XorrisO *xorriso,
struct SpotlisT *spotlist, int read_chunk,
struct SpotlisT *spotlist, off_t read_chunk,
struct CheckmediajoB *job, int flag);
/* Distiniction between valid and invalid sectors */
struct SectorbitmaP {
int sectors;
int sector_size;
off_t sectors;
off_t sector_size;
unsigned char *map;
int map_size;
ssize_t map_size;
};
int Spotlist_new(struct SpotlisT **o, int flag);
int Spotlist_destroy(struct SpotlisT **o, int flag);
int Spotlist_add_item(struct SpotlisT *o, int start_lba, int blocks,
int Spotlist_add_item(struct SpotlisT *o, off_t start_lba, off_t blocks,
int quality, int flag);
int Spotlist_count(struct SpotlisT *o, int flag);
off_t Spotlist_count(struct SpotlisT *o, int flag);
int Spotlist_block_count(struct SpotlisT *o, int flag);
off_t Spotlist_block_count(struct SpotlisT *o, int flag);
int Spotlist_sector_size(struct SpotlisT *o, int read_chunk, int flag);
off_t Spotlist_sector_size(struct SpotlisT *o, off_t read_chunk, int flag);
int Spotlist_get_item(struct SpotlisT *o, int idx,
int *start_lba, int *blocks, int *quality, int flag);
int Spotlist_get_item(struct SpotlisT *o, off_t idx,
off_t *start_lba, off_t *blocks, int *quality, int flag);
char *Spotlist__quality_name(int quality, char name[80], int bad_limit,
int flag);
@ -95,8 +98,8 @@ char *Spotlist__quality_name(int quality, char name[80], int bad_limit,
struct CheckmediajoB {
int use_dev; /* 0= use indev , 1= use outdev , 2= use sector map*/
int min_lba; /* if >=0 : begin checking at this address */
int max_lba; /* if >=0 : read up to this address, else use mode */
off_t min_lba; /* if >=0 : begin checking at this address */
off_t max_lba; /* if >=0 : read up to this address, else use mode */
int min_block_size; /* granularity desired by user
*/
@ -120,7 +123,7 @@ struct CheckmediajoB {
off_t data_to_limit; /* used with file copy */
int data_to_skip; /* number of bytes to skip on writing. < 2048 */
int patch_lba0;
int patch_lba0_msc1;
off_t patch_lba0_msc1;
char sector_map_path[SfileadrL];
struct SectorbitmaP *sector_map;
@ -154,22 +157,22 @@ int Checkmediajob_destroy(struct CheckmediajoB **o, int flag);
int Checkmediajob_copy(struct CheckmediajoB *from, struct CheckmediajoB *to,
int flag);
int Sectorbitmap_new(struct SectorbitmaP **o, int sectors, int sector_size,
int Sectorbitmap_new(struct SectorbitmaP **o, off_t sectors, off_t sector_size,
int flag);
int Sectorbitmap_destroy(struct SectorbitmaP **o, int flag);
int Sectorbitmap_from_file(struct SectorbitmaP **o, char *path, char *msg,
int *os_errno, int flag);
int Sectorbitmap_to_file(struct SectorbitmaP *o, char *path, char *info,
char *msg, int *os_errno, int flag);
int Sectorbitmap_set(struct SectorbitmaP *o, int sector, int flag);
int Sectorbitmap_set(struct SectorbitmaP *o, off_t sector, int flag);
int Sectorbitmap_set_range(struct SectorbitmaP *o,
int start_sector, int sectors, int flag);
int Sectorbitmap_is_set(struct SectorbitmaP *o, int sector, int flag);
off_t start_sector, off_t sectors, int flag);
int Sectorbitmap_is_set(struct SectorbitmaP *o, off_t sector, int flag);
int Sectorbitmap_bytes_are_set(struct SectorbitmaP *o,
off_t start_byte, off_t end_byte, int flag);
int Sectorbitmap_get_layout(struct SectorbitmaP *o,
int *sectors, int *sector_size, int flag);
off_t *sectors, off_t *sector_size, int flag);
int Sectorbitmap_copy(struct SectorbitmaP *from, struct SectorbitmaP *to,
int flag);

View File

@ -3,7 +3,7 @@
# Copyright (c) 2007 - 2023 Thomas Schmitt <scdbackup@gmx.net>
# Provided under GPL version 2 or later.
AC_INIT([xorriso], [1.5.6], [http://libburnia-project.org])
AC_INIT([xorriso], [1.5.7], [http://libburnia-project.org])
AC_PREREQ([2.50])
AC_CANONICAL_HOST
@ -23,14 +23,14 @@ AC_DEFINE([Xorriso_standalonE], [])
BURN_MAJOR_VERSION=1
BURN_MINOR_VERSION=5
BURN_MICRO_VERSION=6
BURN_MICRO_VERSION=7
AC_SUBST(BURN_MAJOR_VERSION)
AC_SUBST(BURN_MINOR_VERSION)
AC_SUBST(BURN_MICRO_VERSION)
LIBISOFS_MAJOR_VERSION=1
LIBISOFS_MINOR_VERSION=5
LIBISOFS_MICRO_VERSION=6
LIBISOFS_MICRO_VERSION=7
AC_SUBST(LIBISOFS_MAJOR_VERSION)
AC_SUBST(LIBISOFS_MINOR_VERSION)
AC_SUBST(LIBISOFS_MICRO_VERSION)

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -1843,11 +1843,11 @@ int Xorriso_afile_fopen(struct XorrisO *xorriso,
bit3= do not care for device filetype
*/
int Xorriso_make_mount_cmd(struct XorrisO *xorriso, char *cmd,
int lba, int track, int session, char *volid,
off_t lba, int track, int session, char *volid,
char *devadr, char result[SfileadrL], int flag)
{
int ret, reg_file= 0, is_safe= 0, sys_code= 0;
char *form= NULL, session_text[12], track_text[12], lba_text[12];
char *form= NULL, session_text[12], track_text[12], lba_text[24];
char *vars[5][2], *sfe= NULL, *volid_sfe= NULL, *cpt, *sysname;
char *cooked_dev= NULL, *eff_dev;
struct stat stbuf;
@ -1951,7 +1951,7 @@ int Xorriso_make_mount_cmd(struct XorrisO *xorriso, char *cmd,
}
sprintf(session_text, "%d", session);
sprintf(track_text, "%d", track);
sprintf(lba_text, "%d", lba);
sprintf(lba_text, "%.f", (double) lba);
vars[0][0]= "sbsector";
vars[0][1]= lba_text;
vars[1][0]= "track";

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -118,7 +118,7 @@ int Xorriso_afile_fopen(struct XorrisO *xorriso,
char *filename, char *mode, FILE **ret_fp, int flag);
int Xorriso_make_mount_cmd(struct XorrisO *xorriso, char *cmd,
int lba, int track, int session, char *volid,
off_t lba, int track, int session, char *volid,
char *devadr, char result[SfileadrL], int flag);
int Xorriso_append_scdbackup_record(struct XorrisO *xorriso, int flag);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -247,7 +247,8 @@ int Xorriso_make_read_options(struct XorrisO *xorriso,
struct isoburn_read_opts **ropts,
int flag)
{
int ret, ext, load_lba;
int ret, ext;
off_t load_lba;
enum burn_disc_status state;
/* fill read opts */
@ -312,10 +313,10 @@ int Xorriso_make_read_options(struct XorrisO *xorriso,
state= isoburn_disc_get_status(drive);
if(state != BURN_DISC_BLANK) {
ret= isoburn_disc_get_msc1(drive, &load_lba);
ret= isoburn_disc_get_msc1_v2(drive, &load_lba);
if(ret > 0 && !(flag & 1)) {
sprintf(xorriso->info_text,
"Loading ISO image tree from LBA %d", load_lba);
"Loading ISO image tree from LBA %.f", (double) load_lba);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
}
ret= Xorriso_assert_volid(xorriso, load_lba, 0);
@ -348,7 +349,8 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
int flag)
{
int ret, hret, not_writeable= 0, has_what, aquire_flag;
int lba, track, session, params_flag, adr_mode, read_ret, start_lba;
int track, session, params_flag, adr_mode, read_ret;
off_t lba, start_lba;
int truncate_mode;
uint32_t size, offst;
struct burn_drive_info *dinfo= NULL, *out_dinfo= NULL, *in_dinfo= NULL;
@ -525,9 +527,9 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
/* Convert volid search expression into lba */
params_flag= 0;
ret= Xorriso__bourne_to_reg(xorriso->image_start_value, adr_data, 0);
if(ret == 1)
if(ret >= 1)
params_flag|= 4;
ret= isoburn_get_mount_params(drive, 4, adr_data, &lba, &track,
ret= isoburn_get_mount_params_v2(drive, 4, adr_data, &lba, &track,
&session, volid, params_flag);
Xorriso_process_msg_queues(xorriso,0);
if(ret <= 0)
@ -538,7 +540,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
0, "FAILURE", 0);
ret= 0; goto ex;
}
sprintf(volid, "%d", lba);
sprintf(volid, "%.f", (double) lba);
adr_pt= volid;
adr_mode= 3;
}
@ -592,7 +594,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
ret= Xorriso_get_drive_handles(xorriso, &in_dinfo, &in_drive,
"on attempt to attach ISO image object to outdev", 16);
if(ret > 0)
start_lba= isoburn_get_attached_start_lba(in_drive);
start_lba= isoburn_get_attached_start_lba_v2(in_drive);
ret= isoburn_attach_image(drive, (IsoImage *) xorriso->in_volset_handle);
if(ret<=0) {
sprintf(xorriso->info_text,
@ -601,7 +603,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
{ret= -1; goto ex;}
}
if(start_lba >= 0)
isoburn_attach_start_lba(drive, lba, 0);
isoburn_attach_start_lba_v2(drive, start_lba, 0);
}
if(!(flag&32))
Xorriso_toc(xorriso, 1 | 2 | 8);
@ -703,7 +705,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
ret= Xorriso_get_drive_handles(xorriso, &in_dinfo, &in_drive,
"on attempt to attach ISO image volset to outdev", 16);
if(ret > 0)
start_lba= isoburn_get_attached_start_lba(in_drive);
start_lba= isoburn_get_attached_start_lba_v2(in_drive);
ret= Xorriso_get_drive_handles(xorriso, &out_dinfo, &out_drive,
"on attempt to attach ISO image volset to outdev", 2);
if(ret<=0)
@ -711,7 +713,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
iso_image_ref((IsoImage *) xorriso->in_volset_handle);
isoburn_attach_image(out_drive, xorriso->in_volset_handle);
if(start_lba >= 0)
isoburn_attach_start_lba(out_drive, ret, 0);
isoburn_attach_start_lba_v2(out_drive, start_lba, 0);
}
Xorriso_process_msg_queues(xorriso,0);
isoburn_ropt_get_size_what(ropts, &size, &has_what);
@ -1055,13 +1057,11 @@ int Xorriso_media_product(struct XorrisO *xorriso, int flag)
*/
int Xorriso_toc(struct XorrisO *xorriso, int flag)
{
int num_sessions= 0, num_tracks= 0, lba= 0, nwa= -1, ret;
int track_count= 0, session_no, track_no, profile_no= -1, track_size;
int session_size, first_track_start= 0;
int num_session_data, num_session_other;
int num_data= 0, other_data= 0, is_data= 0;
int is_inout_drive= 0, drive_role, status, num_formats, emul_lba;
int not_recognizable= 0, start_lba, end_lba;
int num_sessions= 0, num_tracks= 0, ret;
int track_count= 0, session_no, track_no, profile_no= -1;
int is_data= 0;
int is_inout_drive= 0, drive_role, status, num_formats;
int not_recognizable= 0;
int sessions_seen, open_sessions= 0, have_real_open_session= 0;
char profile_name[80],*respt,*devadr, *typetext= "";
struct burn_toc_entry toc_entry;
@ -1075,14 +1075,16 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
struct isoburn_toc_disc *disc= NULL;
struct isoburn_toc_session **sessions;
struct isoburn_toc_track **tracks;
int image_blocks= 0;
char volume_id[33];
struct burn_toc_entry next_toc_entry;
int disk_category, part_version, num_layers, num_blocks;
char *book_name;
int num_data_from_format= 0;
char *sno = NULL;
int sno_len, i, is_bdr_pow= 0, overburn_blocks= 0;
int sno_len, i, is_bdr_pow= 0, int_start_lba= -1, int_end_lba= -1;
off_t lba= 0, nwa= -1, track_size, session_size, first_track_start= 0;
off_t num_session_data, num_session_other, num_data, other_data= 0;
off_t emul_lba, end_lba, image_blocks, overburn_blocks= 0;
ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive,
"on attempt to print Table Of Content",
@ -1231,17 +1233,17 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
sno= NULL;
respt= xorriso->result_line;
ret= burn_get_read_capacity(drive, &num_data, 0);
ret= burn_get_read_capacity_v2(drive, &num_data, 0);
if(ret != 1 || s == BURN_DISC_BLANK)
num_data= 0;
num_free= isoburn_disc_available_space(drive, NULL) / 2048;
nwa= -1;
if (s == BURN_DISC_APPENDABLE) {
ret= isoburn_disc_track_lba_nwa(drive, NULL, 0, &lba, &nwa);
ret= isoburn_disc_track_lba_nwa_v2(drive, NULL, 0, &lba, &nwa);
if(ret <= 0)
nwa= -1;
} else if(s == BURN_DISC_BLANK) {
ret= isoburn_disc_track_lba_nwa(drive, NULL, 0, &lba, &nwa);
ret= isoburn_disc_track_lba_nwa_v2(drive, NULL, 0, &lba, &nwa);
if(ret == 1) {
num_free+= nwa;
nwa= 0;
@ -1259,7 +1261,8 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
ret= burn_disc_read_atip(drive);
if(ret < 0)
goto ex;
ret= burn_drive_get_start_end_lba(drive, &start_lba, &end_lba, 0);
ret= burn_drive_get_start_end_lba(drive, &int_start_lba, &int_end_lba, 0);
end_lba= int_end_lba;
if(s == BURN_DISC_FULL && ret == 1) {
if(lba > end_lba - 2) {
overburn_blocks= lba - end_lba + 2;
@ -1269,7 +1272,7 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
} else {
if(ret == 1 && end_lba - 2 > lba) {
sprintf(xorriso->info_text,
"ATIP end_lba %d > overall %d", end_lba, lba);
"ATIP end_lba %.f > overall %.f", (double) end_lba, (double) lba);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
}
}
@ -1289,11 +1292,12 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
num_free_text = "unused";
else
num_free_text = "writable";
sprintf(respt, "Media blocks : %d %s , %d %s , %d overall\n",
num_data, num_data_text, (int) num_free, num_free_text, lba);
sprintf(respt, "Media blocks : %.f %s , %.f %s , %.f overall\n",
(double) num_data, num_data_text,
(double) num_free, num_free_text, (double) lba);
Xorriso_toc_line(xorriso, flag & 8);
if(overburn_blocks > 0) {
sprintf(respt, "Overburnt by : %d blocks\n", overburn_blocks);
sprintf(respt, "Overburnt by : %.f blocks\n", (double) overburn_blocks);
Xorriso_toc_line(xorriso, flag & 8);
}
}
@ -1347,7 +1351,7 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
Xorriso_process_msg_queues(xorriso,0);
nwa= 0;
if(drive_role == 5 && s == BURN_DISC_APPENDABLE) {
ret= burn_disc_track_lba_nwa(drive, NULL, 0, &lba, &nwa);
ret= burn_disc_track_lba_nwa_v2(drive, NULL, 0, &lba, &nwa);
if(ret != 1)
nwa= 0;
} else {
@ -1369,10 +1373,10 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
ret= 0;
typetext= "Session ";
} else
ret= isoburn_read_iso_head(drive, 0, &image_blocks, volume_id, 1);
ret= isoburn_read_iso_head_v2(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);
sprintf(respt, "ISO session : %3d , %9d , %9.fs , %s\n",
1, 0, (double) image_blocks, volume_id);
nwa= image_blocks;
} else {
ret= burn_disc_get_formats(drive, &status, &size, &dummy,
@ -1380,17 +1384,17 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
if(ret <= 0 || status != BURN_FORMAT_IS_FORMATTED)
size= 0;
if(size <= 0) {
ret= burn_get_read_capacity(drive, &num_data, 0);
ret= burn_get_read_capacity_v2(drive, &num_data, 0);
if(ret == 1)
size= ((off_t) num_data) * (off_t) 2048;
size= num_data * (off_t) 2048;
} else {
num_data_from_format= 1;
}
num_data= size / 2048;
if(num_data == 0 && drive_role == 5 && s == BURN_DISC_APPENDABLE)
num_data= nwa;
sprintf(respt, "%13s: %3d , %9d , %9ds , \n",
typetext, 1, 0, num_data);
sprintf(respt, "%13s: %3d , %9d , %9.fs , \n",
typetext, 1, 0, (double) num_data);
}
if(!(flag&1))
Xorriso_toc_line(xorriso, flag & 8);
@ -1416,7 +1420,10 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
isoburn_toc_track_get_entry(tracks[track_no], &toc_entry);
if((toc_entry.control & 7) >= 4) /* data track */
is_data= 1;
if (toc_entry.extensions_valid & 1) {
if(toc_entry.extensions_valid & 8) {
lba= toc_entry.long_start_lba;
track_size= toc_entry.long_track_blocks;
} else if(toc_entry.extensions_valid & 1) {
/* DVD extension valid */
lba= toc_entry.start_lba;
track_size= toc_entry.track_blocks;
@ -1435,14 +1442,15 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
if((flag & (1 | 4)) || !is_data) {
ret= 0;
} else {
ret= isoburn_toc_track_get_emul(tracks[track_no], &emul_lba,
&image_blocks, volume_id, 0);
ret= isoburn_toc_track_get_emul_v2(tracks[track_no], &emul_lba,
&image_blocks, volume_id, 0);
if(ret <= 0)
ret= isoburn_read_iso_head(drive, lba, &image_blocks, volume_id, 1);
ret= isoburn_read_iso_head_v2(drive, lba, &image_blocks, volume_id,
1);
if(image_blocks > track_size) {
sprintf(xorriso->info_text,
"Session %d bears ISO image size %ds larger than track size %ds",
session_no + 1, image_blocks, track_size);
"Session %d bears ISO image size %.fs larger than track size %.fs",
session_no + 1, (double) image_blocks, (double) track_size);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING",
0);
image_blocks= track_size;
@ -1451,26 +1459,28 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
if(session_no >= num_sessions && track_no == 0) {
if(ret <= 0)
volume_id[0]= 0;
sprintf(respt, "Incmp session: %3d , %9d , %9ds , %s\n",
session_no+1, lba, image_blocks, volume_id);
sprintf(respt, "Incmp session: %3d , %9.f , %9.fs , %s\n",
session_no + 1, (double) lba, (double) image_blocks,
volume_id);
} else if(ret>0 && track_no==0) {
sprintf(respt, "ISO session : %3d , %9d , %9ds , %s\n",
session_no+1, lba, image_blocks , volume_id);
sprintf(respt, "ISO session : %3d , %9.f , %9.fs , %s\n",
session_no + 1, (double) lba, (double) image_blocks ,
volume_id);
} else if(ret>0) {
sprintf(respt, "ISO track : %3d , %9d , %9ds , %s\n",
track_count, lba, image_blocks , volume_id);
sprintf(respt, "ISO track : %3d , %9.f , %9.fs , %s\n",
track_count, (double) lba, (double) image_blocks , volume_id);
} else if(track_no==0) {
typetext= "Other session";
if(flag & 4)
typetext= "Session ";
sprintf(respt, "%13s: %3d , %9d , %9ds , \n",
typetext, session_no+1, lba, track_size);
sprintf(respt, "%13s: %3d , %9.f , %9.fs , \n",
typetext, session_no+1, (double) lba, (double) track_size);
} else {
typetext= "Other track ";
if(flag & 4)
typetext= "Track ";
sprintf(respt, "%13s: %3d , %9d , %9ds , \n",
typetext, track_count, lba, track_size);
sprintf(respt, "%13s: %3d , %9.f , %9.fs , \n",
typetext, track_count, (double) lba, (double) track_size);
}
if(!(flag&1))
Xorriso_toc_line(xorriso, flag & 8);
@ -1482,7 +1492,9 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
first_track_start= lba;
}
isoburn_toc_session_get_leadout_entry(sessions[session_no], &toc_entry);
if (toc_entry.extensions_valid & 1) {
if (toc_entry.extensions_valid & 8) {
lba= toc_entry.long_start_lba;
} else if(toc_entry.extensions_valid & 1) {
lba= toc_entry.start_lba;
} else {
lba= burn_msf_to_lba(toc_entry.pmin, toc_entry.psec, toc_entry.pframe);
@ -1505,8 +1517,9 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
sessions_seen= num_sessions + open_sessions;
if(open_sessions > 0 && !have_real_open_session)
sessions_seen--;
sprintf(respt, "Media summary: %d session%s, %d data blocks, %s data",
sessions_seen, (sessions_seen == 1 ? "" : "s"), num_data, mem_text);
sprintf(respt, "Media summary: %d session%s, %.f data blocks, %s data",
sessions_seen, (sessions_seen == 1 ? "" : "s"), (double) num_data,
mem_text);
if(num_data_from_format)
num_free= 0;
else
@ -1518,14 +1531,14 @@ int Xorriso_toc(struct XorrisO *xorriso, int flag)
Xorriso_toc_line(xorriso, flag & 8);
if(other_data > 0) {
sprintf(respt, "Non-data blks: %d\n", other_data);
sprintf(respt, "Non-data blks: %.f\n", (double) other_data);
Xorriso_toc_line(xorriso, flag & 8);
}
if (s==BURN_DISC_APPENDABLE && nwa!=0) {
ret= isoburn_disc_track_lba_nwa(drive, NULL, 0, &lba, &nwa);
ret= isoburn_disc_track_lba_nwa_v2(drive, NULL, 0, &lba, &nwa);
if(ret>0) {
sprintf(respt, "Media nwa : %ds\n", nwa);
sprintf(respt, "Media nwa : %.fs\n", (double) nwa);
if(!(flag&1))
Xorriso_toc_line(xorriso, flag & 8);
}
@ -1650,9 +1663,9 @@ ex:;
int Xorriso_tell_media_space(struct XorrisO *xorriso,
int *media_space, int *free_space, int flag)
off_t *media_space, off_t *free_space, int flag)
{
int ret;
off_t ret;
struct burn_drive_info *dinfo;
struct burn_drive *drive;
struct burn_write_opts *burn_options;
@ -2231,7 +2244,7 @@ int Xorriso_atip(struct XorrisO *xorriso, int flag)
sprintf(respt, "Producer: %s\n", manuf);
Xorriso_result(xorriso, 1);
}
if(profile_number == 0x09 || profile_number == 0x0a) {
if(manuf != NULL && (profile_number == 0x09 || profile_number == 0x0a)) {
sprintf(respt, "Manufacturer: %s\n", manuf);
Xorriso_result(xorriso, 1);
} else if(product_id != NULL && media_code1 != NULL && media_code2 != NULL){
@ -2302,9 +2315,10 @@ int Xorriso_get_profile(struct XorrisO *xorriso, int *profile_number,
bit1= obtain info from outdev
bit2= no need to obtain msc2 (NWA)
*/
int Xorriso_msinfo(struct XorrisO *xorriso, int *msc1, int *msc2, int flag)
int Xorriso_msinfo(struct XorrisO *xorriso, off_t *msc1, off_t *msc2, int flag)
{
int ret, dummy, is_bdr_pow= 0;
int ret, is_bdr_pow= 0;
off_t dummy;
struct burn_drive *drive;
struct burn_drive_info *dinfo;
enum burn_disc_status disc_state;
@ -2339,7 +2353,7 @@ int Xorriso_msinfo(struct XorrisO *xorriso, int *msc1, int *msc2, int flag)
}
return(0);
}
ret= isoburn_disc_get_msc1(drive, msc1);
ret= isoburn_disc_get_msc1_v2(drive, msc1);
if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, "Cannot obtain address of most recent session");
@ -2348,7 +2362,7 @@ int Xorriso_msinfo(struct XorrisO *xorriso, int *msc1, int *msc2, int flag)
}
if(flag & 4)
return(1);
ret= isoburn_disc_track_lba_nwa(drive, NULL, 0, &dummy, msc2);
ret= isoburn_disc_track_lba_nwa_v2(drive, NULL, 0, &dummy, msc2);
if(ret<0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, "Cannot obtain next writeable address on media");
@ -2533,13 +2547,13 @@ struct xorriso_md5_state {
pthread_mutex_t spot_mutex;
/* Checksum tag cursor */
uint32_t md5_start;
uint32_t next_tag;
off_t md5_start;
off_t next_tag;
int chain_broken;
int in_track_gap;
int was_sb_tag;
int md5_spot_value;
uint32_t md5_spot_lba;
off_t md5_spot_lba;
/* Asynchronous operation */
@ -2558,7 +2572,7 @@ struct xorriso_md5_state {
3= end-of-processing (set by boss when done)
*/
int *chunk_fill; /* Actual number of valid bytes in chunk */
uint32_t *chunk_lba;
off_t *chunk_lba;
int chunk_w_idx; /* Write index. Operated by boss */
int chunk_r_idx; /* Read index. Operated by MD5 slave */
@ -2569,7 +2583,7 @@ struct xorriso_md5_state {
int Xorriso__add_spot(struct xorriso_md5_state *state,
int start_lba, int blocks, int quality, int flag)
off_t start_lba, off_t blocks, int quality, int flag)
{
int ret, uret;
@ -2579,6 +2593,7 @@ int Xorriso__add_spot(struct xorriso_md5_state *state,
return(0);
}
ret= Spotlist_add_item(state->spotlist, start_lba, blocks, quality, 0);
if(state->chunk != NULL) {
uret= pthread_mutex_unlock(&(state->spot_mutex));
if(uret != 0 && ret > 0)
@ -2589,16 +2604,25 @@ int Xorriso__add_spot(struct xorriso_md5_state *state,
int Xorriso_chunk_md5(struct XorrisO *xorriso, char *data, int to_read,
uint32_t from_lba, struct xorriso_md5_state *state, int flag)
off_t from_lba, struct xorriso_md5_state *state, int flag)
{
int j, k, ret= 0, valid, tag_type, decode_ret= 0;
uint32_t lba, pos, range_start, range_size;
uint32_t pos, range_start, range_size, next_tag_uint32;
off_t lba;
char md5[16], tag_md5[16], *tag_type_name= "", *comparison, *sev_text;
char md5_text[33];
void *cloned_ctx= NULL;
for(j= 0; j < to_read; j++) {
lba= j + from_lba;
if(lba > (off_t) 0xffffffff) {
if(lba == (off_t) 0x100000000) {
printf(xorriso->info_text,
"Checkreading exceeds the 32-bit block address limit of libisofs MD5 tags");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING",0);
}
break;
}
if(lba < state->md5_start)
continue;
ret= decode_ret= 0;
@ -2606,8 +2630,10 @@ int Xorriso_chunk_md5(struct XorrisO *xorriso, char *data, int to_read,
(state->next_tag == 0 || state->chain_broken || lba == state->next_tag)){
ret= iso_util_decode_md5_tag(data + j * 2048, &tag_type,
&pos, &range_start, &range_size,
&(state->next_tag), tag_md5,
&next_tag_uint32, tag_md5,
!!state->chain_broken);
if(ret > 0 && tag_type >= 2 && tag_type <= 4)
state->next_tag= next_tag_uint32;
decode_ret= ret;
}
valid= (ret == 1 || ret == (int) ISO_MD5_AREA_CORRUPTED) && pos == lba;
@ -2628,7 +2654,7 @@ int Xorriso_chunk_md5(struct XorrisO *xorriso, char *data, int to_read,
ret= -1; goto ex;
}
iso_md5_compute(&(state->ctx), data + (j - (lba - range_start)) * 2048,
(lba - range_start) * 2048);
(int) (lba - range_start) * 2048);
state->md5_start= range_start;
state->in_track_gap= 0;
}
@ -2647,13 +2673,13 @@ int Xorriso_chunk_md5(struct XorrisO *xorriso, char *data, int to_read,
sprintf(xorriso->info_text,
"Found MD5 %s tag which covers different data range", tag_type_name);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE",0);
sprintf(xorriso->info_text, " Expected start: %u Found: %u",
(unsigned int) state->md5_start, range_start);
sprintf(xorriso->info_text, " Expected start: %.f Found: %lu",
(double) state->md5_start, (unsigned long int) range_start);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE",0);
for(k= 0; k < 16; k++)
sprintf(md5_text + 2 * k, "%2.2x", ((unsigned char *) tag_md5)[k]);
sprintf(xorriso->info_text, " Size: %u MD5: %s",
range_size, md5_text);
sprintf(xorriso->info_text, " Size: %lu MD5: %s",
(unsigned long int) range_size, md5_text);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE",0);
state->chain_broken= 1;
valid= 0;
@ -2682,15 +2708,16 @@ int Xorriso_chunk_md5(struct XorrisO *xorriso, char *data, int to_read,
}
state->md5_spot_lba= lba;
sprintf(xorriso->info_text,
"Found %s MD5 %s tag: start=%d size=%d",
comparison, tag_type_name, state->md5_start,
lba - state->md5_start);
"Found %s MD5 %s tag: start=%.f size=%.f",
comparison, tag_type_name, (double) state->md5_start,
(double) (lba - state->md5_start));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, sev_text, 0);
}
if(valid && (tag_type == 1 || (tag_type == 4 && pos == lba && lba < 32))){
if(state->md5_spot_value != Xorriso_read_quality_untesteD) {
ret= Xorriso__add_spot(state, state->md5_start,
state->md5_spot_lba - state->md5_start, state->md5_spot_value, 0);
state->md5_spot_lba - state->md5_start,
state->md5_spot_value, 0);
if(ret <= 0)
goto ex;
}
@ -2847,15 +2874,15 @@ int Xorriso__end_slave_md5(struct xorriso_md5_state *state,
*/
int Xorriso_check_interval(struct XorrisO *xorriso, struct SpotlisT *spotlist,
struct CheckmediajoB *job,
int from_lba, int block_count, int read_chunk,
int md5_start, int flag)
off_t from_lba, off_t block_count, off_t read_chunk,
off_t md5_start, int flag)
{
int i, j, ret, total_count= 0, sectors= -1, sector_size= -1, skip_reading;
int ret, skip_reading, first_value, fret, suspect_tao_end= 0;
off_t i, j, total_count= 0, start_sec, end_sec, start_lba= 0;
off_t sectors= -1, sector_size= -1;
int prev_quality= -1, quality= -1, retry= 0, profile_no, is_cd= 0;
int eccb_size= 16, us_corr = 0, data_skip;
int start_sec, end_sec, first_value, fret, suspect_tao_end= 0;
char profile_name[80];
int start_lba= 0;
struct burn_drive *drive;
struct burn_drive_info *dinfo;
char *data= NULL, *data_pt;
@ -2948,7 +2975,7 @@ int Xorriso_check_interval(struct XorrisO *xorriso, struct SpotlisT *spotlist,
Xorriso_alloc_meM(state.chunk, char *, num_chunks);
Xorriso_alloc_meM(state.chunk_state, int, num_chunks);
Xorriso_alloc_meM(state.chunk_fill, int, num_chunks);
Xorriso_alloc_meM(state.chunk_lba, uint32_t, num_chunks);
Xorriso_alloc_meM(state.chunk_lba, off_t, num_chunks);
for(i= 0; i < state.num_chunks; i++) {
state.chunk[i]= data + read_chunk * i * 2048;
state.chunk_state[i]= 0;
@ -3068,7 +3095,7 @@ abort_check:;
goto ex;
data_pt= state.chunk[state.chunk_w_idx];
}
ret= burn_read_data(drive, ((off_t) (i + from_lba)) * (off_t) 2048,
ret= burn_read_data(drive, (i + from_lba) * (off_t) 2048,
data_pt, to_read * (off_t) 2048, &data_count,
(4 * !retry) | (16 * !!suspect_tao_end));
post_read_time= Sfile_microtime(0);
@ -3085,7 +3112,8 @@ abort_check:;
if(ret <= 0)
goto ex;
}
ret= Xorriso__add_spot(&state, i + from_lba, data_count / 2048,
ret= Xorriso__add_spot(&state, i + from_lba,
data_count / (off_t) 2048,
Xorriso_read_quality_partiaL, 0);
if(ret <= 0)
goto ex;
@ -3126,7 +3154,7 @@ abort_check:;
state.chunk_w_idx= (state.chunk_w_idx + 1) % state.num_chunks;
} else {
ret= Xorriso_chunk_md5(xorriso, data_pt, to_read,
(uint32_t) (i + from_lba), &state, 0);
i + from_lba, &state, 0);
if(ret <= 0)
goto ex;
}
@ -3149,7 +3177,7 @@ abort_check:;
}
if(write_amount > 0) {
if(job->data_to_fd >= 0) {
seek_adr= ((off_t) (i + from_lba)) * (off_t) 2048 +
seek_adr= (i + from_lba) * (off_t) 2048 +
job->data_to_skip + job->data_to_offset;
if(strcmp(job->data_to_path, "-") != 0) {
ret= lseek(job->data_to_fd, seek_adr, SEEK_SET);
@ -3198,8 +3226,9 @@ failed_to_write:;
/* <<< for calibration of quality */
if(total_count > 0) {
sprintf(xorriso->info_text, "Xorriso_check_interval: %.1f s / %d = %f",
total_time_diff, total_count, total_time_diff / total_count);
sprintf(xorriso->info_text, "Xorriso_check_interval: %.1f s / %.f = %f",
total_time_diff, (double) total_count,
(double) total_time_diff / total_count);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
}
@ -3214,15 +3243,16 @@ failed_to_write:;
/* >>> ??? allow chain_broken to be a match ? */
if(state.next_tag > 0) {
sprintf(xorriso->info_text, "Missing announced MD5 tag: start=%d pos=%d",
state.md5_start, state.next_tag);
sprintf(xorriso->info_text, "Missing announced MD5 tag: start=%.f pos=%.f",
(double) state.md5_start, (double) state.next_tag);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
state.md5_spot_value= Xorriso_read_quality_md5_mismatcH;
state.md5_spot_lba= state.next_tag;
}
if(state.md5_spot_value != Xorriso_read_quality_untesteD) {
ret= Xorriso__add_spot(&state, state.md5_start,
state.md5_spot_lba - state.md5_start, state.md5_spot_value, 0);
state.md5_spot_lba - state.md5_start,
state.md5_spot_value, 0);
if(ret <= 0)
goto ex;
}
@ -3232,8 +3262,8 @@ ex:;
if(async_md5) {
Xorriso__end_slave_md5(&state, 10000, 0);
sprintf(xorriso->info_text,
"async_chunks=%d , chunk_size=%ds , w_sleeps: %.f , r_sleeps: %.f",
state.num_chunks, read_chunk, (double) state.w_sleeps,
"async_chunks=%d , chunk_size=%.fs , w_sleeps: %.f , r_sleeps: %.f",
state.num_chunks, (double) read_chunk, (double) state.w_sleeps,
(double) state.r_sleeps);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
if(state.chunk != NULL)
@ -3254,11 +3284,13 @@ ex:;
int Xorriso_check_media(struct XorrisO *xorriso, struct SpotlisT **spotlist,
struct CheckmediajoB *job, int flag)
{
int media_blocks= 0, read_chunk= 32, ret, mode, start_lba= 0;
int blocks, os_errno, i, j, last_track_end= -1, track_blocks, track_lba;
int num_sessions, num_tracks, declare_untested= 0, md5_start;
int read_capacity= -1, end_lba, hret, count, quality, profile_no;
int track_bad_claim= 0;
int ret, mode, os_errno, j;
int num_sessions, num_tracks, declare_untested= 0;
int hret, quality, profile_no;
off_t i, blocks, last_track_end= -1, count, track_lba, start_lba= 0;
off_t media_blocks= 0, read_chunk= 32, md5_start, track_blocks;
off_t read_capacity= -1, end_lba;
off_t track_bad_claim= 0;
char *toc_info= NULL, profile_name[80], msg[160];
struct burn_drive *drive;
struct burn_drive_info *dinfo;
@ -3312,7 +3344,7 @@ int Xorriso_check_media(struct XorrisO *xorriso, struct SpotlisT **spotlist,
mode= job->mode;
if(job->min_lba > 0) {
start_lba= job->min_lba;
ret= Spotlist_add_item(*spotlist, 0, job->min_lba,
ret= Spotlist_add_item(*spotlist, (off_t) 0, job->min_lba,
Xorriso_read_quality_untesteD, 0);
if(ret <= 0)
goto ex;
@ -3336,7 +3368,7 @@ no_readable_medium:;
}
}
ret= burn_get_read_capacity(drive, &read_capacity, 0);
ret= burn_get_read_capacity_v2(drive, &read_capacity, 0);
if(ret <= 0)
read_capacity= -1;
if(s == BURN_DISC_BLANK && read_capacity <= 0)
@ -3345,8 +3377,8 @@ no_readable_medium:;
if(job->max_lba >= 0) {
blocks= job->max_lba + 1 - start_lba;
xorriso->pacifier_total= blocks;
ret= Xorriso_check_interval(xorriso, *spotlist, job, start_lba, blocks,
read_chunk, start_lba, 0);
ret= Xorriso_check_interval(xorriso, *spotlist, job, (int) start_lba, (int) blocks,
read_chunk, (int) start_lba, 0);
if(ret <= 0)
goto ex;
@ -3385,7 +3417,7 @@ no_tracks_found:;
track_bad_claim= track_lba + track_blocks;
if(track_lba >= read_capacity) {
sprintf(msg, "-check_media: Track %d of session %d begins after end of readable medium area.",
j + 1, i + 1);
j + 1, (int) (i + 1));
Xorriso_msgs_submit(xorriso, 0, msg, 0, "WARNING", 0);
continue;
} else {
@ -3397,7 +3429,7 @@ no_tracks_found:;
Xorriso_msgs_submit(xorriso, 0, msg, 0, "DEBUG", 0);
} else {
sprintf(msg, "-check_media: Track %d of session %d extends over the end of readable medium area.",
j + 1, i + 1);
j + 1, (int) (i + 1));
Xorriso_msgs_submit(xorriso, 0, msg, 0, "WARNING", 0);
}
track_blocks= read_capacity - track_lba;
@ -3438,7 +3470,7 @@ no_tracks_found:;
if(ret <= 0)
goto ex;
} else {
ret= Xorriso_check_interval(xorriso, *spotlist, job, track_lba,
ret= Xorriso_check_interval(xorriso, *spotlist, job, (int) track_lba,
track_blocks, read_chunk, md5_start,
(i > 0) | (4 * (xorriso->do_md5 & 1)));
if(ret <= 0)
@ -3459,7 +3491,7 @@ no_tracks_found:;
else
quality= Xorriso_read_quality_unreadablE;
ret= Spotlist_add_item(*spotlist, read_capacity,
track_bad_claim - read_capacity, quality, 0);
(track_bad_claim - read_capacity), quality, 0);
if(ret <= 0)
goto ex;
}
@ -3472,13 +3504,13 @@ no_tracks_found:;
isoburn_disc= isoburn_toc_drive_get_disc(drive);
if(isoburn_disc == NULL)
goto libburn_whole_disc;
blocks= media_blocks= isoburn_toc_disc_get_sectors(isoburn_disc);
blocks= media_blocks= isoburn_toc_disc_get_sectors_v2(isoburn_disc);
/* If possible, determine the end address of the loaded ISO image.
*/
track_lba= isoburn_get_attached_start_lba(drive);
track_lba= isoburn_get_attached_start_lba_v2(drive);
if(track_lba >= 0) {
ret= isoburn_read_iso_head(drive, track_lba, &track_blocks, NULL, 0);
ret= isoburn_read_iso_head_v2(drive, track_lba, &track_blocks, NULL, 0);
if(ret > 0) {
blocks= media_blocks= track_lba + track_blocks;
}
@ -3489,14 +3521,14 @@ no_tracks_found:;
if(media_blocks <= 0)
goto libburn_whole_disc;
xorriso->pacifier_total= blocks;
ret= Xorriso_check_interval(xorriso, *spotlist, job, start_lba, blocks,
read_chunk, start_lba, (4 * (xorriso->do_md5 & 1)));
ret= Xorriso_check_interval(xorriso, *spotlist, job, (int) start_lba, (int) blocks,
read_chunk, (int) start_lba, (4 * (xorriso->do_md5 & 1)));
if(ret <= 0)
goto ex;
} else if(mode == 2) {
libburn_whole_disc:;
/* single sweep over libburn medium capacity */
ret= burn_get_read_capacity(drive, &blocks, 0);
ret= burn_get_read_capacity_v2(drive, &blocks, 0);
if(ret <= 0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, "No content detected on media");
@ -3505,8 +3537,8 @@ libburn_whole_disc:;
}
blocks-= start_lba;
xorriso->pacifier_total= blocks;
ret= Xorriso_check_interval(xorriso, *spotlist, job, start_lba, blocks,
read_chunk, start_lba, (4 * (xorriso->do_md5 & 1)));
ret= Xorriso_check_interval(xorriso, *spotlist, job, (int) start_lba, (int) blocks,
read_chunk, (int) start_lba, (4 * (xorriso->do_md5 & 1)));
if(ret <= 0)
goto ex;
}
@ -3530,7 +3562,7 @@ ex:;
end_lba= start_lba + blocks;
}
if(read_capacity > end_lba) {
hret= Spotlist_add_item(*spotlist, end_lba, read_capacity - end_lba,
hret= Spotlist_add_item(*spotlist, end_lba, (read_capacity - end_lba),
Xorriso_read_quality_untesteD, 0);
if(hret < ret)
ret= hret;
@ -3538,7 +3570,8 @@ ex:;
}
if(ret > 0)
ret= Xorriso_update_in_sector_map(xorriso, *spotlist, read_chunk, job, 0);
ret= Xorriso_update_in_sector_map(xorriso, *spotlist, read_chunk,
job, 0);
if(ret > 0) {
ret= Xorriso_spotlist_to_sectormap(xorriso, *spotlist, read_chunk,
@ -3665,10 +3698,11 @@ int Xorriso_use_immed_bit(struct XorrisO *xorriso, int flag)
}
int Xorriso_obtain_indev_readsize(struct XorrisO *xorriso, uint32_t *blocks,
int Xorriso_obtain_indev_readsize(struct XorrisO *xorriso, off_t *blocks,
int flag)
{
int ret, num_data;
int ret;
off_t num_data;
struct burn_drive_info *dinfo;
struct burn_drive *drive;
enum burn_disc_status s;
@ -3681,7 +3715,7 @@ int Xorriso_obtain_indev_readsize(struct XorrisO *xorriso, uint32_t *blocks,
s= isoburn_disc_get_status(drive);
if(s == BURN_DISC_BLANK)
return(1);
ret= burn_get_read_capacity(drive, &num_data, 0);
ret= burn_get_read_capacity_v2(drive, &num_data, 0);
if(ret <= 0)
return(0);
*blocks= num_data;

View File

@ -25,8 +25,8 @@ int Xorriso_check_md5_range(struct XorrisO *xorriso, off_t start_lba,
int Xorriso_check_interval(struct XorrisO *xorriso, struct SpotlisT *spotlist,
struct CheckmediajoB *job,
int from_lba, int block_count, int read_chunk,
int md5_start, int flag);
off_t from_lba, off_t block_count, off_t read_chunk,
off_t md5_start, int flag);
int Xorriso_get_drive_handles(struct XorrisO *xorriso,
struct burn_drive_info **dinfo,

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2021 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -121,7 +121,8 @@ int Xorriso_cdrskin_help(struct XorrisO *xorriso, int flag)
int Xorriso_cdrskin(struct XorrisO *xorriso, char *whom, int argc, char **argv,
int flag)
{
int ret, i, k, mem_do_close, aq_ret, eject_ret, msc1, msc2, hflag;
int ret, i, k, mem_do_close, aq_ret, eject_ret, hflag;
off_t msc1, msc2;
int do_atip= 0, do_checkdrive= 0, do_eject= 0, do_scanbus= 0;
int do_toc= 0, do_verbous= 0, do_version= 0, do_help= 0, do_waiti= 0;
int do_multi= 0, do_msinfo= 0, do_grow= 0, do_isosize= 0, do_xa1= 0;
@ -525,7 +526,7 @@ no_volunteer:;
ret= Xorriso_msinfo(xorriso, &msc1, &msc2, 2 | !!do_grow);
if(ret<=0)
goto ex;
sprintf(xorriso->result_line, "%d,%d\n", msc1, msc2);
sprintf(xorriso->result_line, "%.f,%.f\n", (double) msc1, (double) msc2);
Xorriso_result(xorriso, 1);
}
@ -690,13 +691,17 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
""
};
static char arg2_options[][41]= {
"-hfs-bless-by", "--scdbackup_tag", "--sort-weight",
"-hfs-bless-by", "-hide_iso_path", "--scdbackup_tag", "--sort-weight",
""
};
static char arg3_options[][41]= {
"-append_partition", "-hfsplus-file-creator-type",
""
};
static char arg4_options[][41]= {
"-cut_out",
""
};
static char final_options[][41]= {
"-find",
""
@ -722,6 +727,10 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
for(i=0; arg3_options[i][0]!=0; i++)
if(strcmp(arg3_options[i], cmd)==0)
return(1);
*count= 4;
for(i=0; arg4_options[i][0]!=0; i++)
if(strcmp(arg4_options[i], cmd)==0)
return(1);
*count= argc - 1;
for(i=0; final_options[i][0]!=0; i++)
if(strcmp(final_options[i], cmd)==0)
@ -809,6 +818,8 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" -hide-joliet-list FILE File with list of Joliet files to hide",
" -hide-hfsplus GLOBFILE Hide HFS+ file",
" -hide-hfsplus-list FILE File with list of HFS+ files to hide",
" -hide_iso_path HIDE_STATE ISO_RR_PATH",
" Hide file by its ISO path",
" -input-charset CHARSET Local input charset for file name conversion",
" -output-charset CHARSET Output charset for file name conversion",
" -iso-level LEVEL Set ISO9660 conformance level (1..3) or 4 for ISO9660 version 2",
@ -942,6 +953,9 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" a GUID to be used if -appended_part_as_gpt.",
" -appended_part_as_gpt mark appended partitions in GPT instead of MBR.",
" -appended_part_as_apm mark appended partitions in APM.",
" -cut_out DISK_PATH BYTE_OFFSET BYTE_COUNT ISO_RR_PATH",
" map a byte interval of a regular disk file",
" into a regular file in the ISO image",
" --modification-date=YYYYMMDDhhmmsscc",
" Override date of creation and modification",
" --set_all_file_dates TIME Override mtime, atime, ctime in all files",
@ -2011,6 +2025,15 @@ not_enough_args:;
if(argv[i] != argpt)
delay_opt_list[delay_opt_count - 1]|= 1u<<31;
i++;
} else if(strcmp(argpt, "-hide_iso_path") == 0) {
if(i + 2 >= argc)
goto not_enough_args;
delay_opt_list[delay_opt_count++]= i;
if(argv[i] != argpt)
delay_opt_list[delay_opt_count - 1]|= 1u<<31;
i+= 2;
} else if(strncmp(argpt, "--modification-date=", 20)==0) {
ret= Xorriso_option_volume_date(xorriso, "uuid", argpt + 20, 0);
if(ret <= 0)
@ -2328,6 +2351,15 @@ rr_reloc_dir:;
if(ret <= 0)
goto problem_handler_2;
} else if(strcmp(argpt, "-cut_out") == 0) {
if(i + 4 >= argc)
goto not_enough_args;
i+= 4;
ret= Xorriso_option_cut_out(xorriso, argv[i - 3], argv[i - 2],
argv[i - 1], argv[i], 0);
if(ret <= 0)
goto problem_handler_2;
} else if(argpt[0]=='-' && argpt[1]!=0) {
ret= Xorriso_genisofs_fused_options(xorriso, whom, argv[i] + 1,
&option_d, &iso_level, &lower_r, ra_text, 1);
@ -2759,6 +2791,14 @@ problem_handler_2:;
if(ret <= 0)
goto problem_handler_boot;
} else if(strcmp(argpt, "-hide_iso_path") == 0) {
int i_plus;
i_plus= i + 2;
ret= Xorriso_option_hide(xorriso, argv[i + 1], i + 3, argv, &i_plus, 0);
if(ret <= 0)
goto problem_handler_boot;
}
continue; /* regular bottom of loop */
problem_handler_boot:;

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -917,16 +917,39 @@ int Findjob_set_size_filter(struct FindjoB *o, int test_type,
}
int Findjob_set_lba_range(struct FindjoB *o, int start_lba, int count,
int Findjob_set_off_t_filter(struct FindjoB *o, int test_type,
off_t num1, off_t num2, int flag)
{
struct ExprtesT *t;
int ret;
ret= Findjob_default_and(o, 0);
if(ret <= 0)
return(ret);
t= o->cursor->test;
t->test_type= test_type;
t->arg1= calloc(sizeof(off_t), 1);
t->arg2= calloc(sizeof(off_t), 1);
if(t->arg1 == NULL || t->arg2 == NULL)
return(-1);
*((off_t *) t->arg1)= num1;
*((off_t *) t->arg2)= num2;
return(1);
}
int Findjob_set_lba_range(struct FindjoB *o, off_t start_lba, off_t count,
int flag)
{
int ret, end_lba;
int ret;
off_t end_lba;
if(start_lba > 0)
end_lba= start_lba + count - 1;
else
end_lba= start_lba - count + 1;
ret= Findjob_set_num_filter(o, 4, start_lba, end_lba, 0);
ret= Findjob_set_off_t_filter(o, 4, start_lba, end_lba, 0);
return(ret);
}

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -32,7 +32,7 @@ struct ExprtesT {
1= -name char *arg1 (regex_t in *arg2)
2= -type char *arg1
3= -damaged
4= -lba_range int *arg1 int *arg2
4= -lba_range off_t *arg1 off_t *arg2
5= -has_acl
6= -has_xattr
7= -has_aaip
@ -250,7 +250,10 @@ int Findjob_set_num_filter(struct FindjoB *o, int test_type,
int Findjob_set_size_filter(struct FindjoB *o, int test_type,
off_t num1, int num2, int flag);
int Findjob_set_lba_range(struct FindjoB *o, int start_lba, int count,
int Findjob_set_off_t_filter(struct FindjoB *o, int test_type,
off_t num1, off_t num2, int flag);
int Findjob_set_lba_range(struct FindjoB *o, off_t start_lba, off_t count,
int flag);
int Findjob_set_wanted_node(struct FindjoB *o, void *wanted_node, int flag);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -149,16 +149,18 @@ int Xorriso_record_boot_info(struct XorrisO *xorriso, int flag)
if(bootimg_node != NULL)
Xorriso__file_start_lba((IsoNode *) bootimg_node,
&(xorriso->loaded_boot_bin_lba), 0);
if(bootcat_node != NULL)
Xorriso_path_from_lba(xorriso, (IsoNode *) bootcat_node, 0,
Xorriso_path_from_lba(xorriso, (IsoNode *) bootcat_node, (off_t) 0,
xorriso->loaded_boot_cat_path, 0);
return(1);
}
int Xorriso_assert_volid(struct XorrisO *xorriso, int msc1, int flag)
int Xorriso_assert_volid(struct XorrisO *xorriso, off_t msc1, int flag)
{
int ret, image_blocks;
int ret;
off_t image_blocks;
char volid[33];
struct burn_drive_info *dinfo;
struct burn_drive *drive;
@ -169,11 +171,12 @@ int Xorriso_assert_volid(struct XorrisO *xorriso, int msc1, int flag)
"on attempt to perform -assert_volid", 0);
if(ret<=0)
return(0);
ret= isoburn_read_iso_head(drive, msc1, &image_blocks, volid, 1);
ret= isoburn_read_iso_head_v2(drive, msc1, &image_blocks, volid, 1);
Xorriso_process_msg_queues(xorriso,0);
if(ret <= 0) {
sprintf(xorriso->info_text,
"-assert_volid: Cannot determine Volume Id at LBA %d.", msc1);
"-assert_volid: Cannot determine Volume Id at LBA %.f.",
(double) msc1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0,
xorriso->assert_volid_sev, 0);
return(0);
@ -266,7 +269,8 @@ static int Xorriso_report_pvd_time(struct XorrisO *xorriso, char *head,
int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
{
int ret, msc1= -1, msc2, i;
int ret;
off_t msc1= -1, msc2, i;
IsoImage *image;
struct burn_drive_info *dinfo;
struct burn_drive *drive;
@ -285,7 +289,7 @@ int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
Xorriso_toc(xorriso, 128);
if(msc1 >= 0) {
for(i = msc1 + 16; i < msc1 + 32; i++) {
ret= burn_read_data(drive, (off_t) i * (off_t) 2048, block_head,
ret= burn_read_data(drive, i * (off_t) 2048, block_head,
(off_t) sizeof(block_head), &head_count, 2);
if(ret <= 0) {
i= msc1 + 32;
@ -295,7 +299,7 @@ int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
break;
}
if(i < msc1 + 32) {
sprintf(msg, "PVD address : %ds\n", i);
sprintf(msg, "PVD address : %.fs\n", (double) i);
Xorriso_result(xorriso,0);
}
}
@ -930,8 +934,8 @@ no_boot:;
} else if(xorriso->loaded_boot_bin_lba <= 0) {
sprintf(respt, "Boot image : -not-found-at-load-time-");
} else {
sprintf(respt, "Boot image : -not-found-any-more-by-lba=%d",
xorriso->loaded_boot_bin_lba);
sprintf(respt, "Boot image : -not-found-any-more-by-lba=%.f",
(double) xorriso->loaded_boot_bin_lba);
}
Xorriso__append_boot_params(respt, bootimg, 0);
strcat(respt, "\n");
@ -995,12 +999,32 @@ int Xorriso_get_volume(struct XorrisO *xorriso, IsoImage **volume,
/* @param flag bit0= do not return 1 on volset_change_pending != 1
bit1= issue NOTE if return is 0,
indev and outdev point to different drives,
and no write run or size run has happened
*/
int Xorriso_change_is_pending(struct XorrisO *xorriso, int flag)
{
int ret;
if(flag & 1)
return(xorriso->volset_change_pending == 1);
return(!!xorriso->volset_change_pending);
ret= (xorriso->volset_change_pending == 1);
else
ret= !!xorriso->volset_change_pending;
if((flag & 2) && xorriso->volset_change_pending == 0 &&
xorriso->commit_attempts <= 0 &&
xorriso->print_size_attempts <= 0 &&
xorriso->write_session_counter <= 0 &&
xorriso->print_size_counter <= 0) {
if(xorriso->indev[0] != 0 && xorriso->outdev[0] != 0 &&
strcmp(xorriso->indev, xorriso->outdev) != 0) {
Xorriso_msgs_submit(xorriso, 0,
"-indev and -outdev differ. But no pending image modifications.",
0, "NOTE", 0);
}
}
return(ret);
}
@ -1031,8 +1055,9 @@ int Xorriso_set_change_pending(struct XorrisO *xorriso, int flag)
int Xorriso_mount(struct XorrisO *xorriso, char *dev, int adr_mode,
char *adr_value, char *cmd, int flag)
{
int ret, lba, track, session, params_flag= 0, is_safe= 0, is_extra_drive= 0;
int ret, track, session, params_flag= 0, is_safe= 0, is_extra_drive= 0;
int give_up= 0, mount_chardev= 0, status, aquire_flag= 0;
off_t lba;
char volid[33], *devadr, *mount_command= NULL, *adr_data= NULL, *adr_pt;
char *dev_path, *libburn_adr= NULL;
char *dpt, *sysname= "";
@ -1139,8 +1164,8 @@ int Xorriso_mount(struct XorrisO *xorriso, char *dev, int adr_mode,
adr_pt= adr_data;
}
}
ret= isoburn_get_mount_params(drive, adr_mode, adr_pt, &lba, &track,
&session, volid, params_flag);
ret= isoburn_get_mount_params_v2(drive, adr_mode, adr_pt, &lba, &track,
&session, volid, params_flag);
Xorriso_process_msg_queues(xorriso,0);
if(ret <= 0)
goto ex;
@ -1658,6 +1683,97 @@ ex:;
}
/* Note: These macros use local variables of Xorriso_scan_report_lines() and
Xorriso_make_boot_cut_out().
*/
#define Xorriso_record_cmd_linE { \
ret= Xorriso_record_cmd_line(xorriso, buf, cmds, cmd_count, flag & 1); \
buf[0]= 0; \
if(ret <= 0) \
goto ex; \
}
#define Xorriso_record_boot_imglinE { \
ret= Xorriso_record_cmd_line(xorriso, buf, boot_imgs, boot_img_count, \
flag & 1); \
buf[0]= 0; \
if(ret <= 0) \
goto ex; \
}
/* @param flag bit0= do not record but only count
bit1= as_mkisofs
bit2= no sorry messages
*/
int Xorriso_make_boot_cut_out(struct XorrisO *xorriso,
unsigned long lba, unsigned long blocks,
char **cmds, int *cmd_count,
char *buf, int buf_size, char **path,
int flag)
{
int ret= 0, i;
char uuid_path[37 + 13];
IsoNode *node;
/* Choose a path "hidden_boot_$UUID" which must not exist yet */
for(i = 0; i < 10; i++) {
strcpy(uuid_path, "/hidden_boot_");
ret = Xorriso_make_guid(xorriso, uuid_path + 13, 1);
if(ret <= 0)
goto ex;
ret= Xorriso_get_node_by_path(xorriso, uuid_path, NULL, &node, 1);
if(ret <= 0)
break;
/* wait a short time just in case that Xorriso_make_guid() relies on time */
usleep(12345);
}
if(i >= 10) {
if(!(flag & 5)) {
sprintf(xorriso->info_text,
"Composition of -cut_out command failed because no unused file path can be found");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
}
ret= 0; goto ex;
}
/* Issue command or option for cutting out from indev */
strcpy(buf, "-cut_out ");
if(strlen(buf) + strlen(xorriso->indev) * 5 + 1 >
(unsigned long) buf_size) {
buffer_overflow:
if(!(flag & 5)) {
sprintf(xorriso->info_text,
"Composition of -cut_out command failed because it becomes too long");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
}
ret= 0; goto ex;
}
Text_shellsafe(xorriso->indev, buf, 1);
if(strlen(buf) + 1 + 11 + 1 + 11 + 1 + strlen(uuid_path) + 1 >
(unsigned long) buf_size)
goto buffer_overflow;
sprintf(buf + strlen(buf), " %lus %lus %s", lba, blocks, uuid_path);
Xorriso_record_cmd_linE
/* Issue command or option for hiding cut out file */
if(flag & 2) {
sprintf(buf, "-hide_iso_path on %s", uuid_path);
Xorriso_record_cmd_linE
} else {
sprintf(buf, "-hide on %s --", uuid_path);
Xorriso_record_cmd_linE
}
*path= strdup(uuid_path);
if(*path == NULL)
{ret= -1; goto ex;}
ret= 1;
ex:;
return(ret);
}
/* @param flag bit0= do not record but only count
bit1= as_mkisofs
bit2= no sorry messages
@ -1681,19 +1797,21 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
int appended_partition= 0;
#endif
int iso_mbr_part_type= -1, iso_gpt_part_idx= -1;
int iso_mbr_part_type= -1, iso_gpt_part_idx= -1, buf_size;
unsigned int prev_pltf= 0;
unsigned long int sa_options= 0, partno, id_tag, perms, start_cyl;
unsigned long int part_status, part_type, mbr_start_block, mbr_num_blocks;
unsigned long int partition_offset= 0;
uint32_t high_block= 0, indev_blocks;
uint32_t high_block= 0;
off_t indev_blocks;
char name[24], *textpt, *contentpt, *buf= NULL, part_type_text[37];
char **lines= NULL;
double num[8];
char *cat_path= "";
struct elto_img_par *et_imgs= NULL;
int elto_count= 0;
uint32_t mbr_parts_end= 0, extract_size;
uint32_t mbr_parts_end= 0;
off_t extract_size;
struct FindjoB *job= NULL;
struct stat dir_stbuf;
IsoImage *image;
@ -1738,20 +1856,6 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
struct apm_par *apms= NULL;
int apm_count= 0;
#define Xorriso_record_cmd_linE { \
ret= Xorriso_record_cmd_line(xorriso, buf, cmds, cmd_count, flag & 1); \
buf[0]= 0; \
if(ret <= 0) \
goto ex; \
}
#define Xorriso_record_boot_imglinE { \
ret= Xorriso_record_cmd_line(xorriso, buf, boot_imgs, boot_img_count, \
flag & 1); \
buf[0]= 0; \
if(ret <= 0) \
goto ex; \
}
/* 2 exp 19 blocks = 1 GiB */
#define Xorriso_max_endless_uefi_sizE (1 << 19)
@ -1764,7 +1868,8 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
if(line_count <= 0)
{ret= 1; goto ex;}
Xorriso_alloc_meM(buf, char, 80 + SfileadrL);
buf_size= 80 + 5 * SfileadrL;
Xorriso_alloc_meM(buf, char, buf_size);
Xorriso_alloc_meM(lines, char *, line_count);
for(i= 0; i < et_line_count; i++)
lines[i]= et_lines[i];
@ -1946,8 +2051,17 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
et_imgs[idx].path= textpt;
ret= Xorriso_iso_lstat(xorriso, et_imgs[idx].path, &dir_stbuf, 0);
if(ret == 0) {
extract_size = (dir_stbuf.st_size + 2047) / 2048;
if(extract_size > et_imgs[idx].extract_size)
extract_size = (dir_stbuf.st_size + (off_t) 2047) / (off_t) 2048;
if(extract_size > (off_t) 0xffffffff) {
if(!(flag & 5)) {
sprintf(xorriso->info_text,
"Boot image size exceeds limit of 32-bit block count: ");
Text_shellsafe(et_imgs[idx].path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
}
continue;
}
if(extract_size > (off_t) et_imgs[idx].extract_size)
et_imgs[idx].extract_size= extract_size;
}
@ -2747,7 +2861,7 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
et_imgs[idx].extract_size <= 0) {
ret= Xorriso_obtain_indev_readsize(xorriso, &indev_blocks, 0);
if(ret > 0) {
if(indev_blocks > et_imgs[idx].lba &&
if(indev_blocks > (off_t) et_imgs[idx].lba &&
indev_blocks - et_imgs[idx].lba <= Xorriso_max_endless_uefi_sizE)
et_imgs[idx].extract_size= indev_blocks - et_imgs[idx].lba;
}
@ -2833,9 +2947,22 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
}
}
if (et_imgs[idx].path[0] == 0) {
/* >>> need way to exploit .extract_size by cutting out from ISO */;
if (et_imgs[idx].path[0] == 0 && et_imgs[idx].extract_size > 0) {
ret= Xorriso_make_boot_cut_out(xorriso, et_imgs[idx].lba,
et_imgs[idx].extract_size,
cmds, cmd_count,
buf, buf_size, &(et_imgs[idx].path),
flag & 7);
if(ret <= 0) {
if(!(flag & 5)) {
sprintf(xorriso->info_text,
"Cannot enable hidden EL Torito boot image #%d by a -cut_out command",
idx + 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
}
buf[0]= 0;
continue;
}
}

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2015 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -18,7 +18,7 @@ int Xorriso_update_volid(struct XorrisO *xorriso, int flag);
int Xorriso_record_boot_info(struct XorrisO *xorriso, int flag);
int Xorriso_assert_volid(struct XorrisO *xorriso, int msc1, int flag);
int Xorriso_assert_volid(struct XorrisO *xorriso, off_t msc1, int flag);
int Xorriso_is_isohybrid(struct XorrisO *xorriso, IsoFile *bootimg_node,
int flag);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -2546,7 +2546,7 @@ int Xorriso_cannot_create_iter(struct XorrisO *xorriso, int iso_error,int flag)
/* The caller shall make no assumptions about the meaning of iter, node_array,
node_count, node_idx ! They are just opaque handles for which the caller
node_count, node_idx ! They are just opaque handles for which this function
provides the memory of proper type.
@param flag bit0= initialize iteration
bit1= action needs full freedom of object manipulation
@ -3055,8 +3055,9 @@ return:
3 = immediate decision : does match
*/
{
int value=0, ret, start_lba, end_lba, bless_idx, size_mode;
int lba_count, *file_end_lbas= NULL, *file_start_lbas= NULL, i, mask;
int value=0, ret, bless_idx, size_mode, lba_count, i, mask;
off_t range_lba, end_lba, *file_end_lbas= NULL, *file_start_lbas= NULL;
off_t start_lba;
void *arg1, *arg2;
char ft, *decision, md5[16], bless_code[17];
regmatch_t name_match;
@ -3146,10 +3147,10 @@ return:
break; case 4: /* -lba_range *arg1 *arg2 */
value= 1;
start_lba= *((int *) ftest->arg1);
end_lba= *((int *) ftest->arg2);
range_lba= *((off_t *) ftest->arg1);
end_lba= *((off_t *) ftest->arg2);
if(node == NULL) {
value= !(start_lba >= 0);
value= !(range_lba >= 0);
goto ex;
}
ret= Xorriso__start_end_lbas(node, &lba_count, &file_start_lbas,
@ -3157,15 +3158,15 @@ return:
if(ret <= 0) {
if(ret < 0)
Xorriso_process_msg_queues(xorriso, 0);
if(start_lba >= 0)
if(range_lba >= 0)
value= 0;
} else {
for(i= 0; i < lba_count; i++) {
if(start_lba >= 0) {
if(file_end_lbas[i] < start_lba || file_start_lbas[i] > end_lba)
if(range_lba >= 0) {
if(file_end_lbas[i] < range_lba || file_start_lbas[i] > end_lba)
value= 0;
} else {
if(file_end_lbas[i] >= -start_lba && file_start_lbas[i] <= -end_lba)
if(file_end_lbas[i] >= -range_lba && file_start_lbas[i] <= -end_lba)
value= 0;
}
}

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2010 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -65,8 +65,6 @@ int Xorriso_findi_sorted(struct XorrisO *xorriso, struct FindjoB *job,
int Xorriso_all_node_array(struct XorrisO *xorriso, int addon_nodes, int flag);
int Xorriso__file_start_lba(IsoNode *node, int *lba, int flag);
int Xorriso__mark_update_xinfo(void *data, int flag);
int Xorriso__mark_update_cloner(void *old_data, void **new_data, int flag);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -196,6 +196,8 @@ ex:;
}
/* @param flag bit0=do not complain about non existent node
*/
int Xorriso_get_node_by_path(struct XorrisO *xorriso,
char *in_path, char *eff_path,
IsoNode **node, int flag)
@ -206,7 +208,8 @@ int Xorriso_get_node_by_path(struct XorrisO *xorriso,
Xorriso_alloc_meM(path, char, SfileadrL);
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, in_path, path, 0);
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, in_path, path,
flag & 1);
if(ret<=0)
goto ex;
if(eff_path!=NULL)
@ -214,7 +217,7 @@ int Xorriso_get_node_by_path(struct XorrisO *xorriso,
ret= Xorriso_get_volume(xorriso, &volume, 0);
if(ret<=0)
goto ex;
ret= Xorriso_node_from_path(xorriso, volume, path, node, 0);
ret= Xorriso_node_from_path(xorriso, volume, path, node, flag & 1);
if(ret<=0)
{ret= 0; goto ex;}
ret= 1;
@ -456,7 +459,7 @@ ex:;
*/
/* @param flag bit0= use lba rather than node pointer
*/
int Xorriso_path_from_lba(struct XorrisO *xorriso, IsoNode *node, int lba,
int Xorriso_path_from_lba(struct XorrisO *xorriso, IsoNode *node, off_t lba,
char path[SfileadrL], int flag)
{
int ret;
@ -474,7 +477,7 @@ int Xorriso_path_from_lba(struct XorrisO *xorriso, IsoNode *node, int lba,
return(ret);
}
if(flag & 1)
Findjob_set_lba_range(job, lba, 1, 0);
Findjob_set_lba_range(job, lba, (off_t) 1, 0);
else
Findjob_set_wanted_node(job, (void *) node, 0);
Findjob_set_action_found_path(job, 0);
@ -1306,7 +1309,8 @@ ex:
int Xorriso_stream_type(struct XorrisO *xorriso, IsoNode *node,
IsoStream *stream, char type_text[], int flag)
{
int ret, lba, stream_type, block_size_log2;
int ret, stream_type, block_size_log2;
off_t lba;
uint8_t zisofs_algo[2], algo_num;
char text[5];
@ -2229,8 +2233,8 @@ int Xorriso__get_file_size(IsoNode *node, off_t *size, int flag)
}
int Xorriso__start_end_lbas(IsoNode *node,
int *lba_count, int **start_lbas, int **end_lbas,
int Xorriso__start_end_lbas(IsoNode *node, int *lba_count,
off_t **start_lbas, off_t **end_lbas,
off_t **section_sizes, off_t *size, int flag)
{
int section_count= 0, ret, i;
@ -2249,8 +2253,8 @@ int Xorriso__start_end_lbas(IsoNode *node,
{ret= -1; goto ex;}
if(ret != 1 || section_count <= 0)
{ret= 0; goto ex;}
*start_lbas= calloc(section_count, sizeof(int));
*end_lbas= calloc(section_count, sizeof(int));
*start_lbas= calloc(section_count, sizeof(off_t));
*end_lbas= calloc(section_count, sizeof(off_t));
*section_sizes= calloc(section_count, sizeof(off_t));
if(*start_lbas == NULL || *end_lbas == NULL || *section_sizes == NULL)
{ret= -1; goto ex;}
@ -2278,11 +2282,10 @@ ex:;
}
int Xorriso__file_start_lba(IsoNode *node,
int *lba, int flag)
int Xorriso__file_start_lba(IsoNode *node, off_t *lba, int flag)
{
int *start_lbas= NULL, *end_lbas= NULL, lba_count= 0, i, ret;
off_t size, *section_sizes= NULL;
int lba_count= 0, i, ret;
off_t size, *section_sizes= NULL, *start_lbas= NULL, *end_lbas= NULL;
*lba= -1;
ret= Xorriso__start_end_lbas(node, &lba_count, &start_lbas, &end_lbas,
@ -2500,8 +2503,8 @@ int Xorriso_file_eval_damage(struct XorrisO *xorriso, IsoNode *node,
off_t *damage_start, off_t *damage_end,
int flag)
{
int *start_lbas= NULL, *end_lbas= NULL, lba_count= 0, sect;
int i, sectors, sector_size, ret;
int lba_count= 0, sect, ret;
off_t i, sectors, sector_size, *start_lbas= NULL, *end_lbas= NULL;
off_t sect_base= 0, size= 0, byte, *section_sizes= NULL;
struct SectorbitmaP *map;
@ -2528,8 +2531,7 @@ int Xorriso_file_eval_damage(struct XorrisO *xorriso, IsoNode *node,
*damage_end= byte + (off_t) 2048;
}
}
sect_base+= ((off_t) 2048) *
((off_t) (end_lbas[sect] - start_lbas[sect] + 1));
sect_base+= ((off_t) 2048) * (end_lbas[sect] - start_lbas[sect] + 1);
}
if(*damage_end > size)
*damage_end= size;
@ -2551,8 +2553,8 @@ int Xorriso_file_eval_damage(struct XorrisO *xorriso, IsoNode *node,
int Xorriso_report_lba(struct XorrisO *xorriso, char *show_path,
IsoNode *node, uint32_t *last_block, int flag)
{
int ret, *start_lbas= NULL, *end_lbas= NULL, lba_count, i;
off_t size, *section_sizes= NULL;
int ret, lba_count, i;
off_t size, *section_sizes= NULL, *start_lbas= NULL, *end_lbas= NULL;
ret= Xorriso__start_end_lbas(node, &lba_count, &start_lbas, &end_lbas,
&section_sizes, &size, 0);
@ -2566,12 +2568,13 @@ int Xorriso_report_lba(struct XorrisO *xorriso, char *show_path,
if(flag & 1)
size= section_sizes[i];
if(flag & 2) {
if(end_lbas[i] > 0 && (uint32_t) end_lbas[i] > *last_block)
if(end_lbas[i] > 0 && end_lbas[i] > (off_t) *last_block)
*last_block= end_lbas[i];
} else {
sprintf(xorriso->result_line,
"File data lba: %2d , %8d , %8d , %8.f , ",
i, start_lbas[i], end_lbas[i] + 1 - start_lbas[i], (double) size);
"File data lba: %2d , %8.f , %8.f , %8.f , ",
i, (double) start_lbas[i],
(double) (end_lbas[i] + 1 - start_lbas[i]), (double) size);
Text_shellsafe(show_path, xorriso->result_line, 1);
strcat(xorriso->result_line, "\n");
Xorriso_result(xorriso, 0);
@ -2771,7 +2774,8 @@ int Xorriso_getfname(struct XorrisO *xorriso, char *path, int flag)
int Xorriso_is_plain_image_file(struct XorrisO *xorriso, void *in_node,
char *path, int flag)
{
int ret, lba;
int ret;
off_t lba;
IsoStream *stream;
IsoNode *node;

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -49,7 +49,7 @@ int Xorriso_node_is_valid(struct XorrisO *xorriso, IsoNode *in_node, int flag);
int Xorriso_path_from_node(struct XorrisO *xorriso, IsoNode *in_node,
char path[SfileadrL], int flag);
int Xorriso_path_from_lba(struct XorrisO *xorriso, IsoNode *node, int lba,
int Xorriso_path_from_lba(struct XorrisO *xorriso, IsoNode *node, off_t lba,
char path[SfileadrL], int flag);
int Xorriso_get_attr_value(struct XorrisO *xorriso, void *in_node, char *path,
@ -73,12 +73,11 @@ int Xorriso_obtain_pattern_files_i(
int Xorriso__get_file_size(IsoNode *node, off_t *size, int flag);
int Xorriso__start_end_lbas(IsoNode *node,
int *lba_count, int **start_lbas, int **end_lbas,
int Xorriso__start_end_lbas(IsoNode *node, int *lba_count,
off_t **start_lbas, off_t **end_lbas,
off_t **section_sizes, off_t *size, int flag);
int Xorriso__file_start_lba(IsoNode *node,
int *lba, int flag);
int Xorriso__file_start_lba(IsoNode *node, off_t *lba, int flag);
int Xorriso_file_eval_damage(struct XorrisO *xorriso, IsoNode *node,
off_t *damage_start, off_t *damage_end,

View File

@ -1007,24 +1007,25 @@ int Xorriso_set_data_cache(struct XorrisO *xorriso, void *o,
}
/* @param flag bit0= issue hex string rather than structured text format
*/
int Xorriso_format_guid(struct XorrisO *xorriso, uint8_t guid[16], char *line,
int flag)
{
/* >>> Maybe let the user switch between hex string and structured text */;
Xorriso__format_guid(guid, line, 1);
Xorriso__format_guid(guid, line, !(flag & 1));
return(1);
}
/* @param flag bit0= issue hex string rather than structured text format
*/
int Xorriso_make_guid(struct XorrisO *xorriso, char *line, int flag)
{
uint8_t guid[16];
int ret;
iso_generate_gpt_guid(guid);
ret= Xorriso_format_guid(xorriso, guid, line, 0);
ret= Xorriso_format_guid(xorriso, guid, line, flag & 1);
return(ret);
}

View File

@ -50,7 +50,7 @@ create_gnu_xorriso="yes"
current_dir=$(pwd)
lone_dir="$current_dir"/"xorriso-standalone"
xorriso_rev=1.5.6
xorriso_rev=1.5.7
# For unstable uploads and patch level 0 of stable releases:
xorriso_pl=""
# For higher patch levels of stable releases:

View File

@ -679,7 +679,7 @@ completed:;
3= Mon Day hh:mm:ss Year
4= YYMMDD.hhmmss
*/
char *Ftimetxt(time_t t, char timetext[40], int flag)
char *Ftimetxt(time_t t, char *timetext, int flag)
{
char *rpt;
struct tm tms, *tmpt;

View File

@ -34,7 +34,7 @@ char *Ftypetxt(mode_t st_mode, int flag);
/* @param flag bit0=with year and seconds
bit1=timestamp format YYYY.MM.DD.hhmmss
*/
char *Ftimetxt(time_t t, char timetext[40], int flag);
char *Ftimetxt(time_t t, char *timetext, int flag);
int System_uname(char **sysname, char **release, char **version,
char **machine, int flag);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -295,65 +295,120 @@ ex:;
int Xorriso_option_append_partition(struct XorrisO *xorriso, char *partno_text,
char *type_text, char *image_path, int flag)
{
int partno = 0, type_code= -1, i, guid_valid= 0, ret;
int partno = 0, type_code= -1, i, guid_valid= 0, ret, set_changed= 0;
int disable= 0;
unsigned int unum;
char *tpt;
uint8_t guid[16];
static char *part_type_names[] = {"FAT12", "FAT16", "Linux", "", NULL};
static int part_type_codes[] = { 0x01, 0x06, 0x83, 0x00};
sscanf(partno_text, "%d", &partno);
if(partno < 1 || partno > Xorriso_max_appended_partitionS) {
sprintf(xorriso->info_text,
"-append_partition: Partition number '%s' is out of range (1...%d)",
partno_text, Xorriso_max_appended_partitionS);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
for(i= 0; part_type_names[i] != NULL; i++)
if(strcmp(part_type_names[i], type_text) == 0)
break;
if(part_type_names[i] != NULL)
type_code= part_type_codes[i];
if(type_code < 0) {
ret= Xorriso_parse_type_guid(xorriso, type_text, guid, &type_code, 0);
if(ret > 0)
guid_valid= 1;
}
if(type_code < 0) {
tpt= type_text;
if(strncmp(tpt, "0x", 2) == 0)
tpt+= 2;
else
goto bad_type;
unum= 0xffffffff;
sscanf(tpt, "%X", &unum);
if(unum > 0xff) {
bad_type:;
if(strcmp(partno_text, "all") == 0) {
if(strcmp(type_text, "revoke") != 0 && image_path[0] != 0) {
sprintf(xorriso->info_text,
"-append_partition: Partition type '%s' is out of range (0x00...0xff or GUID)",
type_text);
"-append_partition: Pseudo partition number 'all' works only with type code 'revoke' or empty disk path");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
partno= -1;
} else {
sscanf(partno_text, "%d", &partno);
if(partno < 1 || partno > Xorriso_max_appended_partitionS) {
sprintf(xorriso->info_text,
"-append_partition: Partition number '%s' is out of range (1...%d)",
partno_text, Xorriso_max_appended_partitionS);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
type_code= unum;
}
if(xorriso->appended_partitions[partno - 1] != NULL)
if(strcmp(type_text, "revoke") == 0) {
disable= 1;
} else {
for(i= 0; part_type_names[i] != NULL; i++)
if(strcmp(part_type_names[i], type_text) == 0)
break;
if(part_type_names[i] != NULL)
type_code= part_type_codes[i];
if(type_code < 0) {
ret= Xorriso_parse_type_guid(xorriso, type_text, guid, &type_code, 0);
if(ret > 0)
guid_valid= 1;
}
if(type_code < 0) {
tpt= type_text;
if(strncmp(tpt, "0x", 2) == 0)
tpt+= 2;
else
goto bad_type;
unum= 0xffffffff;
sscanf(tpt, "%X", &unum);
if(unum > 0xff) {
bad_type:;
sprintf(xorriso->info_text,
"-append_partition: Partition type '%s' is out of range (0x00...0xff or GUID)",
type_text);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
type_code= unum;
}
disable= (image_path[0] == 0);
}
if(partno == -1) {
/* All partitions */
set_changed= 0;
for(i= 0; i < Xorriso_max_appended_partitionS; i++) {
/* For now only pseudo-type 'revoke' works for all partitions */
if(xorriso->appended_partitions[i - 1] != NULL) {
if(xorriso->appended_partitions[i - 1][0] != 0)
set_changed= 1;
free(xorriso->appended_partitions[i - 1]);
xorriso->appended_partitions[i - 1]= NULL;
}
}
goto work_done;
}
set_changed= 1;
if(xorriso->appended_partitions[partno - 1] != NULL) {
if(strcmp(xorriso->appended_partitions[partno - 1], image_path) == 0)
set_changed= 0;
free(xorriso->appended_partitions[partno - 1]);
xorriso->appended_partitions[partno - 1]= NULL;
} else {
if(disable)
set_changed= 0;
}
if(disable)
goto work_done;
xorriso->appended_partitions[partno - 1]= strdup(image_path);
if(xorriso->appended_partitions[partno - 1] == NULL) {
Xorriso_no_malloc_memory(xorriso, NULL, 0);
return(-1);
}
if(xorriso->appended_part_types[partno - 1] != type_code)
set_changed= 1;
xorriso->appended_part_types[partno - 1]= type_code;
if(guid_valid) {
if(xorriso->appended_part_gpt_flags[partno - 1] & 1) {
if(memcmp(xorriso->appended_part_type_guids[partno - 1], guid, 16) != 0)
set_changed= 1;
} else {
set_changed= 1;
}
memcpy(xorriso->appended_part_type_guids[partno - 1], guid, 16);
xorriso->appended_part_gpt_flags[partno - 1]|= 1;
} else {
if(xorriso->appended_part_gpt_flags[partno - 1] & 1)
set_changed= 1;
xorriso->appended_part_gpt_flags[partno - 1]&= ~1;
}
work_done:;
if(set_changed)
Xorriso_set_change_pending(xorriso, 1);
return(1);
}
@ -715,7 +770,7 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
char *treatment, int flag)
{
int was_ok= 1, ret, isolinux_grub= 0, count, bin_count, parm_len;
int palohdrversion, type_code;
int palohdrversion, type_code, is_change= 0;
unsigned int u;
char *formpt, *treatpt, *eff_path= NULL, *eqpt, parm[20];
uint8_t sn[8];
@ -745,6 +800,7 @@ cannot_keep_or_patch:;
xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 0;
xorriso->boot_image_bin_path[0]= 0;
xorriso->patch_system_area= 0;
is_change= 1;
} else if(strcmp(treatpt, "patch")==0) {
treatment_patch:;
@ -760,6 +816,7 @@ treatment_patch:;
xorriso->patch_system_area= 2;
else
xorriso->patch_system_area= 0;
is_change= 1;
} else if(strcmp(treatpt, "replay")==0) {
ret= Xorriso_report_system_area(xorriso, "cmd", 2);
@ -778,6 +835,7 @@ treatment_patch:;
if(ret <= 0)
goto ex;
}
is_change= 1;
} else if(strcmp(treatpt, "next") == 0) {
ret= Xorriso_attach_boot_image(xorriso, 0);
@ -799,23 +857,28 @@ treatment_patch:;
sprintf(xorriso->result_line, "------------------------------------\n");
Xorriso_result(xorriso, 0);
Xorriso_status(xorriso, "-boot_image", NULL, 0);
Xorriso_status(xorriso, "-append_partition", NULL, 0);
sprintf(xorriso->result_line, "------------------------------------\n");
Xorriso_result(xorriso, 0);
} else if(strcmp(treatpt, "cat_path=") == 0) {
xorriso->boot_image_cat_path[0] = 0;
is_change= 1;
} else if(strncmp(treatpt, "cat_path=", 9) == 0) {
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9,
xorriso->boot_image_cat_path, 2);
if(ret <= 0)
goto ex;
is_change= 1;
} else if(strncmp(treatpt, "cat_hidden=", 11) == 0) {
ret= Xorriso__hide_mode(treatpt + 11, 0);
if(ret >= 0)
if(ret >= 0) {
is_change= 1;
xorriso->boot_image_cat_hidden= ret;
else
} else {
was_ok= 0;
}
} else if(strncmp(treatpt, "dir=", 4) == 0) {
if(strcmp(formpt, "isolinux")==0) {
@ -849,6 +912,7 @@ treatment_patch:;
xorriso->keep_boot_image= 0;
xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 1;
strcpy(xorriso->boot_image_bin_form, formpt);
is_change= 1;
{ret= 1; goto ex;}
} else if(strcmp(formpt, "grub") == 0) {
@ -857,6 +921,7 @@ treatment_patch:;
was_ok= 0;
strcpy(xorriso->boot_image_bin_form, formpt);
is_change= 1;
} else
was_ok= 0;
@ -864,6 +929,7 @@ treatment_patch:;
} else if(strcmp(treatpt, "bin_path=") == 0) {
xorriso->boot_image_bin_path[0] = 0;
xorriso->boot_efi_default= 0;
is_change= 1;
} else if(strncmp(treatpt, "bin_path=", 9) == 0) {
if(strncmp(treatpt + 9, "--interval:appended_partition_", 30) == 0) {
if(strlen(treatpt + 9) >= sizeof(xorriso->boot_image_bin_path)) {
@ -892,10 +958,12 @@ interval_text_long:;
} else
strcpy(xorriso->boot_image_bin_form, "any");
xorriso->boot_efi_default= 0;
is_change= 1;
} else if(strcmp(treatpt, "efi_path=") == 0) {
xorriso->boot_image_bin_path[0] = 0;
xorriso->boot_efi_default= 0;
is_change= 1;
} else if(strncmp(treatpt, "efi_path=", 9) == 0) {
if(strncmp(treatpt + 9, "--interval:appended_partition_", 30) == 0) {
if(strlen(treatpt + 9) >= sizeof(xorriso->boot_image_bin_path))
@ -909,6 +977,7 @@ interval_text_long:;
}
xorriso->keep_boot_image= 0;
xorriso->boot_efi_default= 1;
is_change= 1;
} else if(strncmp(treatpt, "mips_path=", 10) == 0) {
sprintf(eff_path, "-boot_image %s mips_path=", formpt);
@ -922,6 +991,7 @@ interval_text_long:;
ret= Xorriso_add_mips_boot_file(xorriso, eff_path, 0);
if(ret <= 0)
goto ex;
is_change= 1;
} else if(strncmp(treatpt, "mipsel_path=", 12) == 0) {
sprintf(eff_path, "-boot_image %s mipsel_path=", formpt);
@ -935,6 +1005,7 @@ interval_text_long:;
ret= Xorriso_add_mips_boot_file(xorriso, eff_path, 2);
if(ret <= 0)
goto ex;
is_change= 1;
} else if(strcmp(treatpt, "mips_discard") == 0 ||
strcmp(treatpt, "mipsel_discard") == 0 ||
@ -945,6 +1016,7 @@ interval_text_long:;
Xorriso_add_mips_boot_file(xorriso, "", 1); /* give up MIPS boot files */
Xorriso_set_hppa_boot_parm(xorriso, "", "", 1); /* give up HP-PA files */
Xorriso_set_alpha_boot(xorriso, "", 1); /* give up DEC Alpha loader */
is_change= 1;
} else if(strncmp(treatpt, "sparc_label=", 12) == 0) {
sprintf(eff_path, "-boot_image %s sparc_label=", formpt);
@ -954,12 +1026,14 @@ interval_text_long:;
strncpy(xorriso->ascii_disc_label, treatpt + 12,
Xorriso_disc_label_sizE - 1);
xorriso->ascii_disc_label[Xorriso_disc_label_sizE - 1] = 0;
is_change= 1;
} else if(strncmp(treatpt, "grub2_sparc_core=", 17) == 0) {
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 17,
xorriso->grub2_sparc_core, 2);
if(ret <= 0)
goto ex;
is_change= 1;
} else if(strncmp(treatpt, "hppa_", 5) == 0) {
sprintf(eff_path, "-boot_image %s %s", formpt, treatpt);
@ -985,6 +1059,7 @@ interval_text_long:;
ret= Xorriso_set_hppa_boot_parm(xorriso, eqpt + 1, parm, 0);
if(ret <= 0)
goto ex;
is_change= 1;
} else if(strncmp(treatpt, "alpha_boot=", 11) == 0) {
sprintf(eff_path, "-boot_image %s %s", formpt, treatpt);
@ -994,6 +1069,7 @@ interval_text_long:;
ret = Xorriso_set_alpha_boot(xorriso, treatpt + 11, 0);
if(ret <= 0)
goto ex;
is_change= 1;
} else if(strncmp(treatpt, "boot_info_table=", 16)==0) {
if(strcmp(treatpt + 16, "off") == 0)
@ -1003,6 +1079,8 @@ interval_text_long:;
1 | (2 * (strcmp(treatpt, "grub") == 0));
else
was_ok= 0;
if(was_ok)
is_change= 1;
} else if(strncmp(treatpt, "grub2_boot_info=", 16)==0) {
if(strcmp(treatpt + 16, "off") == 0)
@ -1011,6 +1089,8 @@ interval_text_long:;
xorriso->patch_isolinux_image= xorriso->patch_isolinux_image | 512;
else
was_ok= 0;
if(was_ok)
is_change= 1;
} else if(strncmp(treatpt, "load_size=", 10) == 0) {
if(strcmp(treatpt + 10, "full") == 0) {
@ -1027,6 +1107,7 @@ interval_text_long:;
xorriso->boot_image_load_size= num;
}
xorriso->boot_img_size_default= 0;
is_change= 1;
} else if(strncmp(treatpt, "id_string=", 10) == 0) {
memset(xorriso->boot_id_string, 0, 29);
@ -1036,6 +1117,7 @@ interval_text_long:;
ret= 0;
if(ret <= 0)
strncpy((char *) xorriso->boot_id_string, treatpt + 10, 28);
is_change= 1;
} else if(strncmp(treatpt, "sel_crit=", 9) == 0) {
memset(xorriso->boot_selection_crit, 0, 21);
@ -1048,6 +1130,7 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
is_change= 1;
} else if(strncmp(treatpt, "system_area=", 12) == 0) {
if(strcmp(formpt, "isolinux")==0) {
@ -1066,6 +1149,7 @@ interval_text_long:;
xorriso->system_area_options&= ~0x4000;
if(strcmp(treatpt + 12, "/dev/zero") == 0)
xorriso->system_area_clear_loaded= 1;
is_change= 1;
} else if(strncmp(treatpt, "partition_table=", 16)==0) {
if(strcmp(treatpt + 16, "off") == 0) {
@ -1080,6 +1164,9 @@ interval_text_long:;
goto ex;
} else
was_ok= 0;
if(was_ok)
is_change= 1;
} else if(strncmp(treatpt, "partition_entry=", 16)==0) {
if(strcmp(formpt, "isolinux") != 0) {
sprintf(xorriso->info_text,
@ -1100,6 +1187,8 @@ interval_text_long:;
xorriso->patch_isolinux_image = (xorriso->patch_isolinux_image & ~0x1fc);
} else
was_ok= 0;
if(was_ok)
is_change= 1;
} else if(strncmp(treatpt, "partition_offset=", 17)==0) {
u= 0;
@ -1112,6 +1201,7 @@ interval_text_long:;
{ret= 0; goto ex;}
}
xorriso->partition_offset= u;
is_change= 1;
} else if(strncmp(treatpt, "appended_part_as=", 17) == 0) {
if(strcmp(treatpt + 17, "gpt") == 0) {
@ -1123,11 +1213,14 @@ interval_text_long:;
xorriso->appended_as_apm = 1;
} else
was_ok= 0;
if(was_ok)
is_change= 1;
} else if(strncmp(treatpt, "gpt_disk_guid=", 14) == 0) {
ret= Xorriso_parse_gpt_guid(xorriso, treatpt + 14, 0);
if(ret <= 0)
goto ex;
is_change= 1;
} else if(strncmp(treatpt, "part_like_isohybrid=", 20) == 0) {
if(strcmp(treatpt + 20, "on") == 0)
@ -1136,6 +1229,8 @@ interval_text_long:;
xorriso->part_like_isohybrid= 0;
else
was_ok= 0;
if(was_ok)
is_change= 1;
} else if(strncmp(treatpt, "iso_mbr_part_type=", 18) == 0) {
ret= 256;
@ -1165,6 +1260,7 @@ interval_text_long:;
{ret= 0; goto ex;}
}
xorriso->iso_mbr_part_type= ret;
is_change= 1;
} else if(strncmp(treatpt, "partition_hd_cyl=", 17)==0) {
u= 0;
@ -1176,6 +1272,7 @@ interval_text_long:;
{ret= 0; goto ex;}
}
xorriso->partition_heads_per_cyl= u;
is_change= 1;
} else if(strncmp(treatpt, "partition_sec_hd=", 17)==0) {
u= 0;
@ -1187,6 +1284,7 @@ interval_text_long:;
{ret= 0; goto ex;}
}
xorriso->partition_secs_per_head= u;
is_change= 1;
} else if(strncmp(treatpt, "partition_cyl_align=", 20)==0) {
if(strcmp(treatpt + 20, "auto") == 0)
@ -1207,6 +1305,7 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
{ret= 0; goto ex;}
}
is_change= 1;
} else if(strncmp(treatpt, "platform_id=", 12)==0) {
u= 256; /* intentionally too large */
@ -1222,6 +1321,7 @@ interval_text_long:;
{ret= 0; goto ex;}
}
xorriso->boot_platform_id= u;
is_change= 1;
} else if(strncmp(treatpt, "emul_type=", 10)==0) {
if(strcmp(treatpt + 10, "none") == 0 ||
@ -1242,6 +1342,7 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
is_change= 1;
} else if(strncmp(treatpt, "hfsplus_serial=", 15) == 0) {
ret= Hex_to_bin(treatpt + 15, 8, &bin_count, (unsigned char *) sn, 0);
@ -1257,6 +1358,7 @@ interval_text_long:;
} else {
memcpy(xorriso->hfsp_serial_number, sn, 8);
}
is_change= 1;
} else if(strncmp(treatpt, "hfsplus_block_size=", 19) == 0) {
u= 0;
@ -1271,6 +1373,7 @@ interval_text_long:;
ret= 0; goto ex;
}
xorriso->hfsp_block_size= u;
is_change= 1;
} else if(strncmp(treatpt, "apm_block_size=", 15) == 0) {
u= 0;
@ -1285,14 +1388,17 @@ interval_text_long:;
ret= 0; goto ex;
}
xorriso->apm_block_size= u;
is_change= 1;
} else if(strncmp(treatpt, "efi_boot_part=", 14) == 0) {
if(Sfile_str(xorriso->efi_boot_partition, treatpt + 14, 0) <= 0)
{ret= -1; goto ex;}
is_change= 1;
} else if(strncmp(treatpt, "prep_boot_part=", 15) == 0) {
if(Sfile_str(xorriso->prep_partition, treatpt + 15, 0) <= 0)
{ret= -1; goto ex;}
is_change= 1;
} else if(strncmp(treatpt, "chrp_boot_part=", 15) == 0) {
if(strcmp(treatpt + 15, "on") == 0) {
@ -1307,6 +1413,7 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
{ret= 0; goto ex;}
}
is_change= 1;
} else if(strncmp(treatpt, "isohybrid=", 10) == 0 &&
strcmp(formpt, "isolinux")==0) {
@ -1331,6 +1438,7 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
{ret= 0; goto ex;}
}
is_change= 1;
#else
@ -1375,6 +1483,7 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
{ret= 0; goto ex;}
}
is_change= 1;
} else if(strncmp(treatpt, "gpt_iso_bootable=", 17) == 0) {
if(strcmp(treatpt + 17, "off") == 0) {
@ -1388,6 +1497,7 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
{ret= 0; goto ex;}
}
is_change= 1;
} else if(strncmp(treatpt, "gpt_iso_not_ro=", 15) == 0) {
if(strcmp(treatpt + 15, "off") == 0) {
@ -1401,11 +1511,14 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
{ret= 0; goto ex;}
}
is_change= 1;
} else {
was_ok= 0;
}
if(is_change)
Xorriso_set_change_pending(xorriso, 1);
if(!was_ok) {
sprintf(xorriso->info_text, "Unrecognized options with -boot_image: %s %s",
form, treatment);
@ -1806,7 +1919,8 @@ ex:;
int Xorriso_option_check_media(struct XorrisO *xorriso,
int argc, char **argv, int *idx, int flag)
{
int ret, i, count, lba, blocks, quality, pass, was_md5= 0, was_event= 0;
int ret, quality, pass, was_md5= 0, was_event= 0;
off_t i, count, lba, blocks;
int end_idx, old_idx, os_errno, to_info= 0;
char quality_name[80], *head_buffer= NULL;
struct SpotlisT *spotlist= NULL;
@ -1880,7 +1994,7 @@ int Xorriso_option_check_media(struct XorrisO *xorriso,
if(ret <= 0)
goto ex;
if(ret == 1) {
ret= Xorriso_update_iso_lba0(xorriso, job->patch_lba0_msc1, 0,
ret= Xorriso_update_iso_lba0(xorriso, job->patch_lba0_msc1, (off_t) 0,
head_buffer, job,
(8 * (job->patch_lba0 == 1)) |
4 | (job->patch_lba0_msc1 < 0));
@ -1925,9 +2039,10 @@ int Xorriso_option_check_media(struct XorrisO *xorriso,
else if(pass == 1 && !(quality == Xorriso_read_quality_md5_matcH ||
quality == Xorriso_read_quality_md5_mismatcH))
continue;
sprintf(xorriso->result_line, "%s: %10d , %10d , %s\n",
sprintf(xorriso->result_line, "%s: %10.f , %10.f , %s\n",
pass == 0 ? "Media region " : "MD5 tag range",
lba, blocks, Spotlist__quality_name(quality, quality_name,
(double) lba, (double) blocks,
Spotlist__quality_name(quality, quality_name,
xorriso->check_media_bad_limit, 0));
if(to_info) {
strcpy(xorriso->info_text, xorriso->result_line);
@ -2230,6 +2345,7 @@ int Xorriso_option_commit(struct XorrisO *xorriso, int flag)
int ret;
char eternal_problem_status_text_mem[80];
xorriso->commit_attempts++;
if(!Xorriso_change_is_pending(xorriso, 0)) {
sprintf(xorriso->info_text, "-commit: No image modifications pending");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -835,7 +835,8 @@ static int Xorriso_truncate_const_find_name(struct XorrisO *xorriso,
int Xorriso_option_find(struct XorrisO *xorriso, int argc, char **argv,
int *idx, int flag)
{
int ret, i, end_idx, type= 0, action, deleter= 0, start_lba, count;
int ret, i, end_idx, type= 0, action, deleter= 0, count;
off_t start_lba, block_count;
int list_extattr_head= 0, bsl_mem, disk_path, name_space, prefix_code;
struct FindjoB *job, *first_job= NULL, *new_job;
char *start_path, *path= NULL, *cpt, *other_path_start= NULL, *cd_pt;
@ -919,9 +920,16 @@ not_enough_arguments:;
i+= 2;
/* >>> if letter suffix: use Scanf_io_size */
sscanf(argv[i-1], "%d", &start_lba);
sscanf(argv[i], "%d", &count);
Findjob_set_lba_range(job, start_lba, count, 0);
ret= Sfile_text_to_off_t(argv[i - 1], &start_lba, 0);
if(ret <= 0) {
off_t_overflow:;
sprintf(xorriso->info_text, "-find[ix]: -lba_range number too large");
goto sorry_ex;
}
ret= Sfile_text_to_off_t(argv[i], &block_count, 0);
if(ret <= 0)
goto off_t_overflow;
Findjob_set_lba_range(job, start_lba, block_count, 0);
} else if(strcmp(argv[i], "-pending_data")==0) {
Findjob_set_commit_filter_2(job, 0);
} else if(strcmp(argv[i], "-has_acl")==0) {

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -333,8 +333,10 @@ int Xorriso_option_print(struct XorrisO *xorriso, char *text, int flag)
*/
int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
{
int ret, fd;
int fd;
off_t ret;
xorriso->print_size_attempts++;
if(!Xorriso_change_is_pending(xorriso, 0)) {
sprintf(xorriso->info_text,"-print_size: No image modifications pending");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
@ -351,7 +353,7 @@ int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
return(0);
}
if(flag&1) {
sprintf(xorriso->result_line,"%d\n", ret);
sprintf(xorriso->result_line,"%.f\n", (double) ret);
if(xorriso->packet_output) {
Xorriso_result(xorriso,0);
} else {
@ -363,7 +365,7 @@ int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
fsync(fd);
}
} else {
sprintf(xorriso->result_line,"Image size : %ds\n", ret);
sprintf(xorriso->result_line,"Image size : %.fs\n", (double) ret);
Xorriso_result(xorriso,0);
}
return(1);
@ -1622,7 +1624,8 @@ int Xorriso_option_system_id(struct XorrisO *xorriso, char *name, int flag)
/* Option -tell_media_space */
int Xorriso_option_tell_media_space(struct XorrisO *xorriso, int flag)
{
int ret, free_space= 0, media_space= 0;
int ret;
off_t free_space= 0, media_space= 0;
ret= Xorriso_tell_media_space(xorriso, &media_space, &free_space, 0);
if(ret<=0) {
@ -1635,9 +1638,9 @@ int Xorriso_option_tell_media_space(struct XorrisO *xorriso, int flag)
"Pending image size larger than free space on medium");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
}
sprintf(xorriso->result_line, "Media space : %ds\n", media_space);
sprintf(xorriso->result_line, "Media space : %.fs\n", (double) media_space);
Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, "After commit : %ds\n", free_space);
sprintf(xorriso->result_line, "After commit : %.fs\n", (double) free_space);
Xorriso_result(xorriso, 0);
return(1);
}

View File

@ -2,7 +2,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -200,7 +200,7 @@ int Xorriso_restore_is_identical(struct XorrisO *xorriso, void *in_node,
IsoImage *volume;
IsoNode *node;
struct stat stbuf;
int dummy;
off_t dummy;
memset(type_text, 0, 5);
if(!Xorriso_change_is_pending(xorriso, 0))
@ -2417,10 +2417,11 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
off_t img_offset, off_t disk_offset,
off_t bytes, int flag)
{
int ret, i, lba_count= 0, *start_lbas= NULL, *end_lbas= NULL, read_chunk= 16;
int lba, count, blocks, quality, spot, bad_extract= 0;
int ret, i, lba_count= 0, read_chunk= 16;
int quality, bad_extract= 0;
off_t lba, count, blocks, spot, *start_lbas= NULL, *end_lbas= NULL;
int data_to_skip= 0;
uint32_t indev_blocks;
off_t indev_blocks;
off_t size= 0, file_base_bytes= 0, file_processed_bytes= 0, img_adr;
off_t new_file_base_bytes, upto_file_bytes, start_byte= 0;
off_t *section_sizes = NULL;
@ -2432,16 +2433,16 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
if(flag & 1) {
lba_count= 1;
Xorriso_alloc_meM(start_lbas, int, 1);
Xorriso_alloc_meM(end_lbas, int, 1);
Xorriso_alloc_meM(start_lbas, off_t, 1);
Xorriso_alloc_meM(end_lbas, off_t, 1);
Xorriso_alloc_meM(section_sizes, off_t, 1);
start_lbas[0]= 0;
ret= Xorriso_obtain_indev_readsize(xorriso, &indev_blocks, 0);
if(ret > 0)
end_lbas[0]= indev_blocks - 1;
else
end_lbas[0]= 0x7ffffffe;
size= ((off_t) end_lbas[0]) * 2048;
end_lbas[0]= 0x7ffffffffffffffe;
size= end_lbas[0] * (off_t) 2048;
section_sizes[0]= size;
} else {
ret= Xorriso__start_end_lbas(node, &lba_count, &start_lbas, &end_lbas,
@ -2481,7 +2482,7 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
for(i= 0; i < lba_count && file_base_bytes < upto_file_bytes; i++) {
lba= start_lbas[i];
count= end_lbas[i] + 1 - start_lbas[i];
new_file_base_bytes= file_base_bytes + ((off_t) count) * (off_t) 2048;
new_file_base_bytes= file_base_bytes + count * (off_t) 2048;
/* skip intervals before img_offset */
if(new_file_base_bytes <= img_offset) {
@ -2489,7 +2490,7 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
continue;
}
/* Eventually adjust first interval start */
img_adr= ((off_t) lba) * (off_t) 2048;
img_adr= lba * (off_t) 2048;
if(file_base_bytes < img_offset) {
img_adr+= img_offset - file_base_bytes;
lba= img_adr / (off_t) 2048;
@ -2505,7 +2506,7 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
job->data_to_limit= size - file_base_bytes;
job->data_to_skip= data_to_skip;
data_to_skip= 0;
file_processed_bytes+= ((off_t) count) * (off_t) 2048;
file_processed_bytes+= count * (off_t) 2048;
ret= Xorriso_check_interval(xorriso, spotlist, job, lba, count, read_chunk,
0, (flag & 2));
if(ret <= 0)

View File

@ -833,7 +833,7 @@ int Sfile_make_argv(char *progname, char *line, int *argc, char ***argv,
/* @param flag bit0= append */
int Sfile_str(char target[SfileadrL], char *source, int flag)
int Sfile_str(char *target, char *source, int flag)
{
int l;

View File

@ -27,13 +27,14 @@
#define Xorriso_free_meM(pt) { \
if(pt != NULL) \
free((char *) pt); \
pt= NULL; \
}
#define SfileadrL 4096
int Sfile_str(char target[SfileadrL], char *source, int flag);
int Sfile_str(char *target, char *source, int flag);
double Sfile_microtime(int flag);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -308,7 +308,7 @@ int Xorriso_search_di_range(struct XorrisO *xorriso, IsoNode *node,
int Xorriso__node_lba_cmp(const void *node1, const void *node2)
{
int ret;
int lba1= 0, lba2= 0;
off_t lba1= 0, lba2= 0;
ret= Xorriso__file_start_lba(*((IsoNode **) node1), &lba1, 0);
if(ret!=1)
@ -316,7 +316,11 @@ int Xorriso__node_lba_cmp(const void *node1, const void *node2)
ret= Xorriso__file_start_lba(*((IsoNode **) node2), &lba2, 0);
if(ret!=1)
lba2= 0;
return(lba1-lba2);
if(lba1 > lba2)
return(1);
if(lba1 < lba2)
return(-1);
return(0);
}

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2021 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -2666,9 +2666,9 @@ int Xorriso_write_session_log(struct XorrisO *xorriso, int flag)
*(wpt++)= *rpt;
}
*wpt= 0;
fprintf(fp, "%s %d %d %s\n",
Ftimetxt(time(0), timetext, 2), xorriso->session_lba,
xorriso->session_blocks, sfe);
fprintf(fp, "%s %.f %.f %s\n",
Ftimetxt(time(0), timetext, 2), (double) xorriso->session_lba,
(double) xorriso->session_blocks, sfe);
fclose(fp);
ret= 1;
ex:;
@ -3706,7 +3706,7 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->grow_blindly_msc2<0);
sprintf(sfe, "%d", xorriso->grow_blindly_msc2);
sprintf(sfe, "%.f", (double) xorriso->grow_blindly_msc2);
sprintf(line,"-grow_blindly %s\n",
xorriso->grow_blindly_msc2 < 0 ? "off" : sfe);
if(!(is_default && no_defaults))

View File

@ -2,7 +2,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -198,19 +198,18 @@ int Xorriso_make_write_options(
bit1= do not use isoburn wrappers, do not assume libisofs
bit2= no_emul_toc : do not pad random access media to full 64 KB
*/
int Xorriso_sanitize_image_size(struct XorrisO *xorriso,
off_t Xorriso_sanitize_image_size(struct XorrisO *xorriso,
struct burn_drive *drive, struct burn_disc *disc,
struct burn_write_opts *burn_options, int flag)
{
int ret, img_sectors, num_sessions= 0, num_tracks= 0, padding= 0, profile;
off_t media_space;
int lba, nwa, multi_emul_blocks= 0;
int num_sessions= 0, num_tracks= 0, padding= 0, profile;
off_t media_space, ret, img_sectors, lba, nwa, multi_emul_blocks= 0;
char profile_name[80];
struct burn_session **sessions;
struct burn_track **tracks;
enum burn_disc_status s;
img_sectors= burn_disc_get_sectors(disc);
img_sectors= burn_disc_get_sectors_v2(disc);
sessions= burn_disc_get_sessions(disc, &num_sessions);
if(sessions==NULL || num_sessions < 1) {
@ -250,7 +249,7 @@ no_track:;
s= isoburn_disc_get_status(drive);
if(s == BURN_DISC_BLANK) {
/* Count blocks before nwa as part of the image */;
ret= isoburn_disc_track_lba_nwa(drive, burn_options, 0, &lba, &nwa);
ret= isoburn_disc_track_lba_nwa_v2(drive, burn_options, 0, &lba, &nwa);
if(ret <= 0)
nwa= 0;
multi_emul_blocks= nwa;
@ -272,7 +271,7 @@ no_track:;
if(xorriso->alignment > 0) {
if(img_sectors > 0) {
ret= isoburn_disc_track_lba_nwa(drive, burn_options, 0, &lba, &nwa);
ret= isoburn_disc_track_lba_nwa_v2(drive, burn_options, 0, &lba, &nwa);
if(ret <= 0)
nwa= 0;
lba= (nwa + img_sectors + padding) % xorriso->alignment;
@ -293,8 +292,8 @@ no_track:;
if(media_space < img_sectors + padding) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text,
"Image size %ds exceeds free space on media %.fs",
img_sectors + padding, (double) media_space);
"Image size %.fs exceeds free space on media %.fs",
(double) (img_sectors + padding), (double) media_space);
if(flag & 1) {
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
} else {
@ -402,8 +401,9 @@ int Xorriso_set_system_area(struct XorrisO *xorriso,
struct isoburn_imgen_opts *sopts,
int flag)
{
int ret, options, system_area_options, iso_lba= -1, start_lba, image_blocks;
int ret, options, system_area_options;
int sa_loaded, read_count, i, read_sum= 0;
off_t iso_lba= -1, start_lba, image_blocks;
char volid[33];
FILE *fp= NULL;
char *buf= NULL, *bufpt= NULL, *intvl;
@ -471,20 +471,20 @@ int Xorriso_set_system_area(struct XorrisO *xorriso,
(((unsigned int) ub[461]) << 24));
iso_lba= -1;
ret= isoburn_disc_get_msc1(in_drive, &start_lba);
ret= isoburn_disc_get_msc1_v2(in_drive, &start_lba);
if(ret > 0) {
ret= isoburn_read_iso_head(in_drive, start_lba, &image_blocks,
volid, 1);
ret= isoburn_read_iso_head_v2(in_drive, start_lba, &image_blocks,
volid, 1);
if(ret > 0)
iso_lba= start_lba + image_blocks;
}
if(((off_t) iso_lba) * (off_t) 4 > hd_lba) {
if(iso_lba * (off_t) 4 > hd_lba) {
system_area_options= 0;
} else if((xorriso->patch_system_area & 1) &&
((off_t) iso_lba) * (off_t) 4 != hd_lba) {
iso_lba * (off_t) 4 != hd_lba) {
system_area_options= 0;
} else if((xorriso->patch_system_area & 2) &&
((off_t) iso_lba) * (off_t) 4 + (off_t) (63 * 256) < hd_lba) {
iso_lba * (off_t) 4 + (off_t) (63 * 256) < hd_lba) {
system_area_options= 0;
} else if(xorriso->patch_system_area & 2) { /* isohybrid patching */
/* Check whether bytes 432-345 point to ElTorito LBA */
@ -495,7 +495,7 @@ int Xorriso_set_system_area(struct XorrisO *xorriso,
system_area_options= 0;
} else if(bootimg_node != NULL) {
Xorriso__file_start_lba((IsoNode *) bootimg_node, &(iso_lba), 0);
if(((off_t) iso_lba) * (off_t) 4 != hd_lba)
if(iso_lba * (off_t) 4 != hd_lba)
system_area_options= 0;
}
}
@ -1178,9 +1178,10 @@ ex:;
@return <=0 error , 1= success
2= failure with DVD-RW, please call Xorriso_retry_write_session()
*/
int Xorriso_write_session(struct XorrisO *xorriso, int flag)
off_t Xorriso_write_session(struct XorrisO *xorriso, int flag)
{
int ret, i, pacifier_speed= 0, data_lba, is_bootable= 0;
int ret, i, pacifier_speed= 0, is_bootable= 0;
off_t data_lba;
int freshly_bootable= 0, hide_attr, signal_mode, role, is_bdr_pow= 0;
char *xorriso_id= NULL, *img_id, *sfe= NULL, *out_cs;
struct isoburn_imgen_opts *sopts= NULL;
@ -1376,8 +1377,8 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
sprintf(xorriso->info_text, "Patching boot info table");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
ret= Xorriso_path_from_lba(xorriso, NULL, xorriso->loaded_boot_bin_lba,
sfe, 1);
ret= Xorriso_path_from_lba(xorriso, NULL,
(off_t) xorriso->loaded_boot_bin_lba, sfe, 1);
if(ret < 0)
goto ex;
if(ret == 0) {
@ -1449,8 +1450,8 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
Xorriso_set_abort_severity(xorriso, 1);
if (xorriso->grow_blindly_msc2 >= 0 &&
xorriso->out_drive_handle != xorriso->in_drive_handle) {
ret= isoburn_prepare_blind_grow(source_drive, &disc, sopts, drive,
xorriso->grow_blindly_msc2);
ret= isoburn_prepare_blind_grow_v2(source_drive, &disc, sopts, drive,
xorriso->grow_blindly_msc2);
if(ret>0) {
/* Allow the consumer of output to access the input drive */
source_drive= NULL;
@ -1474,11 +1475,11 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
ret= Xorriso_make_write_options(xorriso, drive, &burn_options, 0);
if(ret<=0)
goto cancel_iso;
isoburn_igopt_get_effective_lba(sopts, &(xorriso->session_lba));
isoburn_igopt_get_effective_lba_v2(sopts, &(xorriso->session_lba));
if(xorriso->do_stream_recording == 2) {
ret= isoburn_igopt_get_data_start(sopts, &data_lba);
if(ret > 0 && data_lba >= 16)
burn_write_opts_set_stream_recording(burn_options, data_lba);
ret= isoburn_igopt_get_data_start_v2(sopts, &data_lba);
if(ret > 0 && data_lba >= 16 && data_lba < (int) 0x7fffffff)
burn_write_opts_set_stream_recording(burn_options, (int) data_lba);
}
ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, flag&1);
@ -1488,6 +1489,8 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
Xorriso_set_image_severities(xorriso, 2);
if(flag&1) /* reset queue severity */
Xorriso_set_image_severities(xorriso, 0);
if(flag & 1)
xorriso->print_size_counter++;
goto cancel_iso;
}
@ -1544,11 +1547,11 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
tracks= burn_session_get_tracks(sessions[0], &num_tracks);
if(tracks!=NULL && num_tracks>0) {
burn_track_get_counters(tracks[0],&readcounter,&writecounter);
xorriso->session_blocks= (int) (writecounter/ (off_t) 2048);
xorriso->session_blocks= writecounter / 2048.0;
sprintf(xorriso->info_text,
"ISO image produced: %d sectors\nWritten to medium : %d sectors at LBA %d\n",
(int) (readcounter/ (off_t) 2048),
xorriso->session_blocks, xorriso->session_lba);
"ISO image produced: %.f sectors\nWritten to medium : %.f sectors at LBA %.f\n",
((double) readcounter) / 2048.0,
(double) xorriso->session_blocks, (double) xorriso->session_lba);
Xorriso_info(xorriso, 0);
}
}
@ -1571,6 +1574,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
sprintf(xorriso->info_text, "Writing to %s completed successfully.\n\n",
Text_shellsafe(xorriso->outdev,sfe,0));
Xorriso_info(xorriso, 0);
xorriso->write_session_counter++;
ret= 1;
ex:;
xorriso->run_state= 0; /* Indicate that burning has ended */
@ -1648,9 +1652,10 @@ int Xorriso_check_burn_abort(struct XorrisO *xorriso, int flag)
int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
int flag)
{
int ret, size, free_bytes, i, aborting= 0, emul, buffer_fill= 50, last_sector;
int ret, size, free_bytes, i, aborting= 0, emul, buffer_fill= 50;
int iso_wait_counter= 0, iso_cancel_limit= 5;
struct burn_progress progress;
struct burn_progress_v2 progress;
off_t last_sector;
char *status_text, date_text[80], *speed_unit, mem_text[8];
enum burn_drive_status drive_status;
double start_time, current_time, last_time, base_time= 0.0, base_count= 0.0;
@ -1686,7 +1691,7 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
while(1) {
last_time= current_time;
last_sector= progress.sector;
drive_status= burn_drive_get_status(drive, &progress);
drive_status= burn_drive_get_status_v2(drive, &progress);
if(drive_status == BURN_DRIVE_IDLE) {
/* To avoid a race condition between burn_source and libisofs
@ -1716,11 +1721,12 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
/ (double) progress.buffer_capacity;
if(emul==2) {
if(progress.sector<=progress.sectors)
sprintf(xorriso->info_text, "%4d of %4d MB written",
progress.sector / 512, progress.sectors / 512);
sprintf(xorriso->info_text, "%4.f of %4.f MB written",
(double) (progress.sector / 512),
(double) ( progress.sectors / 512));
else
sprintf(xorriso->info_text, "%4d MB written",
progress.sector / 512);
sprintf(xorriso->info_text, "%4.f MB written",
(double) (progress.sector / 512));
if(xorriso->pacifier_fifo!=NULL)
ret= burn_fifo_inquire_status(xorriso->pacifier_fifo,
@ -1794,12 +1800,12 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
sprintf(mem_text, "%5.1f",
100.0 * ((double) progress.sector) / ((double) progress.sectors));
mem_text[5]= 0;
sprintf(xorriso->info_text, "Writing: %10ds %s%% ",
progress.sector, mem_text);
sprintf(xorriso->info_text, "Writing: %10.fs %s%% ",
(double) progress.sector, mem_text);
} else {
Sfile_scale(2048.0 * (double) progress.sector, mem_text, 5, 1e4, 1);
sprintf(xorriso->info_text, "Writing: %10ds %s ",
progress.sector, mem_text);
sprintf(xorriso->info_text, "Writing: %10.fs %s ",
(double) progress.sector, mem_text);
}
ret= isoburn_get_fifo_status(drive, &size, &free_bytes, &status_text);
if(ret>0 )
@ -1861,7 +1867,7 @@ int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
struct burn_drive_info *dinfo;
struct burn_drive *drive;
enum burn_disc_status disc_state;
struct burn_progress p;
struct burn_progress_v2 p;
double percent = 1.0;
int current_profile;
char current_profile_name[80];
@ -1946,7 +1952,7 @@ int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
usleep(1000000);
if(!using_immed)
sprintf(progress_text, "synchronously since");
while (burn_drive_get_status(drive, &p) != BURN_DRIVE_IDLE) {
while (burn_drive_get_status_v2(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;
@ -1993,7 +1999,7 @@ int Xorriso_format_media(struct XorrisO *xorriso, off_t in_size, int flag)
unsigned dummy;
struct burn_drive_info *dinfo;
struct burn_drive *drive;
struct burn_progress p;
struct burn_progress_v2 p;
double percent = 1.0;
int current_profile;
char current_profile_name[80], progress_text[40];
@ -2116,7 +2122,7 @@ int Xorriso_format_media(struct XorrisO *xorriso, off_t in_size, int flag)
usleep(1000000);
if(!using_immed)
sprintf(progress_text, "synchronously since");
while (burn_drive_get_status(drive, &p) != BURN_DRIVE_IDLE) {
while (burn_drive_get_status_v2(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;
@ -2269,8 +2275,8 @@ int Xorriso_retry_burn_track(struct XorrisO *xorriso,
int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
char *track_source, off_t tsize, int flag)
{
int ret, fd, profile_number, is_cd= 0, dummy, nwa= -1;
int isosize= -1, do_isosize, is_bd= 0, signal_mode;
int ret, fd, profile_number, is_cd= 0, do_isosize, is_bd= 0, signal_mode;
off_t dummy, nwa= -1, isosize= -1;
struct burn_drive_info *dinfo;
struct burn_drive *drive;
struct burn_write_opts *burn_options= NULL;
@ -2407,7 +2413,7 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
ret= 0; goto ex;
}
/* read isosize from head_buffer, not from medium */
ret= isoburn_read_iso_head(drive, 0, &isosize, head_buffer, (1<<13));
ret= isoburn_read_iso_head_v2(drive, 0, &isosize, head_buffer, (1 << 13));
if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text,
@ -2415,9 +2421,10 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
sprintf(xorriso->info_text, "Size of ISO 9660 image: %ds", isosize);
sprintf(xorriso->info_text, "Size of ISO 9660 image: %.fs",
(double) isosize);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
fixed_size= ((off_t) (isosize)) * (off_t) 2048;
fixed_size= isosize * (off_t) 2048;
burn_track_set_size(track, fixed_size);
}
@ -2427,7 +2434,7 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
if(isoburn_needs_emulation(drive)) {
if(flag&1) {
ret= isoburn_disc_track_lba_nwa(drive, burn_options, 0, &dummy, &nwa);
ret= isoburn_disc_track_lba_nwa_v2(drive, burn_options, 0, &dummy, &nwa);
Xorriso_process_msg_queues(xorriso,0);
if(ret<=0) {
sprintf(xorriso->info_text,
@ -2440,7 +2447,8 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
} else {
nwa= 0;
if (disc_state == BURN_DISC_APPENDABLE) {
ret= isoburn_disc_track_lba_nwa(drive, burn_options, 0, &dummy, &nwa);
ret= isoburn_disc_track_lba_nwa_v2(drive, burn_options, 0, &dummy,
&nwa);
Xorriso_process_msg_queues(xorriso,0);
if(ret<=0) {
sprintf(xorriso->info_text,
@ -2450,14 +2458,14 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
}
}
}
burn_write_opts_set_start_byte(burn_options,((off_t) nwa) * (off_t) 2048);
burn_write_opts_set_start_byte(burn_options, nwa * (off_t) 2048);
}
if(write_start_address>=0) {
nwa= write_start_address / (off_t) 2048;
if(((off_t) nwa) * (off_t) 2048 < write_start_address )
if(nwa * (off_t) 2048 < write_start_address )
nwa++;
burn_write_opts_set_start_byte(burn_options, ((off_t) nwa) * (off_t) 2048);
burn_write_opts_set_start_byte(burn_options, nwa * (off_t) 2048);
}
if(xorriso->do_tao) {
@ -3007,19 +3015,19 @@ ex:
int Xorriso_overwrite_iso_head(struct XorrisO *xorriso,
struct burn_drive *drive, char *head_buffer,
int lba, int flag)
off_t lba, int flag)
{
int ret;
off_t to_write;
to_write= 64 * 1024;
burn_drive_reset_simulate(drive, xorriso->do_dummy);
ret= burn_random_access_write(drive, (off_t) lba * (off_t) 2048,
ret= burn_random_access_write(drive, lba * (off_t) 2048,
head_buffer, to_write, 1);
if(ret <= 0) {
Xorriso_process_msg_queues(xorriso, 0);
sprintf(xorriso->info_text,
"Cannot write new ISO image head to LBA %d", lba);
"Cannot write new ISO image head to LBA %.f", (double) lba);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
@ -3163,11 +3171,13 @@ md5_comp_failed:;
bit5= bit1 for Xorriso_find_sb_checksum:
accept tag with ISO_MD5_AREA_CORRUPTED
*/
int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
int Xorriso_update_iso_lba0(struct XorrisO *xorriso,
off_t iso_lba, off_t isosize,
char *head_buffer, struct CheckmediajoB *job,
int flag)
{
int ret, full_size, i, checksum_block= -1, vd_end;
int ret, i, checksum_block= -1, vd_end;
uint32_t full_size;
char *headpt;
struct burn_drive_info *dinfo;
struct burn_drive *drive = NULL;
@ -3181,7 +3191,7 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
"on attempt to learn current session lba", 0);
if(ret<=0)
return(0);
ret= isoburn_disc_get_msc1(drive, &iso_lba);
ret= isoburn_disc_get_msc1_v2(drive, &iso_lba);
if(ret<=0)
return(0);
drive= NULL; /* indev will not be used furtherly */
@ -3203,19 +3213,18 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
if(job != NULL && job->data_to_fd >= 0) {
if((flag & 8) && job->sector_map != NULL) {
ret= Sectorbitmap_bytes_are_set(job->sector_map,
((off_t) iso_lba) * (off_t) 2048,
((off_t) (iso_lba + 32)) * ((off_t) 2048) - (off_t) 1, 0);
iso_lba * (off_t) 2048,
(iso_lba + 32) * ((off_t) 2048) - (off_t) 1, 0);
if(ret <= 0) {
sprintf(xorriso->info_text,
"ISO image head at lba %d is marked as invalid blocks in file copy",
iso_lba);
"ISO image head at lba %.f is marked as invalid blocks in file copy",
(double) iso_lba);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE",
0);
return(0);
}
}
seek_ret= lseek(job->data_to_fd, ((off_t) 2048) * (off_t) iso_lba,
SEEK_SET);
seek_ret= lseek(job->data_to_fd, ((off_t) 2048) * iso_lba, SEEK_SET);
if(seek_ret == -1)
ret= 0;
else
@ -3227,7 +3236,8 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE",0);
return(0);
}
ret= isoburn_read_iso_head(NULL, 0, &isosize, head_buffer, 1 << 13);
ret= isoburn_read_iso_head_v2(NULL, (off_t) 0, &isosize,
head_buffer, 1 << 13);
if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text,
@ -3238,7 +3248,7 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
} else {
ret= 0;
if(drive != NULL)
ret= isoburn_read_iso_head(drive, iso_lba, &isosize, head_buffer, 2);
ret= isoburn_read_iso_head_v2(drive, iso_lba, &isosize, head_buffer, 2);
if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text,
@ -3250,6 +3260,12 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
}
/* patch ISO header */
if(iso_lba + isosize > (off_t) 0xffffffff) {
sprintf(xorriso->info_text,
"The total ISO filesystem size would exceed 8 TiB");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
full_size= iso_lba + isosize;
headpt= head_buffer + 32*1024;
for(i=0;i<4;i++)
@ -3298,13 +3314,13 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
}
} else {
/* This is a regular superblock relocation. Write full 64 kB. */
ret= Xorriso_overwrite_iso_head(xorriso, drive, head_buffer, 0, 0);
ret= Xorriso_overwrite_iso_head(xorriso, drive, head_buffer, (off_t) 0, 0);
if(ret <= 0)
return(ret);
}
if(flag & 4) {
sprintf(xorriso->info_text,
"Overwrote LBA 0 to 31 by 64 KiB from LBA %d", iso_lba);
"Overwrote LBA 0 to 31 by 64 KiB from LBA %.f", (double) iso_lba);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
}
return(1);
@ -3377,7 +3393,7 @@ ex:;
int Xorriso_refresh_ts_tags(struct XorrisO *xorriso,
struct burn_drive *drive,
void *ctx_unch, void *ctx_chng,
int iso_lba, int session_size,
off_t iso_lba, off_t session_size,
int checksum_block, int flag)
{
int i, ret, tag_type, look_for_tag, check_start, look_from_block, was_change;
@ -3479,8 +3495,9 @@ ex:;
int Xorriso_adjust_session_size(struct XorrisO *xorriso,
struct burn_drive *drive,
char *head_buffer,
int iso_lba, int iso_size,
int checksum_block, int session_size, int flag)
off_t iso_lba, off_t iso_size,
int checksum_block, off_t session_size,
int flag)
{
int i, ret, tag_type;
uint32_t pos, range_start, range_size, next_tag;
@ -3524,6 +3541,11 @@ no_ctx:;
/* Update session PVD at iso_lba+16 to iso_size */
headpt= head_buffer + 32 * 1024;
if(iso_size > (off_t) 0xffffffff) {
sprintf(xorriso->info_text, "The total ISO filesystem size exceeds 8 TiB");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
for(i= 0; i < 4; i++)
headpt[87 - i]= headpt[80 + i]= (iso_size >> (8 * i)) & 0xff;
@ -3532,7 +3554,7 @@ no_ctx:;
ret= iso_md5_compute(ctx_chng, head_buffer + 32768, 2048);
if(ret <= 0)
goto ex;
ret= Xorriso_migrate_checksum_tag(xorriso, head_buffer, iso_lba, 17,
ret= Xorriso_migrate_checksum_tag(xorriso, head_buffer, (int) iso_lba, 17,
checksum_block, md5_rec,
ctx_unch, ctx_chng, 0);
if(ret == -2)
@ -3581,7 +3603,8 @@ int Xorriso_adjust_relocated_sb(struct XorrisO *xorriso,
char **sb_buffer,
int flag)
{
int ret, old_size, i, vd_end, checksum_block= -1;
int ret, i, vd_end, checksum_block= -1;
off_t old_size;
char *buffer, *checksum= NULL;
*sb_buffer= NULL;
@ -3589,11 +3612,11 @@ int Xorriso_adjust_relocated_sb(struct XorrisO *xorriso,
buffer= *sb_buffer;
Xorriso_alloc_meM(checksum, char, 2048);
ret= isoburn_read_iso_head(drive, 0, &old_size, buffer, 2);
ret= isoburn_read_iso_head_v2(drive, 0, &old_size, buffer, 2);
if(ret <= 0)
goto ex;
ret= Xorriso_find_sb_checksum(xorriso, buffer, &vd_end, 0);
if(ret <= 0)
if(ret < 0)
goto ex;
if(ret > 0) {
checksum_block= ret - 1;
@ -3628,9 +3651,9 @@ ex:
int Xorriso_truncate_overwritable(struct XorrisO *xorriso, char *adr_mode,
char *adr_value, char *adjust, int flag)
{
int ret, iso_lba= 0, iso_session, iso_track, iso_size= 0, image_start_mode= 0;
int old_size, new_size, blocks, was_indev= 0, checksum_block= 0, vd_end;
int readable_blocks, headless_mode= 0, i;
int ret, iso_session, iso_track, image_start_mode= 0;
int was_indev= 0, checksum_block= 0, vd_end, headless_mode= 0, i;
off_t iso_lba= 0, iso_size= 0, old_size, new_size, blocks, readable_blocks;
char image_start_value[81], *head_buffer= NULL, iso_volid[33];
char *sb_buffer= NULL, *checksum_pt;
struct burn_drive_info *dinfo;
@ -3672,14 +3695,14 @@ int Xorriso_truncate_overwritable(struct XorrisO *xorriso, char *adr_mode,
{ret= 2; goto ex;}
/* Learn old size */
ret= isoburn_read_iso_head(drive, 0, &old_size, iso_volid, 0);
ret= isoburn_read_iso_head_v2(drive, 0, &old_size, iso_volid, 0);
if(ret <= 0) {
sprintf(xorriso->info_text,
"-truncate_overwritable: Cannot read ISO 9660 Volume Descriptor from LBA 0");
if((strcmp(adr_mode, "lba") == 0 || strcmp(adr_mode, "sbsector") == 0)
&& strcmp(adjust, "new") == 0) {
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
ret= burn_get_read_capacity(drive, &old_size, 0);
ret= burn_get_read_capacity_v2(drive, &old_size, 0);
if(ret <= 0)
goto ex;
headless_mode= 1;
@ -3691,8 +3714,8 @@ int Xorriso_truncate_overwritable(struct XorrisO *xorriso, char *adr_mode,
if(headless_mode) {
iso_lba= Scanf_io_size(adr_value, 0);
ret= isoburn_read_iso_head(drive, iso_lba, &new_size, head_buffer,
2 | (1 << 12));
ret= isoburn_read_iso_head_v2(drive, iso_lba, &new_size, head_buffer,
2 | (1 << 12));
if(ret <= 0)
goto not_iso_9660;
} else {
@ -3702,9 +3725,9 @@ int Xorriso_truncate_overwritable(struct XorrisO *xorriso, char *adr_mode,
image_start_value, 0);
if(ret <= 0)
goto ex;
ret= isoburn_get_mount_params(drive, image_start_mode, image_start_value,
&iso_lba, &iso_track, &iso_session, iso_volid,
0);
ret= isoburn_get_mount_params_v2(drive, image_start_mode, image_start_value,
&iso_lba, &iso_track, &iso_session,
iso_volid, 0);
if(ret <= 0)
goto ex;
if(ret != 1) {
@ -3720,7 +3743,7 @@ not_iso_9660:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
ret= isoburn_read_iso_head(drive, iso_lba, &new_size, head_buffer, 2);
ret= isoburn_read_iso_head_v2(drive, iso_lba, &new_size, head_buffer, 2);
if(ret <= 0)
goto ex;
}
@ -3753,7 +3776,7 @@ wrong_adjust:;
iso_size= blocks - iso_lba;
}
ret= burn_get_read_capacity(drive, &readable_blocks, 0);
ret= burn_get_read_capacity_v2(drive, &readable_blocks, 0);
Xorriso_process_msg_queues(xorriso, 0);
if(ret > 0) {
if(iso_lba + iso_size > readable_blocks) {
@ -3776,8 +3799,8 @@ wrong_adjust:;
if(iso_size != new_size) {
ret=Xorriso_adjust_session_size(xorriso, drive, head_buffer,
iso_lba, iso_size, checksum_block,
new_size, 0);
iso_lba, iso_size,
checksum_block, new_size, 0);
if(ret <= 0)
goto ex;
}
@ -3797,8 +3820,8 @@ wrong_adjust:;
"libisofs_rlsb32_checksum_tag_v1 pos=%d range_start=0 range_size=%d",
i, i);
sprintf(checksum_pt + strlen(checksum_pt),
" session_start=%d md5=0123456789abcdef0123456789abcdef self=0123456789abcdef0123456789abcdef\n",
iso_lba);
" session_start=%.f md5=0123456789abcdef0123456789abcdef self=0123456789abcdef0123456789abcdef\n",
(double) iso_lba);
}
} else {
ret= Xorriso_adjust_relocated_sb(xorriso, drive, head_buffer, &sb_buffer,

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -31,7 +31,7 @@ int Xorriso_make_write_options(
struct XorrisO *xorriso, struct burn_drive *drive,
struct burn_write_opts **burn_options, int flag);
int Xorriso_sanitize_image_size(struct XorrisO *xorriso,
off_t Xorriso_sanitize_image_size(struct XorrisO *xorriso,
struct burn_drive *drive, struct burn_disc *disc,
struct burn_write_opts *burn_options, int flag);

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH XORRECORD 1 "Version 1.5.6, Jun 07, 2023"
.TH XORRECORD 1 "Version 1.5.7, Apr 19, 2024"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -689,8 +689,8 @@ formatting will show no progress indication.
It may depend on the operating system whether \-use_immed_bit is set to "off"
by default.
.TP
\fBwrite_start_address=value\fR
Set the block address on overwritable media where to start writing the track.
\fBwrite_start_address=byte_offset\fR
Set the byte address on overwritable media where to start writing the track.
With DVD+RW, DVD\-RAM or BD\-RE, byte_offset must be aligned to 2 kiB blocks,
but better is 32 kiB on DVD and 64 kiB on BD.
With formatted DVD\-RW 32 kiB alignment is mandatory.
@ -902,7 +902,7 @@ Thomas Schmitt <scdbackup@gmx.net>
.br
for libburnia\-project.org
.SH COPYRIGHT
Copyright (c) 2011 \- 2023 Thomas Schmitt
Copyright (c) 2011 \- 2024 Thomas Schmitt
.br
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of xorriso. If you make use

View File

@ -14,7 +14,7 @@ END-INFO-DIR-ENTRY

File: xorrecord.info, Node: Top, Next: Overview, Up: (dir)
xorrecord 1.5.6
xorrecord 1.5.7
***************
xorrecord - Emulation of CD/DVD/BD program cdrecord by program xorriso
@ -633,8 +633,8 @@ use_immed_bit="on"|"off"|"default"
no progress indication.
It may depend on the operating system whether -use_immed_bit is set
to "off" by default.
write_start_address=value
Set the block address on overwritable media where to start writing
write_start_address=byte_offset
Set the byte address on overwritable media where to start writing
the track. With DVD+RW, DVD-RAM or BD-RE, byte_offset must be
aligned to 2 kiB blocks, but better is 32 kiB on DVD and 64 kiB on
BD. With formatted DVD-RW 32 kiB alignment is mandatory.
@ -893,7 +893,7 @@ for libburnia-project.org
10.2 Copyright
==============
Copyright (c) 2011 - 2023 Thomas Schmitt
Copyright (c) 2011 - 2024 Thomas Schmitt
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of xorriso. If you make
use of the license to derive modified versions of xorriso then you are
@ -1057,21 +1057,21 @@ Node: Inquire7618
Node: SetBurn10487
Node: Verbose21111
Node: NonCdrecord22661
Node: Examples31491
Node: ExDevices32152
Node: ExMedium32370
Node: ExBlank32633
Node: ExFormat32854
Node: ExDeformat33372
Node: ExIsoSingle33639
Node: ExIsoMulti33923
Node: ExIsoFly35667
Node: ExAfio36859
Node: Files37857
Node: Seealso38413
Node: Bugreport38776
Node: Legal39367
Node: CommandIdx40296
Node: ConceptIdx44068
Node: Examples31496
Node: ExDevices32157
Node: ExMedium32375
Node: ExBlank32638
Node: ExFormat32859
Node: ExDeformat33377
Node: ExIsoSingle33644
Node: ExIsoMulti33928
Node: ExIsoFly35672
Node: ExAfio36864
Node: Files37862
Node: Seealso38418
Node: Bugreport38781
Node: Legal39372
Node: CommandIdx40301
Node: ConceptIdx44073

End Tag Table

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename xorrecord.info
@settitle GNU xorrecord 1.5.6
@settitle GNU xorrecord 1.5.7
@c %**end of header
@c
@c man-ignore-lines begin
@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRECORD 1 "Version 1.5.6, Jun 07, 2023"
@c man .TH XORRECORD 1 "Version 1.5.7, Apr 19, 2024"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -76,7 +76,7 @@ Permission is granted to distribute this text freely.
@end copying
@c man-ignore-lines end
@titlepage
@title Manual of GNU xorriso personality xorrecord 1.5.6
@title Manual of GNU xorriso personality xorrecord 1.5.7
@author Thomas Schmitt
@page
@vskip 0pt plus 1filll
@ -85,7 +85,7 @@ Permission is granted to distribute this text freely.
@contents
@ifnottex
@node Top
@top xorrecord 1.5.6
@top xorrecord 1.5.7
@c man-ignore-lines 1
@c man .SH NAME
@ -915,10 +915,10 @@ formatting will show no progress indication.
It may depend on the operating system whether -use_immed_bit is set to "off"
by default.
@c man .TP
@item write_start_address=value
@item write_start_address=byte_offset
@kindex write_start_address= set block address for write start
@cindex Write start address, set, write_start_address=
Set the block address on overwritable media where to start writing the track.
Set the byte address on overwritable media where to start writing the track.
With DVD+RW, DVD-RAM or BD-RE, byte_offset must be aligned to 2 kiB blocks,
but better is 32 kiB on DVD and 64 kiB on BD.
With formatted DVD-RW 32 kiB alignment is mandatory.
@ -1223,7 +1223,7 @@ Thomas Schmitt <scdbackup@@gmx.net>
for libburnia-project.org
@c man .SH COPYRIGHT
@section Copyright
Copyright (c) 2011 - 2023 Thomas Schmitt
Copyright (c) 2011 - 2024 Thomas Schmitt
@*
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of xorriso. If you make use

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH XORRISO-TCLTK 1 "Version 1.5.6, Jun 07, 2023"
.TH XORRISO-TCLTK 1 "Version 1.5.7, Jun 07, 2023"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:

Binary file not shown.

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename xorriso-tcltk.info
@settitle GNU xorriso-tcltk 1.5.6
@settitle GNU xorriso-tcltk 1.5.7
@c %**end of header
@c
@c man-ignore-lines begin
@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO-TCLTK 1 "Version 1.5.6, Jun 07, 2023"
@c man .TH XORRISO-TCLTK 1 "Version 1.5.7, Jun 07, 2023"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -76,7 +76,7 @@ Permission is granted to distribute this text freely.
@end copying
@c man-ignore-lines end
@titlepage
@title Manual of GNU xorriso frontend xorriso-tcltk 1.5.6
@title Manual of GNU xorriso frontend xorriso-tcltk 1.5.7
@author Thomas Schmitt
@page
@vskip 0pt plus 1filll
@ -85,7 +85,7 @@ Permission is granted to distribute this text freely.
@contents
@ifnottex
@node Top
@top xorriso-tcltk 1.5.6
@top xorriso-tcltk 1.5.7
@c man-ignore-lines 1
@c man .SH NAME

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH XORRISO 1 "Version 1.5.6, Jun 07, 2023"
.TH XORRISO 1 "Version 1.5.7, Aug 07, 2023"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -3591,10 +3591,12 @@ and to write the loaded system area content without alterations.
\fBdiscard\fR gives up the El Torito boot catalog and its boot images.
regardless whether loaded from an ISO filesystem or defined by commands.
Any BIOS or EFI related boot options get revoked.
Nevertheless, loaded system area data stay valid. If desired, they have to be
erased by
Nevertheless, loaded system area data and the possibly defined appended
partitions stay valid. If desired, they have to be erased by
.br
\-boot_image any system_area=/dev/zero
.br
\-append_partition all revoke \-
.br
\fBkeep\fR keeps or copies El Torito boot images unaltered and writes a new catalog.
.br
@ -3615,23 +3617,49 @@ you do know that the images need no patching, use "any" "keep".
\fBreplay\fR is a more modern version of "patch", which not only cares
for existing El Torito boot equipment but also for the recognizable
boot provisions in the System Area. It discards any existing \-boot_image
setting and executes the commands proposed by command \-report_el_torito "cmd".
setting including the system area and executes the commands proposed by
command \-report_el_torito "cmd".
.br
This action will only succeed if the file objects mentioned in the
output of command \-report_el_torito "cmd" are still available. Do not
remove or rename boot image files after \-indev.
.br
Drop unknown El Torito: \-boot_image "any" "discard"
.br
Maintain recognizable stuff: \-boot_image "any" "replay"
.br
El Torito only for GRUB: \-boot_image "grub" "patch"
.br
El Torito only for ISOLINUX: \-boot_image "isolinux" "patch"
Out of historical reasons \fBreplay\fR does not revoke all possibly made
\-append_partition settings but only overwrites those for which the loaded
ISO image provides candidates.
.br
\fBshow_status\fR will print what is known about the loaded boot images
and their designated fate.
.br
Examples:
.br
Drop unknown El Torito:
.br
\-boot_image any discard
.br
Drop El Torito, system area, appended partitions:
.br
\-boot_image any discard
.br
\-boot_image any system_area=/dev/zero
.br
\-append_partition all revoke \-
.br
Maintain recognizable stuff after revoking possibly made \-append_partition
settings to surely get only the partitions from the loaded ISO:
.br
\-append_partition all revoke \-
.br
\-boot_image any replay
.br
Re\-adjust El Torito only for GRUB:
.br
\-boot_image grub patch
.br
Re\-adjust El Torito only for ISOLINUX:
.br
\-boot_image isolinux patch
.br
A \fBbootspec\fR is a word of the form name=value. It is used to describe
the parameters of a boot feature.
@ -4027,10 +4055,9 @@ In APM, 48465300\-0000\-11AA\-AA11\-00306543ECAC will be mapped to partition
type "Apple_HFS", any other to "Data".
.br
If some other command causes the production of GPT, then the appended
partitions will be mentioned there too.
partitions will be mentioned there too. GPT can be forced by
.br
The disk_path must provide the necessary data bytes at commit time.
An empty disk_path disables this feature for the given partition number.
\-boot_image "any" "appended_part_as=gpt"
.br
With SUN Disk Label (selected by \-boot_image any sparc_label=):
.br
@ -4038,8 +4065,20 @@ partition_number may be 2 to 8. Number 1 will always be the ISO image.
Partition start addresses are aligned to 320 KiB. The type_code does not
matter. Submit 0x0.
.br
Partition image name "." causes the partition to become a copy of the next
disk_path "." causes the partition to become a copy of the next
lower valid one.
.br
With MBR, GPT, and SUN alike:
.br
The disk_path must provide the necessary data bytes at commit time.
.br
Issueing \-append_partition with a partition number that was already used in
a previous \-append_partition command does not cause an error but silently
overrides the previous setting.
.br
The pseudo type_code "revoke" or an empty disk_path prevent the partition from
being appended. The pseudo partition number "all" may be used in this case to
revoke all previous \-append_partition settings.
.TP
.B Jigdo Template Extraction:
.PP

View File

@ -74,7 +74,7 @@ struct XorrisO;
*/
#define Xorriso_header_version_majoR 1
#define Xorriso_header_version_minoR 5
#define Xorriso_header_version_micrO 6
#define Xorriso_header_version_micrO 7
/** If needed: Something like ".pl01" to indicate a bug fix. Normally empty.
@ -214,9 +214,13 @@ int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag);
/* Inquire whether option -commit would make sense.
@param xorriso The context object to inquire.
@param flag @since 0.6.6
bit0= do not return 1 if -as mkisofs -print-size was
@param flag bit0= do not return 1 if -as mkisofs -print-size was
performed on the current image.
@since 0.6.6
bit1= issue NOTE if return is 0,
indev and outdev point to different drives,
and no write run has happened
@since 1.5.8
@return 0= -commit would have nothing to do
1= a new image session would emerge at -commit
*/

View File

@ -15,7 +15,7 @@ END-INFO-DIR-ENTRY

File: xorriso.info, Node: Top, Next: Overview, Up: (dir)
GNU xorriso 1.5.6
GNU xorriso 1.5.7
*****************
xorriso - creates, loads, manipulates and writes ISO 9660 filesystem
@ -3038,9 +3038,11 @@ Examples:
*discard* gives up the El Torito boot catalog and its boot images.
regardless whether loaded from an ISO filesystem or defined by
commands. Any BIOS or EFI related boot options get revoked.
Nevertheless, loaded system area data stay valid. If desired, they
have to be erased by
Nevertheless, loaded system area data and the possibly defined
appended partitions stay valid. If desired, they have to be erased
by
-boot_image any system_area=/dev/zero
-append_partition all revoke -
*keep* keeps or copies El Torito boot images unaltered and writes a
new catalog.
*patch* applies patching to existing El Torito boot images if they
@ -3057,17 +3059,32 @@ Examples:
*replay* is a more modern version of "patch", which not only cares
for existing El Torito boot equipment but also for the recognizable
boot provisions in the System Area. It discards any existing
-boot_image setting and executes the commands proposed by command
-report_el_torito "cmd".
-boot_image setting including the system area and executes the
commands proposed by command -report_el_torito "cmd".
This action will only succeed if the file objects mentioned in the
output of command -report_el_torito "cmd" are still available. Do
not remove or rename boot image files after -indev.
Drop unknown El Torito: -boot_image "any" "discard"
Maintain recognizable stuff: -boot_image "any" "replay"
El Torito only for GRUB: -boot_image "grub" "patch"
El Torito only for ISOLINUX: -boot_image "isolinux" "patch"
Out of historical reasons *replay* does not revoke all possibly
made -append_partition settings but only overwrites those for which
the loaded ISO image provides candidates.
*show_status* will print what is known about the loaded boot images
and their designated fate.
Examples:
Drop unknown El Torito:
-boot_image any discard
Drop El Torito, system area, appended partitions:
-boot_image any discard
-boot_image any system_area=/dev/zero
-append_partition all revoke -
Maintain recognizable stuff after revoking possibly made
-append_partition settings to surely get only the partitions from
the loaded ISO:
-append_partition all revoke -
-boot_image any replay
Re-adjust El Torito only for GRUB:
-boot_image grub patch
Re-adjust El Torito only for ISOLINUX:
-boot_image isolinux patch
A *bootspec* is a word of the form name=value. It is used to
describe the parameters of a boot feature. The names "dir",
@ -3400,16 +3417,25 @@ Examples:
48465300-0000-11AA-AA11-00306543ECAC will be mapped to partition
type "Apple_HFS", any other to "Data".
If some other command causes the production of GPT, then the
appended partitions will be mentioned there too.
The disk_path must provide the necessary data bytes at commit time.
An empty disk_path disables this feature for the given partition
number.
appended partitions will be mentioned there too. GPT can be forced
by
-boot_image "any" "appended_part_as=gpt"
With SUN Disk Label (selected by -boot_image any sparc_label=):
partition_number may be 2 to 8. Number 1 will always be the ISO
image. Partition start addresses are aligned to 320 KiB. The
type_code does not matter. Submit 0x0.
Partition image name "." causes the partition to become a copy of
the next lower valid one.
disk_path "." causes the partition to become a copy of the next
lower valid one.
With MBR, GPT, and SUN alike:
The disk_path must provide the necessary data bytes at commit time.
Issueing -append_partition with a partition number that was already
used in a previous -append_partition command does not cause an
error but silently overrides the previous setting.
The pseudo type_code "revoke" or an empty disk_path prevent the
partition from being appended. The pseudo partition number "all"
may be used in this case to revoke all previous -append_partition
settings.

File: xorriso.info, Node: Jigdo, Next: Charset, Prev: Bootable, Up: Commands
@ -5685,7 +5711,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -alter_date sets timestamps in ISO image: Manip. (line 139)
* -alter_date_r sets timestamps in ISO image: Manip. (line 174)
* -append_partition adds arbitrary file after image end: Bootable.
(line 433)
(line 450)
* -application_id sets application id: SetWrite. (line 218)
* -application_use sets application use field: SetWrite. (line 293)
* -as emulates mkisofs or cdrecord: Emulation. (line 13)
@ -5937,12 +5963,12 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* ACL, show in ISO image, -getfacl: Navigate. (line 60)
* ACL, show in ISO image, -getfacl_r: Navigate. (line 66)
* ACL, _definition: Extras. (line 50)
* APM block size: Bootable. (line 424)
* APM block size: Bootable. (line 441)
* APM, _definition: Extras. (line 42)
* Appendable media, _definition: Media. (line 43)
* Appended Filesystem Image, -append_partition: Bootable. (line 433)
* Appended partition, in APM: Bootable. (line 291)
* Appended partition, in MBR or GPT: Bootable. (line 284)
* Appended Filesystem Image, -append_partition: Bootable. (line 450)
* Appended partition, in APM: Bootable. (line 308)
* Appended partition, in MBR or GPT: Bootable. (line 301)
* Automatic execution order, of arguments, -x: ArgSort. (line 16)
* Backslash Interpretation, _definition: Processing. (line 57)
* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 255)
@ -5960,15 +5986,15 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Character set, learn from image, -auto_charset: Loading. (line 117)
* Character Set, of terminal, -local_charset: Charset. (line 57)
* Character Set, _definition: Charset. (line 6)
* CHRP partition, _definition: Bootable. (line 296)
* CHRP partition, _definition: Bootable. (line 313)
* Closed media, _definition: Media. (line 49)
* Comment, #: Scripting. (line 156)
* Control, signal handling, -signal_handling: Exception. (line 66)
* Create, new ISO image, _definition: Methods. (line 7)
* Cylinder alignment, _definition: Bootable. (line 340)
* Cylinder size, _definition: Bootable. (line 325)
* Cylinder alignment, _definition: Bootable. (line 357)
* Cylinder size, _definition: Bootable. (line 342)
* Damaged track and session, close, -close_damaged: Writing. (line 209)
* DEC Alpha SRM boot sector, production: Bootable. (line 410)
* DEC Alpha SRM boot sector, production: Bootable. (line 427)
* Delete, from ISO image, -rm: Manip. (line 20)
* Delete, from ISO image, -rm_r: Manip. (line 26)
* Delete, ISO directory, -rmdir: Manip. (line 29)
@ -6000,7 +6026,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Drive, _definition: Drives. (line 6)
* EA, _definition: Extras. (line 66)
* ECMA-119, _definition: Model. (line 6)
* EFI system partition, _definition: Bootable. (line 305)
* EFI system partition, _definition: Bootable. (line 322)
* El Torito, _definition: Extras. (line 19)
* Emulation, -as: Emulation. (line 13)
* Emulation, .mkisofsrc, -read_mkisofsrc: Emulation. (line 155)
@ -6025,19 +6051,19 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Filter, _definition: Filter. (line 6)
* Frontend program, start at pipes, -launch_frontend: Frontend.
(line 141)
* GPT Legacy BIOS bootable flag, set for ISO: Bootable. (line 362)
* GPT read-only flag, do not set for ISO: Bootable. (line 367)
* GPT, control GUID, -boot_image gpt_disk_guid=: Bootable. (line 225)
* GPT Legacy BIOS bootable flag, set for ISO: Bootable. (line 379)
* GPT read-only flag, do not set for ISO: Bootable. (line 384)
* GPT, control GUID, -boot_image gpt_disk_guid=: Bootable. (line 242)
* GPT, _definition: Extras. (line 39)
* Group, global in ISO image, -gid: SetWrite. (line 314)
* Group, in ISO image, -chgrp: Manip. (line 49)
* Group, in ISO image, -chgrp_r: Manip. (line 53)
* Growing, _definition: Methods. (line 20)
* Hard links, control handling, -hardlinks: Loading. (line 128)
* HFS+ allocation block size: Bootable. (line 421)
* HFS+ serial number: Bootable. (line 418)
* HFS+ allocation block size: Bootable. (line 438)
* HFS+ serial number: Bootable. (line 435)
* hidden, set in ISO image, -hide: Manip. (line 177)
* HP-PA boot sector, production: Bootable. (line 393)
* HP-PA boot sector, production: Bootable. (line 410)
* Image reading, cache size, -data_cache_size: Loading. (line 361)
* Image, demand volume ID, -assert_volid: Loading. (line 105)
* Image, discard pending changes, -rollback: Writing. (line 9)
@ -6094,15 +6120,15 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Linux device type, -scsi_dev_family: AqDrive. (line 95)
* List delimiter, _definition: Processing. (line 13)
* Local Character Set, _definition: Charset. (line 11)
* MBR bootable/active flag, enforce: Bootable. (line 351)
* MBR, set, -boot_image system_area=: Bootable. (line 200)
* MBR bootable/active flag, enforce: Bootable. (line 368)
* MBR, set, -boot_image system_area=: Bootable. (line 217)
* MBR, _definition: Extras. (line 27)
* MD5, control handling, -md5: Loading. (line 183)
* Media, erase, -blank: Writing. (line 57)
* Media, format, -format: Writing. (line 87)
* Media, list formats, -list_formats: Writing. (line 128)
* Media, list write speeds, -list_speeds: Writing. (line 139)
* MIPS boot file, activation: Bootable. (line 372)
* MIPS boot file, activation: Bootable. (line 389)
* mkisofs, Emulation: Emulation. (line 17)
* Modifying, _definition: Methods. (line 28)
* Multi-session media, _definition: Media. (line 7)
@ -6130,15 +6156,15 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Ownership, global in ISO image, -uid: SetWrite. (line 311)
* Ownership, in ISO image, -chown: Manip. (line 43)
* Ownership, in ISO image, -chown_r: Manip. (line 47)
* Partition offset, _definition: Bootable. (line 315)
* Partition table, _definition: Bootable. (line 265)
* Partition offset, _definition: Bootable. (line 332)
* Partition table, _definition: Bootable. (line 282)
* Pathspec, _definition: SetInsert. (line 125)
* Pattern expansion, for disk paths, -disk_pattern: Insert. (line 34)
* Pattern expansion, for ISO paths, -iso_rr_pattern: Manip. (line 10)
* Pattern expansion, _definition: Processing. (line 29)
* Permissions, in ISO image, -chmod: Manip. (line 55)
* Permissions, in ISO image, -chmod_r: Manip. (line 66)
* PReP partition, _definition: Bootable. (line 300)
* PReP partition, _definition: Bootable. (line 317)
* Problems, reporting: Bugreport. (line 6)
* Process, consolidate text output, -pkt_output: Frontend. (line 7)
* Process, control abort on error, -abort_on: Exception. (line 27)
@ -6200,10 +6226,10 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Session, select as input, -load: Loading. (line 54)
* Session, _definition: Model. (line 6)
* Sorting order, for -x, -list_arg_sorting: ArgSort. (line 26)
* SUN Disk Label, production: Bootable. (line 383)
* SUN SPARC boot images, activation: Bootable. (line 464)
* SUN Disk Label, production: Bootable. (line 400)
* SUN SPARC boot images, activation: Bootable. (line 480)
* Symbolic link, create, -lns: Insert. (line 191)
* System area, _definition: Bootable. (line 200)
* System area, _definition: Bootable. (line 217)
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 307)
* Table-of-content, show, -toc: Inquiry. (line 27)
* Timestamps, set in ISO image, -alter_date: Manip. (line 139)
@ -6271,40 +6297,40 @@ Node: Filter110498
Node: Writing115120
Node: SetWrite127614
Node: Bootable158889
Node: Jigdo186770
Node: Charset191773
Node: Exception195102
Node: DialogCtl201231
Node: Inquiry203833
Node: Navigate215091
Node: Verify223798
Node: Restore234947
Node: Emulation247155
Node: Scripting257611
Node: Frontend265394
Node: Examples275020
Node: ExDevices276198
Node: ExCreate276859
Node: ExDialog278159
Node: ExGrowing279430
Node: ExModifying280239
Node: ExBootable280749
Node: ExCharset281304
Node: ExPseudo282200
Node: ExCdrecord283127
Node: ExMkisofs283447
Node: ExGrowisofs285344
Node: ExException286497
Node: ExTime286955
Node: ExIncBackup287413
Node: ExRestore291439
Node: ExRecovery292385
Node: Files292957
Node: Environ294291
Node: Seealso295039
Node: Bugreport295756
Node: Legal296347
Node: CommandIdx297359
Node: ConceptIdx315257
Node: Jigdo187867
Node: Charset192870
Node: Exception196199
Node: DialogCtl202328
Node: Inquiry204930
Node: Navigate216188
Node: Verify224895
Node: Restore236044
Node: Emulation248252
Node: Scripting258708
Node: Frontend266491
Node: Examples276117
Node: ExDevices277295
Node: ExCreate277956
Node: ExDialog279256
Node: ExGrowing280527
Node: ExModifying281336
Node: ExBootable281846
Node: ExCharset282401
Node: ExPseudo283297
Node: ExCdrecord284224
Node: ExMkisofs284544
Node: ExGrowisofs286441
Node: ExException287594
Node: ExTime288052
Node: ExIncBackup288510
Node: ExRestore292536
Node: ExRecovery293482
Node: Files294054
Node: Environ295388
Node: Seealso296136
Node: Bugreport296853
Node: Legal297444
Node: CommandIdx298456
Node: ConceptIdx316354

End Tag Table

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename xorriso.info
@settitle GNU xorriso 1.5.6
@settitle GNU xorriso 1.5.7
@c %**end of header
@c
@c man-ignore-lines begin
@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO 1 "Version 1.5.6, Jun 07, 2023"
@c man .TH XORRISO 1 "Version 1.5.7, Aug 07, 2023"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -77,7 +77,7 @@ Permission is granted to distribute this text freely.
@end copying
@c man-ignore-lines end
@titlepage
@title Manual of GNU xorriso 1.5.6
@title Manual of GNU xorriso 1.5.7
@author Thomas Schmitt
@page
@vskip 0pt plus 1filll
@ -86,7 +86,7 @@ Permission is granted to distribute this text freely.
@contents
@ifnottex
@node Top
@top GNU xorriso 1.5.6
@top GNU xorriso 1.5.7
@c man-ignore-lines 1
@c man .SH NAME
@ -4145,10 +4145,12 @@ and to write the loaded system area content without alterations.
@strong{discard} gives up the El Torito boot catalog and its boot images.
regardless whether loaded from an ISO filesystem or defined by commands.
Any BIOS or EFI related boot options get revoked.
Nevertheless, loaded system area data stay valid. If desired, they have to be
erased by
Nevertheless, loaded system area data and the possibly defined appended
partitions stay valid. If desired, they have to be erased by
@*
-boot_image any system_area=/dev/zero
@*
-append_partition all revoke -
@*
@strong{keep} keeps or copies El Torito boot images unaltered and writes a new catalog.
@*
@ -4169,23 +4171,49 @@ you do know that the images need no patching, use "any" "keep".
@strong{replay} is a more modern version of "patch", which not only cares
for existing El Torito boot equipment but also for the recognizable
boot provisions in the System Area. It discards any existing -boot_image
setting and executes the commands proposed by command -report_el_torito "cmd".
setting including the system area and executes the commands proposed by
command -report_el_torito "cmd".
@*
This action will only succeed if the file objects mentioned in the
output of command -report_el_torito "cmd" are still available. Do not
remove or rename boot image files after -indev.
@*
Drop unknown El Torito: -boot_image "any" "discard"
@*
Maintain recognizable stuff: -boot_image "any" "replay"
@*
El Torito only for GRUB: -boot_image "grub" "patch"
@*
El Torito only for ISOLINUX: -boot_image "isolinux" "patch"
Out of historical reasons @strong{replay} does not revoke all possibly made
-append_partition settings but only overwrites those for which the loaded
ISO image provides candidates.
@*
@strong{show_status} will print what is known about the loaded boot images
and their designated fate.
@*
Examples:
@*
Drop unknown El Torito:
@*
-boot_image any discard
@*
Drop El Torito, system area, appended partitions:
@*
-boot_image any discard
@*
-boot_image any system_area=/dev/zero
@*
-append_partition all revoke -
@*
Maintain recognizable stuff after revoking possibly made -append_partition
settings to surely get only the partitions from the loaded ISO:
@*
-append_partition all revoke -
@*
-boot_image any replay
@*
Re-adjust El Torito only for GRUB:
@*
-boot_image grub patch
@*
Re-adjust El Torito only for ISOLINUX:
@*
-boot_image isolinux patch
@*
@sp 1
A @strong{bootspec} is a word of the form name=value. It is used to describe
@ -4609,10 +4637,9 @@ In APM, 48465300-0000-11AA-AA11-00306543ECAC will be mapped to partition
type "Apple_HFS", any other to "Data".
@*
If some other command causes the production of GPT, then the appended
partitions will be mentioned there too.
partitions will be mentioned there too. GPT can be forced by
@*
The disk_path must provide the necessary data bytes at commit time.
An empty disk_path disables this feature for the given partition number.
-boot_image "any" "appended_part_as=gpt"
@*
@cindex SUN SPARC boot images, activation
With SUN Disk Label (selected by -boot_image any sparc_label=):
@ -4621,8 +4648,20 @@ partition_number may be 2 to 8. Number 1 will always be the ISO image.
Partition start addresses are aligned to 320 KiB. The type_code does not
matter. Submit 0x0.
@*
Partition image name "." causes the partition to become a copy of the next
disk_path "." causes the partition to become a copy of the next
lower valid one.
@*
With MBR, GPT, and SUN alike:
@*
The disk_path must provide the necessary data bytes at commit time.
@*
Issueing -append_partition with a partition number that was already used in
a previous -append_partition command does not cause an error but silently
overrides the previous setting.
@*
The pseudo type_code "revoke" or an empty disk_path prevent the partition from
being appended. The pseudo partition number "all" may be used in this case to
revoke all previous -append_partition settings.
@end table
@c man .TP
@c man .B Jigdo Template Extraction:

View File

@ -507,23 +507,23 @@ files or trees to disk:
<P>
<DL>
<DT><H3>Download as source code (see README):</H3></DT>
<DD><A HREF="xorriso-1.5.6.tar.gz">xorriso-1.5.6.tar.gz</A>
<DD><A HREF="xorriso-1.5.6.pl02.tar.gz">xorriso-1.5.6.pl02.tar.gz</A>
(2780 KiB).
</DD>
<DD>(Released 07 Jun 2023)</DD>
<DD><A HREF="xorriso-1.5.6.tar.gz.sig">xorriso-1.5.6.tar.gz.sig</A></DD>
<DD>(Released 14 Jun 2023)</DD>
<DD><A HREF="xorriso-1.5.6.pl02.tar.gz.sig">xorriso-1.5.6.pl02.tar.gz.sig</A></DD>
<DD>
(detached GPG signature for verification by either
<BR>
<KBD>wget https://ftp.gnu.org/gnu/gnu-keyring.gpg</KBD>
<BR>
<KBD>gpg --with-fingerprint --keyring ./gnu-keyring.gpg --verify xorriso-1.5.6.tar.gz.sig</KBD>
<KBD>gpg --with-fingerprint --keyring ./gnu-keyring.gpg --verify xorriso-1.5.6.pl02.tar.gz.sig</KBD>
<BR>
or
<BR>
<KBD>gpg --keyserver keyserver.ubuntu.com --recv-keys ABC0A854</KBD>
<BR>
<KBD>gpg --with-fingerprint --verify xorriso-1.5.6.tar.gz.sig</KBD>
<KBD>gpg --with-fingerprint --verify xorriso-1.5.6.pl02.tar.gz.sig</KBD>
<BR>
Both should confirm
<BR>
@ -538,7 +538,7 @@ Primary key fingerprint: 44BC 9FD0 D688 EB00 7C4D D029 E9CB DFC0 ABC0 A854
<DD>
Also on <A HREF="http://www.gnu.org/prep/ftp.html">
mirrors of ftp://ftp.gnu.org/gnu/ </A>
as xorriso/xorriso-1.5.6.tar.gz
as xorriso/xorriso-1.5.6.pl02.tar.gz
</DD>
</DL>
</DD>
@ -628,6 +628,16 @@ unrecognized content (pseudo-closed)
</UL>
</P>
<P>
Bug fixes towards deprecated version xorriso-1.5.6:
<UL>
<LI>
On non-GNU/Linux systems ssize_t was not defined in libisofs file
rockridge.h . Report and fix proposal by Rui Chen.
</LI>
</UL>
</P>
<P>
Enhancements towards previous stable version xorriso-1.5.4.pl02:
<UL>
@ -716,7 +726,15 @@ cdrecord and mkisofs.</DT>
<DT><H3>Development snapshot, version 1.5.7 :</H3></DT>
<DD>Bug fixes towards stable version 1.5.6:
<UL>
<LI>- none yet -</LI>
<LI>
On non-GNU/Linux systems ssize_t was not defined in libisofs file
rockridge.h . Report and fix proposal by Rui Chen.
</LI>
<LI>
-boot_image and -append_partition were not perceived as image
manipulation which makes production of an ISO image worthwhile.
Thanks Cameron Seader.
</LI>
<!--
<LI>- none yet -</LI>
-->
@ -724,7 +742,16 @@ cdrecord and mkisofs.</DT>
</DD>
<DD>Enhancements towards stable version 1.5.6:
<UL>
<LI>- none yet -</LI>
<LI>
New -append_partition pseudo partition_number "all" and
pseudo type_code "revoke"
</LI>
<LI>
New -as mkisofs options -cut_out and -hide_iso_path
</LI>
<LI>
Improved handling of hidden boot images in -boot_image cmd/as_mkisofs/replay
</LI>
<!--
<LI>- none yet -</LI>
-->

View File

@ -111,7 +111,7 @@
*/
#define Xorriso_req_majoR 1
#define Xorriso_req_minoR 5
#define Xorriso_req_micrO 6
#define Xorriso_req_micrO 7
static void yell_xorriso()
@ -276,7 +276,7 @@ int main(int argc, char **argv)
end_successfully:; /* normal shutdown, including eventual -commit */
Xorriso_stop_msg_watcher(xorriso, 1);
Xorriso_process_msg_queues(xorriso, 0);
if(Xorriso_change_is_pending(xorriso, 1))
if(Xorriso_change_is_pending(xorriso, 1 | 2))
Xorriso_option_end(xorriso, 2);
Xorriso_process_msg_queues(xorriso, 0);
ret= Xorriso_make_return_value(xorriso, 0);

View File

@ -2,7 +2,7 @@
/* Command line oriented batch and dialog tool which creates, loads,
manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -270,8 +270,8 @@ struct XorrisO { /* the global context of xorriso */
char application_use[SfileadrL];
char session_logfile[SfileadrL];
int session_lba;
int session_blocks;
off_t session_lba;
off_t session_blocks;
/* >>> put libburn/isoburn aspects here */
@ -357,6 +357,11 @@ struct XorrisO { /* the global context of xorriso */
3= change pending, but the attempt to write it
failed
*/
int commit_attempts; /* For Xorriso_change_is_pending bit1 */
int print_size_attempts; /* For Xorriso_change_is_pending bit1 */
int write_session_counter; /* For Xorriso_change_is_pending bit1 */
int print_size_counter; /* For Xorriso_change_is_pending bit1 */
int no_volset_present; /* set to 1 on first failure */
struct CheckmediajoB *check_media_default;
@ -375,10 +380,10 @@ struct XorrisO { /* the global context of xorriso */
char outdev_off_adr[SfileadrL]; /* Result of burn_drive_convert_fs_adr(outdev)
when outdev gets acquired. */
int grow_blindly_msc2; /* if >= 0 this causes growing from drive to drive.
The value is used as block address offset for
image generation. Like in: mkisofs -C msc1,msc2
*/
off_t grow_blindly_msc2; /* if >= 0 this causes growing from drive to drive.
The value is used as block address offset for
image generation. Like in: mkisofs -C msc1,msc2
*/
int ban_stdio_write;
int do_dummy;
@ -617,7 +622,7 @@ struct XorrisO { /* the global context of xorriso */
*/
/* LBA of boot image after image loading */
int loaded_boot_bin_lba;
off_t loaded_boot_bin_lba;
/* Path of the catalog node after image loading */
char loaded_boot_cat_path[SfileadrL];

View File

@ -1 +1 @@
#define Xorriso_timestamP "2023.06.07.180001"
#define Xorriso_timestamP "2024.04.27.165316"

View File

@ -4,7 +4,7 @@
a command line oriented batch and dialog tool which creates, loads,
manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -19,7 +19,7 @@
*/
#define xorriso_libisoburn_req_major 1
#define xorriso_libisoburn_req_minor 5
#define xorriso_libisoburn_req_micro 6
#define xorriso_libisoburn_req_micro 7
struct SpotlisT; /* List of intervals with different read qualities */
@ -43,7 +43,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag);
int Xorriso_write_session(struct XorrisO *xorriso, int flag);
off_t Xorriso_write_session(struct XorrisO *xorriso, int flag);
int Xorriso_retry_write_session(struct XorrisO *xorriso, int flag);
@ -76,7 +76,7 @@ int Xorriso_show_boot_info(struct XorrisO *xorriso, int flag);
int Xorriso_show_devices(struct XorrisO *xorriso, int flag);
int Xorriso_tell_media_space(struct XorrisO *xorriso,
int *media_space, int *free_space, int flag);
off_t *media_space, off_t *free_space, int flag);
/* @param flag bit0=fast , bit1=deformat
@return 0=failure, did not touch medium , -1=failure, altered medium
@ -328,7 +328,8 @@ int Xorriso_libburn_adr(struct XorrisO *xorriso, char *address_string,
/* @param flag bit1= obtain info from outdev
*/
int Xorriso_msinfo(struct XorrisO *xorriso, int *msc1, int *msc2, int flag);
int Xorriso_msinfo(struct XorrisO *xorriso, off_t *msc1, off_t *msc2,
int flag);
/*
@param flag bit0= obtain iso_lba from indev
@ -336,7 +337,8 @@ int Xorriso_msinfo(struct XorrisO *xorriso, int *msc1, int *msc2, int flag);
bit2= issue message about success
bit3= check whether source blocks are banned by in_sector_map
*/
int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
int Xorriso_update_iso_lba0(struct XorrisO *xorriso,
off_t iso_lba, off_t isosize,
char *head_buffer, struct CheckmediajoB *job,
int flag);
@ -673,7 +675,7 @@ int Xorriso_make_guid(struct XorrisO *xorriso, char *line, int flag);
int Xorriso_set_libisofs_now(struct XorrisO *xorriso, int flag);
int Xorriso_obtain_indev_readsize(struct XorrisO *xorriso, uint32_t *blocks,
int Xorriso_obtain_indev_readsize(struct XorrisO *xorriso, off_t *blocks,
int flag);
int Xorriso_assess_written_features(struct XorrisO *xorriso, char *mode,

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH XORRISOFS 1 "Version 1.5.6, Jun 07, 2023"
.TH XORRISOFS 1 "Version 1.5.7, Nov 12, 2023"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -224,6 +224,19 @@ enclose whitespace and make it part of pathspecs. Each mark
type can enclose the marks of the other type. A trailing backslash \\ outside
quotations or an open quotation cause the next input line to be appended.
.TP
\fB\-cut_out\fR disk_path byte_offset byte_count iso_rr_path
Map a byte interval of a regular disk file or of a device file into a regular
file in the ISO image. The file depicted by disk_path has to support random
read access.
.br
byte_offset and byte_count may be plain numbers counting bytes, or numbers
with appended letter "d", "s", "k", "m", "g" to count disk blocks (512 bytes),
disc sectors (2048 bytes), KiB (1024 bytes), MiB (1024 KiB), or GiB (1024 MiB).
.br
E.g:
.br
\-cut_out bootable.iso 562s 18s /formerly_hidden_boot_image
.TP
\fB\-f\fR
.br
Resolve symbolic links on disk rather than storing them as symbolic
@ -856,6 +869,22 @@ if their disk_path matches the given shell parser pattern.
Perform \-hide\-hfsplus using each line out of file disk_path as argument
disk_path_pattern.
.TP
\fB\-hide_iso_path\fR hide_state iso_rr_path
Prevent the name of the given file from showing up in the directory trees
of ISO 9660 and/or Joliet and/or HFS+ when the image gets written.
Other than the above hide options, this one takes the path of a file
in the emerging ISO filesystem, not the path of a file on hard disk.
.br
Possible values of hide_state are: "iso_rr" for hiding from ISO 9660 tree,
"joliet" for Joliet tree, "hfsplus" for HFS+, "on" for them all.
"off" means visibility in all directory trees.
.br
These values may be combined.
E.g.: joliet:hfsplus
.br
This command does not apply to the boot catalog.
Rather use: boot\-catalog\-hide
.TP
.B ISO image ID strings:
.PP
The following strings and file addresses get stored in the Primary Volume

View File

@ -14,7 +14,7 @@ END-INFO-DIR-ENTRY

File: xorrisofs.info, Node: Top, Next: Overview, Up: (dir)
xorrisofs 1.5.6
xorrisofs 1.5.7
***************
xorrisofs - Emulation of ISO 9660 program mkisofs by program xorriso
@ -236,6 +236,16 @@ File: xorrisofs.info, Node: SetInsert, Next: SetProduct, Prev: Loading, Up:
mark type can enclose the marks of the other type. A trailing
backslash \ outside quotations or an open quotation cause the next
input line to be appended.
-cut_out disk_path byte_offset byte_count iso_rr_path
Map a byte interval of a regular disk file or of a device file into
a regular file in the ISO image. The file depicted by disk_path
has to support random read access.
byte_offset and byte_count may be plain numbers counting bytes, or
numbers with appended letter "d", "s", "k", "m", "g" to count disk
blocks (512 bytes), disc sectors (2048 bytes), KiB (1024 bytes),
MiB (1024 KiB), or GiB (1024 MiB).
E.g:
-cut_out bootable.iso 562s 18s /formerly_hidden_boot_image
-f
Resolve symbolic links on disk rather than storing them as symbolic
@ -770,6 +780,18 @@ File: xorrisofs.info, Node: SetHide, Next: ImageId, Prev: SetExtras, Up: Opt
-hide-hfsplus-list disk_path
Perform -hide-hfsplus using each line out of file disk_path as
argument disk_path_pattern.
-hide_iso_path hide_state iso_rr_path
Prevent the name of the given file from showing up in the directory
trees of ISO 9660 and/or Joliet and/or HFS+ when the image gets
written. Other than the above hide options, this one takes the
path of a file in the emerging ISO filesystem, not the path of a
file on hard disk.
Possible values of hide_state are: "iso_rr" for hiding from ISO
9660 tree, "joliet" for Joliet tree, "hfsplus" for HFS+, "on" for
them all. "off" means visibility in all directory trees.
These values may be combined. E.g.: joliet:hfsplus
This command does not apply to the boot catalog. Rather use:
boot-catalog-hide

File: xorrisofs.info, Node: ImageId, Next: Bootable, Prev: SetHide, Up: Options
@ -2030,10 +2052,10 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* --old-empty old block addresses for empty files: SetProduct.
(line 105)
* --old-root-devno enable disk idevno with -old-root: SetInsert.
(line 104)
(line 114)
* --old-root-no-ino disable disk ino with -old-root: SetInsert.
(line 93)
* --old-root-no-md5 disable MD5 with -old-root: SetInsert. (line 111)
(line 103)
* --old-root-no-md5 disable MD5 with -old-root: SetInsert. (line 121)
* --protective-msdos-label Patch System Area partition table: SystemArea.
(line 143)
* --quoted_path_list read pathspecs from disk file: SetInsert.
@ -2050,11 +2072,11 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* --xattr Recording of any xattr: SetExtras. (line 116)
* --xattr Recording of user xattr: SetExtras. (line 109)
* --zisofs-version-2 enable recognition of zisofs2 files: SetInsert.
(line 55)
(line 65)
* --zisofs2-susp-z2 produce Z2 for version 2 instead of ZF: SetInsert.
(line 66)
(line 76)
* --zisofs2-susp-zf produce ZF for version 2 instead of Z2: SetInsert.
(line 70)
(line 80)
* -A set Application Id: ImageId. (line 34)
* -abstract set Abstract File path: ImageId. (line 57)
* -allow-lowercase lowercase in ISO file names: SetCompl. (line 42)
@ -2082,6 +2104,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -chrp-boot CHRP partition: SystemArea. (line 282)
* -chrp-boot-part CHRP partition: SystemArea. (line 273)
* -copyright set Copyright File path: ImageId. (line 66)
* -cut_out insert piece of data file or device: SetInsert. (line 22)
* -D allow deep directory hierarchies: SetExtras. (line 60)
* -d omit trailing dot in ISO file names: SetCompl. (line 50)
* -dev set path for loading existing ISO image: Loading. (line 23)
@ -2099,18 +2122,18 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -eltorito-platform El Torito Platform Id: Bootable. (line 63)
* -eltorito-selcrit El Torito boot selection criteria: Bootable.
(line 100)
* -exclude exclude disk files from inserting: SetInsert. (line 37)
* -exclude-list exclude disk files from inserting: SetInsert. (line 44)
* -f follow symbolic links on disk: SetInsert. (line 22)
* -exclude exclude disk files from inserting: SetInsert. (line 47)
* -exclude-list exclude disk files from inserting: SetInsert. (line 54)
* -f follow symbolic links on disk: SetInsert. (line 32)
* -file-mode permissions for all data files: SetProduct. (line 92)
* -file_name_limit curbs length of file names: SetExtras. (line 49)
* -follow-links follow symbolic links on disk: SetInsert. (line 26)
* -follow-links follow symbolic links on disk: SetInsert. (line 36)
* -full-iso9660-filenames allow 31 characters in ISO file names: SetCompl.
(line 59)
* -G Fill System Area e.g. by MBR: SystemArea. (line 68)
* -generic-boot Fill System Area e.g. by MBR: SystemArea. (line 77)
* -gid group assignment for all files: SetProduct. (line 83)
* -graft-points enable target=source pathspecs: SetInsert. (line 28)
* -graft-points enable target=source pathspecs: SetInsert. (line 38)
* -gui increase frequency of pacifier messages: Miscellaneous.
(line 29)
* -hard-disk-boot El Torito boot image emulation: Bootable. (line 83)
@ -2137,6 +2160,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
(line 15)
* -hide-rr-moved set deep directory relocation target: SetExtras.
(line 90)
* -hide_iso_path keep a file invisible in ISO tree: SetHide. (line 31)
* -hppa-bootloader HP-PA bootloader file: SystemArea. (line 327)
* -hppa-cmdline HP-PA PALO command line: SystemArea. (line 321)
* -hppa-hdrversion HP-PA PALO header version: SystemArea. (line 335)
@ -2174,7 +2198,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -joliet-utf16 use UTF-16 with Joliet names: SetExtras. (line 159)
* -l allow 31 characters in ISO file names: SetCompl. (line 56)
* -log-file redirect stderr messages: Miscellaneous. (line 33)
* -m exclude disk files from inserting: SetInsert. (line 31)
* -m exclude disk files from inserting: SetInsert. (line 41)
* -M set path for loading existing ISO image: Loading. (line 11)
* -max-iso9660-filenames allow 37 characters in ISO file names: SetCompl.
(line 61)
@ -2185,8 +2209,8 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -no-emul-boot El Torito boot image emulation: Bootable. (line 86)
* -no-pad do not add zeros to ISO tree: SetProduct. (line 101)
* -o set output file address: SetProduct. (line 8)
* -old-exclude exclude disk files from inserting: SetInsert. (line 42)
* -old-root enable incremental insertion: SetInsert. (line 80)
* -old-exclude exclude disk files from inserting: SetInsert. (line 52)
* -old-root enable incremental insertion: SetInsert. (line 90)
* -omit-period omit trailing dot in ISO file names: SetCompl. (line 54)
* -omit-version-number omit version number in ISO file names: SetCompl.
(line 69)
@ -2218,14 +2242,14 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -relaxed-filenames 7-bit special characters in ISO file names: SetCompl.
(line 45)
* -rock Rock Ridge (is enabled by default): SetExtras. (line 13)
* -root redirect ISO root directory: SetInsert. (line 75)
* -root redirect ISO root directory: SetInsert. (line 85)
* -rr_reloc_dir set deep directory relocation target: SetExtras.
(line 74)
* -sparc-boot SUN SPARC boot images: SystemArea. (line 311)
* -sparc-label SUN Disk Label text: SystemArea. (line 313)
* -sysid set System Id: ImageId. (line 43)
* -transparent-compression enable recognition of zisofs files: SetInsert.
(line 53)
(line 63)
* -U very relaxed filename rules: SetCompl. (line 27)
* -uid ownership for all files: SetProduct. (line 79)
* -untranslated-filenames very relaxed filename rules: SetCompl.
@ -2237,8 +2261,8 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -version report program version: Miscellaneous. (line 43)
* -volid set Volume Id: ImageId. (line 23)
* -volset set Volume Set Id: ImageId. (line 25)
* -x exclude disk files from inserting: SetInsert. (line 39)
* -z enable recognition of zisofs files: SetInsert. (line 47)
* -x exclude disk files from inserting: SetInsert. (line 49)
* -z enable recognition of zisofs files: SetInsert. (line 57)

File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
@ -2338,9 +2362,9 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
(line 90)
* Deep directories, relocation target, -rr_reloc_dir: SetExtras.
(line 74)
* Disk files, exclude, -hide-list: SetInsert. (line 44)
* Disk files, exclude, -exclude-list: SetInsert. (line 54)
* Disk files, exclude, -m, -exclude, -x, -old-exclude: SetInsert.
(line 31)
(line 41)
* Disk GUID, for GPT, --gpt_disk_guid: SystemArea. (line 260)
* disk_path, _definition: Insert. (line 7)
* ECMA-119, _definition: Standards. (line 6)
@ -2362,6 +2386,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
(line 208)
* HFS+, set serial number: SetExtras. (line 193)
* HFS+, _definition: Standards. (line 32)
* Hiding, by ISO RR path, -hide_iso_path: SetHide. (line 31)
* Hiding, from HFS+, -hide-hfsplus: SetHide. (line 25)
* Hiding, from HFS+, -hide-hfsplus-list: SetHide. (line 28)
* Hiding, from ISO and Rock Ridge, -hide: SetHide. (line 8)
@ -2370,12 +2395,13 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Hiding, from Joliet, -hide-joliet-list: SetHide. (line 22)
* Image size, alignment, -partition_cyl_align: SystemArea. (line 197)
* Incremental insertion, disable disk ino, --old-root-no-ino: SetInsert.
(line 93)
(line 103)
* Incremental insertion, disable MD5, --old-root-no-md5: SetInsert.
(line 111)
(line 121)
* Incremental insertion, enable disk devno, --old-root-devno: SetInsert.
(line 104)
* Incremental insertion, enable, -old-root: SetInsert. (line 80)
(line 114)
* Incremental insertion, enable, -old-root: SetInsert. (line 90)
* Insert, piece of data file or device, -cut_out: SetInsert. (line 22)
* Interval reader for system area and partitions: SystemArea. (line 24)
* ISO 9660, _definition: Standards. (line 6)
* ISO 9660:1999, _definition: Standards. (line 26)
@ -2403,7 +2429,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
(line 23)
* ISO level, specify, -iso-level: SetCompl. (line 7)
* ISO level, specify, -iso-level <1>: SetCompl. (line 8)
* ISO root directory, redirect, -root: SetInsert. (line 75)
* ISO root directory, redirect, -root: SetInsert. (line 85)
* iso_rr_path, _definition: Insert. (line 8)
* Jigdo Template Extraction, -checksum-list: Jigdo. (line 77)
* Jigdo Template Extraction, -checksum_algorithm_iso: Jigdo. (line 86)
@ -2424,7 +2450,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Joliet, allows longer names, -joliet-long: SetExtras. (line 153)
* Joliet, enable, -J, -joliet: SetExtras. (line 147)
* Joliet, _definition: Standards. (line 21)
* Links, follow on disk, -f, -follow-links: SetInsert. (line 22)
* Links, follow on disk, -f, -follow-links: SetInsert. (line 32)
* Links, record and load hard links, --hardlinks: SetExtras. (line 130)
* MBR, GPT, append partition, -append_partition: SystemArea. (line 208)
* MBR, sectors per head, -partition_sec_hd: SystemArea. (line 180)
@ -2442,7 +2468,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Padding, 300 KiB, -pad: SetProduct. (line 94)
* Padding, disable, --old-empty: SetProduct. (line 105)
* Padding, disable, -no-pad: SetProduct. (line 101)
* pathspec, enable target=source, -graft-points: SetInsert. (line 28)
* pathspec, enable target=source, -graft-points: SetInsert. (line 38)
* pathspec, read list of, --quoted_path_list: SetInsert. (line 12)
* pathspec, read list of, -path-list: SetInsert. (line 8)
* pathspec, _definition: Insert. (line 11)
@ -2475,13 +2501,13 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* xorriso, mkisofs emulation: Xorriso. (line 6)
* xorriso, options: Options. (line 6)
* Z2 instead of ZF for version 2, -zisofs2-susp-z2: SetInsert.
(line 66)
(line 76)
* ZF instead of Z2 for version 2, -zisofs2-susp-zf: SetInsert.
(line 70)
(line 80)
* zisofs file, enable recognition, -z, -transparent-compression: SetInsert.
(line 47)
(line 57)
* zisofs2 file, enable recognition, -zisofs-version-2: SetInsert.
(line 55)
(line 65)

@ -2494,30 +2520,30 @@ Node: Xorriso5616
Node: Options6762
Node: Loading7489
Node: SetInsert9530
Node: SetProduct14900
Node: SetCompl20471
Node: SetExtras23063
Node: SetHide34672
Node: ImageId35976
Node: Bootable40258
Node: SystemArea46544
Node: Charset65603
Node: Jigdo66628
Node: Miscellaneous71598
Node: Examples73243
Node: ExSimple73737
Node: ExGraft74220
Node: ExMkisofs75520
Node: ExGrowisofs77328
Node: ExIncBackup78518
Node: ExIncBckAcc81694
Node: ExBootable83399
Node: Files87581
Node: Environ88676
Node: Seealso89549
Node: Bugreport90200
Node: Legal90793
Node: CommandIdx91690
Node: ConceptIdx108682
Node: SetProduct15465
Node: SetCompl21036
Node: SetExtras23628
Node: SetHide35237
Node: ImageId37234
Node: Bootable41516
Node: SystemArea47802
Node: Charset66861
Node: Jigdo67886
Node: Miscellaneous72856
Node: Examples74501
Node: ExSimple74995
Node: ExGraft75478
Node: ExMkisofs76778
Node: ExGrowisofs78586
Node: ExIncBackup79776
Node: ExIncBckAcc82952
Node: ExBootable84657
Node: Files88839
Node: Environ89934
Node: Seealso90807
Node: Bugreport91458
Node: Legal92051
Node: CommandIdx92948
Node: ConceptIdx110086

End Tag Table

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename xorrisofs.info
@settitle GNU xorrisofs 1.5.6
@settitle GNU xorrisofs 1.5.7
@c %**end of header
@c
@c man-ignore-lines begin
@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISOFS 1 "Version 1.5.6, Jun 07, 2023"
@c man .TH XORRISOFS 1 "Version 1.5.7, Nov 12, 2023"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -76,7 +76,7 @@ Permission is granted to distribute this text freely.
@end copying
@c man-ignore-lines end
@titlepage
@title Manual of GNU xorriso personality xorrisofs 1.5.6
@title Manual of GNU xorriso personality xorrisofs 1.5.7
@author Thomas Schmitt
@page
@vskip 0pt plus 1filll
@ -85,7 +85,7 @@ Permission is granted to distribute this text freely.
@contents
@ifnottex
@node Top
@top xorrisofs 1.5.6
@top xorrisofs 1.5.7
@c man-ignore-lines 1
@c man .SH NAME
@ -366,6 +366,21 @@ enclose whitespace and make it part of pathspecs. Each mark
type can enclose the marks of the other type. A trailing backslash \ outside
quotations or an open quotation cause the next input line to be appended.
@c man .TP
@item -cut_out disk_path byte_offset byte_count iso_rr_path
@kindex -cut_out insert piece of data file or device
@cindex Insert, piece of data file or device, -cut_out
Map a byte interval of a regular disk file or of a device file into a regular
file in the ISO image. The file depicted by disk_path has to support random
read access.
@*
byte_offset and byte_count may be plain numbers counting bytes, or numbers
with appended letter "d", "s", "k", "m", "g" to count disk blocks (512 bytes),
disc sectors (2048 bytes), KiB (1024 bytes), MiB (1024 KiB), or GiB (1024 MiB).
@*
E.g:
@*
-cut_out bootable.iso 562s 18s /formerly_hidden_boot_image
@c man .TP
@item -f
@kindex -f follow symbolic links on disk
@cindex Links, follow on disk, -f, -follow-links
@ -408,7 +423,7 @@ Alias of -m.
@c man .TP
@item -exclude-list disk_path
@kindex -exclude-list exclude disk files from inserting
@cindex Disk files, exclude, -hide-list
@cindex Disk files, exclude, -exclude-list
Perform -m using each line out of file disk_path as argument disk_pattern.
@c man .TP
@item -z
@ -1169,6 +1184,24 @@ if their disk_path matches the given shell parser pattern.
@cindex Hiding, from HFS+, -hide-hfsplus-list
Perform -hide-hfsplus using each line out of file disk_path as argument
disk_path_pattern.
@c man .TP
@item -hide_iso_path hide_state iso_rr_path
@kindex -hide_iso_path keep a file invisible in ISO tree
@cindex Hiding, by ISO RR path, -hide_iso_path
Prevent the name of the given file from showing up in the directory trees
of ISO 9660 and/or Joliet and/or HFS+ when the image gets written.
Other than the above hide options, this one takes the path of a file
in the emerging ISO filesystem, not the path of a file on hard disk.
@*
Possible values of hide_state are: "iso_rr" for hiding from ISO 9660 tree,
"joliet" for Joliet tree, "hfsplus" for HFS+, "on" for them all.
"off" means visibility in all directory trees.
@*
These values may be combined.
E.g.: joliet:hfsplus
@*
This command does not apply to the boot catalog.
Rather use: boot-catalog-hide
@end table
@c man .TP
@c man .B ISO image ID strings: