Compare commits

...

175 Commits

Author SHA1 Message Date
Thomas Schmitt 7e4a714c12 Suppressed warnings about non existing boot equipment files when mkisofs emulation is active 2024-05-19 22:51:08 +02:00
Thomas Schmitt 2c608c9d27 Updated change log and web page 2024-05-19 16:15:31 +02:00
Thomas Schmitt 5e79dc32e5 Bug fix: Size assessment of ISO images smaller than 32 KiB yielded random values 2024-05-19 09:43:18 +02:00
Thomas Schmitt d7eba30171 Initialized a variable which has complicated ways of getting set 2024-05-19 09:42:12 +02:00
Thomas Schmitt 2ee32947de Fixed a small memory leak introduced with commit aace531 2024-05-19 09:41:04 +02:00
Thomas Schmitt 4dc5edc565 Bug fix: -boot_image system_area=/dev/zero preserved system area of loaded ISO 2024-05-13 12:22:04 +02:00
Thomas Schmitt c8fab513c6 Issueing warning messages if -boot_image paths currently are unsuitable 2024-05-12 17:38:47 +02:00
Thomas Schmitt 87e1d67417 Mentioned in the man page that libisofs now memorizes all boot related paths at image load time. Warned of boot file manipulations after -boot_image replay. 2024-05-12 14:02:45 +02:00
Thomas Schmitt 4818eeaa5f Mentioned in the man page the increased number of appended GPT partitions in libisofs 2024-05-11 13:06:20 +02:00
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
Thomas Schmitt 919c82385b Documented changes and release timestamp 2023-06-07 18:40:27 +02:00
Thomas Schmitt 79997c2b31 Updated xorriso-dd-target.sig and merge_debian_isos.sig 2023-06-07 18:38:21 +02:00
Thomas Schmitt be8f86ded2 Version leap to libisoburn-1.5.6 2023-06-07 18:37:00 +02:00
Thomas Schmitt ad1b9bfe03 Added -joliet "on" to xorriso run in merge_debian_isos 2023-04-14 18:20:33 +02:00
Thomas Schmitt d0ff0a381a Updated change log and web page 2023-03-19 16:40:06 +01:00
Thomas Schmitt fc03217d91 Emitting SORRY event for dangling symbolic links if -follow is set to "link" 2023-03-15 20:49:32 +01:00
Thomas Schmitt 72ef04a9e1 Enabled -check_media with pseudo-blank overwritable media 2023-02-28 16:08:41 +01:00
Thomas Schmitt 1844014a64 Fixed error in format of LBA-0-superblock created by prevous commit 2023-02-28 15:45:03 +01:00
Thomas Schmitt b837ff30fc Let -truncate "sbsector" "new" work even if LBA-0-superblock is damaged 2023-02-24 17:28:41 +01:00
Thomas Schmitt 6a921c7411 New flag bit12 with isoburn_read_iso_head() 2023-02-24 09:01:04 +01:00
Thomas Schmitt 163129ca6a Added missing help text for -assess_indev_features 2023-02-08 21:09:32 +01:00
Thomas Schmitt 5600508ab0 Updated copright year in output of -version 2023-01-22 16:22:22 +01:00
Thomas Schmitt 1a1d31f36c Corrected argument count classification of -setfattr_list 2023-01-22 16:21:15 +01:00
Thomas Schmitt b4e10ced99 New -compliance rules max_ce_entries=, max_ce_drop= 2023-01-22 16:19:28 +01:00
Thomas Schmitt 9a578a657f New API calls isoburn_igopt_set_max_ce_entries(), isoburn_igopt_get_max_ce_entries() 2023-01-22 16:13:57 +01:00
Thomas Schmitt c310e2abc1 Bug fix: -find test -has_xattr matched "isofs." attributes in -xattr mode "any" 2023-01-10 19:03:10 +01:00
Thomas Schmitt 3afa1d5191 Bug fix: -toc reported wrong track LBA with overwritable media with unrecognized content (pseudo-closed) 2023-01-09 15:45:00 +01:00
Thomas Schmitt 1a39dc6903 Enabled effect of -rom_toc_scan "off:emul_off" for -mount entity "auto" 2022-12-28 09:42:22 +01:00
Thomas Schmitt 36daf52a79 Updated change log and web page 2022-12-18 19:52:52 +01:00
Thomas Schmitt 098d4f8ff5 Bug fix: Data files named /boot.catalog or ./boot.cat could be left out of the emerging ISO if the boot catalog was set to be hidden 2022-12-17 20:43:24 +01:00
Thomas Schmitt 4eb98d7911 Reacted on (in the end harmless) warning of valgrind 2022-12-11 19:23:48 +01:00
Thomas Schmitt 017363ee34 Updated change log and web page 2022-12-02 10:57:32 +01:00
Thomas Schmitt 008620e19c New -find test -size 2022-11-10 10:51:21 +01:00
Thomas Schmitt a28040df18 Added test/merge_debian_isos and its docs to GNU xorriso tarball 2022-11-05 15:01:45 +01:00
Thomas Schmitt 1ff12c26d9 Bug fix: Partition offset was preserved from -indev rather than from -outdev 2022-11-05 14:38:03 +01:00
Thomas Schmitt 09de0f1743 Demanding (belated) libburn and libisofs versions 1.5.5 2022-10-29 10:50:31 +02:00
Thomas Schmitt 0d3d9d7a92 Updated change log and web page 2022-10-27 18:07:15 +02:00
Thomas Schmitt c62ae86d27 Corrected the BUGS section of merge_debian_isos.texi 2022-10-19 15:51:59 +02:00
Thomas Schmitt 7d618ef060 Enabled production of .info and .1 from merge_debian_isos.texi 2022-10-19 15:50:25 +02:00
Thomas Schmitt fd195504ae Created manual pages for merge_debian_iso 2022-10-19 13:23:47 +02:00
Thomas Schmitt 847afc0095 Updated change log and web page 2022-10-08 15:43:12 +02:00
Thomas Schmitt 82dc9b6b42 Reporting some relaxation commands with -report_el_torito modes "cmd" and "mkisofs" if CHRP is detected. Performing them with -boot_image any "replay". 2022-10-07 11:55:10 +02:00
Thomas Schmitt e594ba293a New command -assess_indev_features 2022-09-20 10:28:25 +02:00
Thomas Schmitt d2fd48fcbc New API call isoburn_assess_written_features() 2022-09-20 10:14:10 +02:00
Thomas Schmitt 3318fa47a3 New environment variable MKRESCUE_SED_UNPACK_EFI_TO_ISO 2022-08-06 16:22:32 +02:00
Thomas Schmitt 9e79f64cae Automatically creating mount parent directory in merge_debian_isos 2022-07-19 15:57:29 +02:00
Thomas Schmitt f205e4294a Added a sentence to help text of merge_debian_isos 2022-07-16 19:34:44 +02:00
Thomas Schmitt 821628ae91 Made adjustments in merge_debian_isos 2022-07-15 17:05:34 +02:00
Thomas Schmitt bdc563a98b Updated change log and web page 2022-07-14 22:00:44 +02:00
Thomas Schmitt 71f6ba15c3 Updated the gpg --verify procedure after demise of keys.gnupg.net 2022-07-14 21:58:29 +02:00
Thomas Schmitt 62700a98e1 Enabled writing by merge_debian_isos to USB sticks and optical media 2022-07-14 21:32:20 +02:00
Thomas Schmitt 4ff9f8eedf Returning non-zero exit value if releng/run_all_auto fails. Proposal by Alexandre Ghiti. 2022-07-02 09:03:43 +02:00
Thomas Schmitt 0e8227e76a Improved speed of md5sum.txt processing by a proposal of Zhang Boyang 2022-06-26 10:58:16 +02:00
Thomas Schmitt 072c4e5ab9 Listing /firmware/dep11/README.txt in md5sum.txt if all its MD5 lines are equal 2022-06-24 09:40:12 +02:00
Thomas Schmitt a94f22d92b Properly announced and checked md5sum as new dependency of merge_debian_isos 2022-06-23 18:51:21 +02:00
Thomas Schmitt 0bc397c02c Removing duplicates from md5sum.txt and computing new MD5 for changed files 2022-06-23 18:17:41 +02:00
Thomas Schmitt 87aab73058 Corrected sorting of /md5sum.txt by merge_debian_isos 2022-06-20 22:09:24 +02:00
Thomas Schmitt 68c4a39c37 Merging Debian /firmware directories like the /pool directories 2022-06-18 21:20:42 +02:00
Thomas Schmitt 5897c706a4 Improved signal handling, removing result ISO if xorriso exits with error, redirected a few messages from stdout to stderr 2022-06-18 17:14:11 +02:00
Thomas Schmitt 34981b1278 Switched test/merge_debian_isos to /bin/sh, added signal handling, fixed harmless flaws found by shellcheck, added more sanity checks, enabled XORRISO=dummy for test runs without ISO production 2022-06-17 10:22:27 +02:00
Thomas Schmitt 65c63cc1cf Changed permissions of test/merge_debian_isos to a+x 2022-06-15 22:08:51 +02:00
Thomas Schmitt 9b4c082f84 New experimental script test/merge_debian_isos. Deprecated merge_2_debian_isos. 2022-06-15 12:25:05 +02:00
Thomas Schmitt 3eef0411d5 Warning if EFI boot equipment is present but no /EFI/BOOT directory is in ISO 2022-06-13 22:56:17 +02:00
Thomas Schmitt 5aac3dd80f Bug fix: Split file directories (-split_size) were created with wrong permissions 2022-06-02 16:10:21 +02:00
Thomas Schmitt 865115f779 Allowed lseekable device files with -paste_in 2022-05-30 18:48:05 +02:00
Thomas Schmitt 0c0d542591 Widened the lseek capacity determination to SEEK_SET with wanted size 2022-05-30 18:45:49 +02:00
Thomas Schmitt ddfe5098d8 New experimental script test/merge_2_debian_isos 2022-05-23 20:07:50 +02:00
Thomas Schmitt 0cb2e15190 Allowed to override by variable CC the use of g++ in releng/auto_cxx . Proposal by Tom Stellard. 2022-05-10 17:16:38 +02:00
Thomas Schmitt fc587966d3 Allowed lseekable device files with -cut_out. Proof-of-concept by Ivan Shmakov. 2022-04-26 12:17:22 +02:00
Thomas Schmitt 0ef65a7837 Updated change log and web page 2022-04-23 14:09:30 +02:00
Thomas Schmitt ac7cdfa251 Bug fix: -report_system_area cmd misperceived combination of isohybrid and appended partition in GPT 2022-04-22 13:33:52 +02:00
Thomas Schmitt 7d79692c55 Bug fix: -report_system_area cmd misperceived -part_like_isohybrid with -isohybrid-gpt-basdat 2022-04-22 13:32:25 +02:00
Thomas Schmitt e651cb5040 New -toc output line "Overburnt by :" 2021-11-24 12:52:53 +01:00
Thomas Schmitt 6b0bb9e630 Mentioned in man page the classification of BD-R POW as unsuitable medium state 2021-09-25 10:51:21 +02:00
Thomas Schmitt 0ba13965a7 Updated change log and web page 2021-09-13 17:18:34 +02:00
Thomas Schmitt b2d9384ec9 Fixed a message about -paste_bin from and to paths 2021-09-13 17:14:25 +02:00
Thomas Schmitt b5a33c3418 Bug fix: -not_leaf and -not_paths were not applied to -extract and alike 2021-09-13 17:12:34 +02:00
Thomas Schmitt 358262818e New -as cdrecord option --bdr_obs_exempt 2021-09-12 11:33:50 +02:00
Thomas Schmitt 58e7eb0877 New parameters "obs_pad" and "bdr_obs_exempt" for -dvd_obs 2021-09-12 11:27:54 +02:00
Thomas Schmitt 555048a0a1 Removed a "(" from a "dnl" comment which confused autoupdate 2021-09-04 16:22:35 +02:00
Thomas Schmitt 8a11dc6224 Reacted on compiler warning of Debian i386 buildd 2021-09-04 10:00:20 +02:00
Thomas Schmitt 562247b74f Removed unneeded configure.ac macro AC_C_BIGENDIAN 2021-09-02 19:59:27 +02:00
Thomas Schmitt d19150ad36 Updated copyright year of -version message 2021-08-30 16:52:41 +02:00
Thomas Schmitt b35c2e410f Updated change log and web page 2021-08-30 16:13:46 +02:00
Thomas Schmitt 3f2b61932b New -as cdrecord option --obs_pad. Automatic no_emul_toc with -as cdrecord. 2021-08-30 12:35:26 +02:00
Thomas Schmitt e489c877bd Bug fix: -no_rc prevented pre-scanning of arguments for stdio output and others. Introduced by mistake in a62f6af5, 2011.10.18.162119. 2021-08-30 11:50:06 +02:00
Thomas Schmitt e6f686761e Corrected wording in the API description of isoburn_conv_name_chars() 2021-08-28 18:13:35 +02:00
Thomas Schmitt 7dc45e3311 Warn of volid length for Joliet only if more than 16 characters (was: 16 bytes) 2021-08-28 18:12:15 +02:00
Thomas Schmitt 5011a5f7b0 Mentioned command -status in man page paragraph "Command processing" 2021-06-04 18:18:51 +02:00
Thomas Schmitt 49d40a4560 Corrected default expectation of -status in respect to -osirrox and -error_behavior 2021-06-04 17:52:30 +02:00
Thomas Schmitt 60dfe77a32 Updated change log and web page 2021-05-25 22:16:02 +02:00
Thomas Schmitt e9cbf38c01 Bug fix: False -status failure with -boot_image --interval:appended_partition 2021-05-25 21:59:32 +02:00
Thomas Schmitt 23d0d8e90a New -as mkisofs options --gpt-iso-bootable and --gpt-iso-not-ro 2021-05-25 21:22:43 +02:00
Thomas Schmitt db5d4eb867 New -boot_image settings gpt_iso_bootable= and gpt_iso_not_ro= 2021-05-25 21:18:48 +02:00
Thomas Schmitt a1f9d03df0 New isoburn_igopt_set_system_area() option bits 16: GPT "Legacy BIOS bootable" and 17: GPT writable 2021-05-25 21:14:23 +02:00
Thomas Schmitt e3df75772e Avoided to override EFI type GUID by output of -report_system_area as_mkisofs 2021-04-04 20:16:47 +02:00
Thomas Schmitt c9e7fe86df Fixed a man page typo found by lintian 2021-03-12 09:34:00 +01:00
Thomas Schmitt a5146807ff Made optional the use of libcam and thus SCSI passthrough on GNU/FreeBSD systems 2021-03-12 09:32:19 +01:00
Thomas Schmitt be21a6374b Updated xorriso-dd-target.sig 2021-02-07 21:02:14 +01:00
Thomas Schmitt aa1a008bb3 Updated change log 2021-02-03 13:36:18 +01:00
Thomas Schmitt 9fe4c4dbab Updated change log and web page 2021-02-01 19:29:36 +01:00
Thomas Schmitt d16ab5b86a Updated change log and web page 2021-01-30 21:18:21 +01:00
Thomas Schmitt f51499c592 Made number transition to 1.5.5 2021-01-30 21:16:25 +01:00
81 changed files with 9584 additions and 1883 deletions

View File

@ -1,3 +1,88 @@
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.
* Bug fix: -outdev holding an ISO filesystem could get attached wrong start LBA
* Bug fix: Command -load "volid" did not work with constant search text
* Bug fix: Command -truncate_overwritable on ISO image without MD5 caused
double free of memory
* Bug fix: -boot_image "any" "replay" failed after the legacy BIOS boot image
file was replaced by -map. Thanks Brian C. Lane.
* Bug fix: -boot_image system_area=/dev/zero preserved system area of
loaded ISO
* Bug fix: Size assessment of ISO images smaller than 32 KiB yielded
random values
* 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 API calls isoburn_toc_disc_get_sectors_v2,
isoburn_toc_session_get_sectors_v2, isoburn_toc_track_get_emul_v2
* New API calls isoburn_read_iso_head_v2(), isoburn_get_mount_params_v2()
* New API calls isoburn_igopt_get_effective_lba_v2(),
isoburn_igopt_get_data_start_v2()
* New API call isoburn_get_attached_start_lba_v2()
* New API calls isoburn_attach_start_lba_v2(), isoburn_disc_get_msc1_v2(),
isoburn_disc_track_lba_nwa_v2()
* New API call isoburn_prepare_blind_grow_v2()
* New -as mkisofs options -cut_out and -hide_iso_path
* Improved handling of hidden boot images in -boot_image cmd/as_mkisofs/replay
* The maximum number of appended GPT partitions was increased from 4 to 8
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
* Bug fix: -no_rc prevented pre-scanning of arguments for stdio output and
others. Introduced by mistake in a62f6af5, 2011.10.18.162119.
* Bug fix: -not_leaf and -not_paths were not applied to -extract and alike
* Bug fix: -report_system_area cmd misperceived -part_like_isohybrid with
-isohybrid-gpt-basdat
* Bug fix: -report_system_area cmd misperceived combination of isohybrid and
appended partition in GPT
* Bug fix: -as mkisofs option -part_like_isohybrid did not cause a MBR
partition table if the partitions are data files in the ISO
rather than appended
* Bug fix: Split file directories (-split_size) were created with wrong
permissions
* Bug fix: libisofs did not mark clones of imported files as imported.
This could cause that original and clone occupy data storage
in the newly written session. Thanks to Ivan Shmakov.
* Bug fix: Partition offset was preserved from -indev rather than from -outdev
* Bug fix: libisofs could misrepresent Rock Ridge information if many
symbolic links or AAIP data were recorded in a directory
* Bug fix: Data files named /boot.catalog or ./boot.cat could be left out of
the emerging ISO if the boot catalog was set to be hidden
* Bug fix: -toc reported wrong track LBA with overwritable media with
unrecognized content (pseudo-closed)
* Bug fix: -find test -has_xattr matched "isofs." attributes
in -xattr mode "any"
* New API call isoburn_assess_written_features()
* New API calls isoburn_igopt_set_max_ce_entries(),
isoburn_igopt_get_max_ce_entries()
* New flag bit12 with isoburn_read_iso_head():
Read even if start of multi-session emulation is damaged
* New -boot_image settings gpt_iso_bootable= and gpt_iso_not_ro=
* New -as mkisofs options --gpt-iso-bootable and --gpt-iso-not-ro
* New -as cdrecord option --obs_pad. Automatic no_emul_toc with -as cdrecord.
* New parameters "obs_pad" and "bdr_obs_exempt" for -dvd_obs
* New -as cdrecord option --bdr_obs_exempt
* New command -assess_indev_features
* New -find test -size
* New -compliance rules max_ce_entries=, max_ce_drop=
* Allowed lseekable device files with -cut_out.
Proof-of-concept by Ivan Shmakov on bugs.debian.org. (Closes: #1010098)
libisoburn-1.5.4.tar.gz Sat Jan 30 2021 libisoburn-1.5.4.tar.gz Sat Jan 30 2021
=============================================================================== ===============================================================================
* Bug fix: -report_system_area as_mkisofs misrepresented GPT with appended * Bug fix: -report_system_area as_mkisofs misrepresented GPT with appended

16
README
View File

@ -4,9 +4,9 @@
libisoburn and xorriso. By Vreixo Formoso <metalpain2002@yahoo.es> libisoburn and xorriso. By Vreixo Formoso <metalpain2002@yahoo.es>
and Thomas Schmitt <scdbackup@gmx.net> and Thomas Schmitt <scdbackup@gmx.net>
Integrated sub project of libburnia-project.org. Integrated sub project of libburnia-project.org.
http://files.libburnia-project.org/releases/libisoburn-1.5.4.tar.gz http://files.libburnia-project.org/releases/libisoburn-1.5.6.tar.gz
Copyright (C) 2006-2009 Vreixo Formoso, Copyright (C) 2006-2009 Vreixo Formoso,
Copyright (C) 2006-2021 Thomas Schmitt. Copyright (C) 2006-2023 Thomas Schmitt.
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
@ -36,17 +36,17 @@ By using this software you agree to the disclaimer at the end of this text:
Compilation, First Glimpse, Installation Compilation, First Glimpse, Installation
Dynamic library and compile time header requirements for libisoburn-1.5.4 : Dynamic library and compile time header requirements for libisoburn-1.5.6 :
- libburn.so.4 , version libburn-1.5.4 or higher - libburn.so.4 , version libburn-1.5.6 or higher
- libisofs.so.6 , version libisofs-1.5.4 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 libisoburn and xorriso will not start with libraries which are older than their
include headers seen at compile time. include headers seen at compile time.
Obtain libisoburn-1.5.4.tar.gz, take it to a directory of your choice Obtain libisoburn-1.5.6.tar.gz, take it to a directory of your choice
and do: and do:
tar xzf libisoburn-1.5.4.tar.gz tar xzf libisoburn-1.5.6.tar.gz
cd libisoburn-1.5.4 cd libisoburn-1.5.6
Within that directory execute: Within that directory execute:

View File

@ -27,6 +27,7 @@ AC_DEFUN([TARGET_SHIZZLE],
AC_MSG_CHECKING([target operating system]) AC_MSG_CHECKING([target operating system])
libburn_check_libcam=
LIBBURNIA_SUPP_ACL=none LIBBURNIA_SUPP_ACL=none
LIBBURNIA_SUPP_FATTR=none LIBBURNIA_SUPP_FATTR=none
LIBBURNIA_LDCONFIG_CMD="echo 'No ldconfig run performed. If needed, configure manually for:'" LIBBURNIA_LDCONFIG_CMD="echo 'No ldconfig run performed. If needed, configure manually for:'"
@ -50,6 +51,7 @@ AC_DEFUN([TARGET_SHIZZLE],
*-kfreebsd*-gnu*) *-kfreebsd*-gnu*)
ARCH=freebsd ARCH=freebsd
LIBBURN_ARCH_LIBS=-lcam LIBBURN_ARCH_LIBS=-lcam
libburn_check_libcam=yes
;; ;;
*-solaris*) *-solaris*)
ARCH=solaris ARCH=solaris
@ -61,8 +63,12 @@ AC_DEFUN([TARGET_SHIZZLE],
# AC_ERROR([You are attempting to compile for an unsupported platform]) # AC_ERROR([You are attempting to compile for an unsupported platform])
;; ;;
esac esac
AC_MSG_RESULT([$ARCH]) AC_MSG_RESULT([$ARCH])
if test x"$libburn_check_libcam" = xyes
then
LIBBURNIA_CHECK_LIBCAM
fi
]) ])
@ -352,6 +358,7 @@ dnl It tests whether the OS dependent libraries are available.
dnl With libisoburn they are needed only for the case that indirect linking dnl With libisoburn they are needed only for the case that indirect linking
dnl does not work. So it is worth a try to omit them. dnl does not work. So it is worth a try to omit them.
dnl $1 = "mandatory" or "optional" define the action if test linking fails. dnl $1 = "mandatory" or "optional" define the action if test linking fails.
dnl "silent" is like "optional" but without message.
AC_DEFUN([LIBBURNIA_CHECK_ARCH_LIBS], AC_DEFUN([LIBBURNIA_CHECK_ARCH_LIBS],
[ [
libburnia_save_LIBS="$LIBS" libburnia_save_LIBS="$LIBS"
@ -372,11 +379,19 @@ AC_DEFUN([LIBBURNIA_CHECK_ARCH_LIBS],
echo >&2 echo >&2
(exit 1); exit 1; (exit 1); exit 1;
else else
echo "disabled linking with $LIBBURN_ARCH_LIBS (because not found)" if test x"$1" = xoptional
then
echo "disabled linking with $LIBBURN_ARCH_LIBS (because not found)"
fi
LIBBURN_ARCH_LIBS="" LIBBURN_ARCH_LIBS=""
fi fi
else else
echo "enabled linking with $LIBBURN_ARCH_LIBS" if test x"$1" = xsilent
then
dummy=dummy
else
echo "enabled linking with $LIBBURN_ARCH_LIBS"
fi
fi fi
fi fi
]) ])
@ -387,18 +402,72 @@ dnl
AC_DEFUN([LIBBURNIA_CHECK_LINUX_SCSI], AC_DEFUN([LIBBURNIA_CHECK_LINUX_SCSI],
[ [
dnl Check whether it is a Linux without scsi/scsi.h dnl Check whether it is a Linux without scsi/scsi.h
AH_TEMPLATE([Libburn_use_sg_dummY], libburn_scsi_disabled=
[Define to compile without OS specific SCSI features]) if test x"$ARCH" = xlinux
AC_MSG_CHECKING([for missing scsi/scsi.h on Linux]) then
AC_TRY_COMPILE([ AH_TEMPLATE([Libburn_use_sg_dummY],
[Define to compile without OS specific SCSI features])
AC_MSG_CHECKING([for missing scsi/scsi.h on Linux])
AC_TRY_COMPILE([
#ifdef __linux #ifdef __linux
#include <scsi/scsi.h> #include <scsi/scsi.h>
#endif #endif
], ],
[;], [;],
[AC_MSG_RESULT([no])], [AC_MSG_RESULT([no])],
[AC_DEFINE([Libburn_use_sg_dummY], [yes]) [AC_DEFINE([Libburn_use_sg_dummY], [yes])
AC_MSG_RESULT([yes])] libburn_scsi_disabled=yes
) AC_MSG_RESULT([yes])]
)
fi
if test x"$libburn_scsi_disabled" = xyes
then
echo "disabled operation of optical drives via SCSI"
fi
])
dnl LIBBURNIA_CHECK_LIBCAM is by Thomas Schmitt, libburnia project
dnl
AC_DEFUN([LIBBURNIA_CHECK_LIBCAM],
[
dnl Check whether libcam is requested for FreeBSD kernel but missing
libburn_scsi_disabled=
if test x"$LIBBURN_ARCH_LIBS" = x"-lcam"
then
AH_TEMPLATE([Libburn_use_sg_dummY],
[Define to compile without OS specific SCSI features])
AC_MSG_CHECKING([for missing libcam for SCSI on FreeBSD kernel])
dnl If libcam is not available, LIBBURN_ARCH_LIBS will be made empty
LIBBURNIA_CHECK_ARCH_LIBS(silent)
if test x"$LIBBURN_ARCH_LIBS" = x
then
AC_DEFINE([Libburn_use_sg_dummY], [yes])
libburn_scsi_disabled=yes
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
if test x"$LIBBURN_ARCH_LIBS" = x"-lcam"
then
AC_MSG_CHECKING([for missing libcam headers])
AC_TRY_COMPILE([
#include <stdio.h>
#include <camlib.h>
#include <cam/scsi/scsi_message.h>
#include <cam/scsi/scsi_pass.h>
],
[;],
[AC_MSG_RESULT([no])],
[AC_DEFINE([Libburn_use_sg_dummY], [yes])
libburn_scsi_disabled=yes
AC_MSG_RESULT([yes])]
)
fi
if test x"$libburn_scsi_disabled" = xyes
then
echo "disabled operation of optical drives via SCSI"
fi
]) ])

View File

@ -1,6 +1,6 @@
AC_INIT([libisoburn], [1.5.4], [http://libburnia-project.org]) AC_INIT([libisoburn], [1.5.7], [http://libburnia-project.org])
AC_PREREQ([2.50]) AC_PREREQ([2.50])
dnl AC_CONFIG_HEADER([config.h]) dnl AC_CONFIG_HEADER([config.h])
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_CANONICAL_TARGET AC_CANONICAL_TARGET
@ -11,7 +11,7 @@ AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_MACRO_DIR([./]) AC_CONFIG_MACRO_DIR([./])
dnl Hint: Search list for version code aspects: dnl Hint: Search list for version code aspects:
dnl /AC_INIT( dnl /AC_INIT
dnl /ISOBURN_.*_VERSION dnl /ISOBURN_.*_VERSION
dnl /LT_.* dnl /LT_.*
dnl /LIB.*_REQUIRED dnl /LIB.*_REQUIRED
@ -24,7 +24,7 @@ dnl
dnl These three are only copies to provide libtool with unused LT_RELEASE dnl These three are only copies to provide libtool with unused LT_RELEASE
ISOBURN_MAJOR_VERSION=1 ISOBURN_MAJOR_VERSION=1
ISOBURN_MINOR_VERSION=5 ISOBURN_MINOR_VERSION=5
ISOBURN_MICRO_VERSION=4 ISOBURN_MICRO_VERSION=7
dnl ISOBURN_VERSION=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION.$ISOBURN_MICRO_VERSION dnl ISOBURN_VERSION=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION.$ISOBURN_MICRO_VERSION
@ -37,16 +37,16 @@ dnl Libtool versioning
dnl Generate libisoburn.so.1.x.y dnl Generate libisoburn.so.1.x.y
dnl SONAME will become LT_CURRENT - LT_AGE dnl SONAME will become LT_CURRENT - LT_AGE
dnl dnl
dnl ts C10130 dnl ts C30607
dnl This is the release version 1.5.4 = libisoburn.so.1.111.0 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 This is the development version after above stable release
dnl LT_CURRENT++, LT_AGE++ have not happened yet. dnl ### LT_CURRENT++, LT_AGE++ have not happened yet.
dnl ### LT_CURRENT++, LT_AGE++ has happened meanwhile. dnl LT_CURRENT++, LT_AGE++ has happened meanwhile.
dnl dnl
dnl SONAME = 112 - 111 = 1 . Library name = libisoburn.so.1.111.0 dnl SONAME = 115 - 114 = 1 . Library name = libisoburn.so.1.114.0
LT_RELEASE=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION LT_RELEASE=$ISOBURN_MAJOR_VERSION.$ISOBURN_MINOR_VERSION
LT_CURRENT=112 LT_CURRENT=115
LT_AGE=111 LT_AGE=114
LT_REVISION=0 LT_REVISION=0
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE` LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
@ -65,7 +65,6 @@ dnl AM_MAINTAINER_MODE
AM_PROG_CC_C_O AM_PROG_CC_C_O
AC_C_CONST AC_C_CONST
AC_C_INLINE AC_C_INLINE
AC_C_BIGENDIAN
dnl Large file support dnl Large file support
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
@ -460,8 +459,8 @@ if test x$enable_pkg_check_modules = xyes; then
dnl If PKG_CHECK_MODULES is to be used after this if-block, 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. dnl then it might be necessary to perform PKG_PROG_PKG_CONFIG before the block.
LIBBURN_REQUIRED=1.5.4 LIBBURN_REQUIRED=1.5.7
LIBISOFS_REQUIRED=1.5.4 LIBISOFS_REQUIRED=1.5.6
PKG_CHECK_MODULES(LIBBURN, libburn-1 >= $LIBBURN_REQUIRED) PKG_CHECK_MODULES(LIBBURN, libburn-1 >= $LIBBURN_REQUIRED)
PKG_CHECK_MODULES(LIBISOFS, libisofs-1 >= $LIBISOFS_REQUIRED) PKG_CHECK_MODULES(LIBISOFS, libisofs-1 >= $LIBISOFS_REQUIRED)
if test x$LIBCDIO_DEF = x; then if test x$LIBCDIO_DEF = x; then

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2015 - 2019 # Copyright (C) 2015 - 2022
# Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org # Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
# Provided under BSD license: Use, modify, and distribute as you like. # Provided under BSD license: Use, modify, and distribute as you like.
@ -117,9 +117,9 @@ fi
# command line.) # command line.)
# Each argument must be a single word. No whitespace. No quotation marks. # Each argument must be a single word. No whitespace. No quotation marks.
# "yes" overwrites the MBR partition table area in the EFI boot image by zeros. # "yes" in MKRESCUE_SED_IN_EFI_NO_PT overwrites the MBR partition table area
# Some EFI implementations get stuck when seeing in the EFI partition a # in the EFI boot image by zeros. Some EFI implementations get stuck when
# partition table entry which begins at LBA 0. # seeing in the EFI partition a partition table entry which begins at LBA 0.
# "extra" not only zeros the partition table but also the MBR signature. # "extra" not only zeros the partition table but also the MBR signature.
efi_zero_inner_pt=no efi_zero_inner_pt=no
if test -n "$MKRESCUE_SED_IN_EFI_NO_PT" if test -n "$MKRESCUE_SED_IN_EFI_NO_PT"
@ -127,6 +127,24 @@ then
efi_zero_inner_pt="$MKRESCUE_SED_IN_EFI_NO_PT" efi_zero_inner_pt="$MKRESCUE_SED_IN_EFI_NO_PT"
fi fi
# "yes" in MKRESCUE_SED_UNPACK_EFI_TO_ISO causes the file tree from the FAT
# image efi.img to be unpacked by mcopy to a directory in /tmp which then
# gets mapped into the root directory of the emerging ISO 9660 filesystem.
# This enables a way of installing the result image onto a USB stick with
# FAT filesystem by simply copying its full file tree from ISO to FAT.
# Whether the payload files of the ISO will be able to work from FAT depends
# on their expectation towards file names and attributes.
# WARNING: Make sure that the files in efi.img do not collide with your
# payload files or with files added to the ISO by GRUB. Before using
# MKRESCUE_SED_UNPACK_EFI_TO_ISO, make a vanilla grub-mkrescue ISO
# with your payload, mount it and then its /efi.img file, then use
# program "find" on the mount point of efi.img to see all its files.
# Compare this with the output of "find" on the ISO mount point.
efi_unpack_to_iso=no
if test -n "$MKRESCUE_SED_UNPACK_EFI_TO_ISO"
then
efi_unpack_to_iso="$MKRESCUE_SED_UNPACK_EFI_TO_ISO"
fi
# #
# Do the work # Do the work
@ -190,10 +208,11 @@ done
if test x"$debug" = xextra if test x"$debug" = xextra
then then
# Show files on disk # Show files on disk
find "$dir" find "$dir" 2>&1
echo 2>&1
fi fi
if test "$efi_zero_inner_pt" = yes -o "$efi_zero_inner_pt" = extra if test x"$efi_zero_inner_pt" = xyes -o x"$efi_zero_inner_pt" = xextra
then then
did_dd=0 did_dd=0
if test -e "$dir"/efi.img if test -e "$dir"/efi.img
@ -222,6 +241,41 @@ then
fi fi
fi fi
efi_temp_tree=
if test x"$efi_unpack_to_iso" = xyes
then
if test -e "$dir"/efi.img
then
temp_tree=/tmp/grub-mkrescue-sed-et."$$"
# The mcopy command is the inverse of what grub-mkrescue does to pack it up
if mcopy -s -i "$dir"/efi.img ::/ "$temp_tree"
then
efi_temp_tree="$temp_tree"
if test x"$debug" = xyes -o x"$debug" = xextra
then
echo "Temporarily extracted $dir/efi.img to $temp_tree" >&2
echo >&2
if test x"$debug" = xextra
then
# Show extracted files
find "$temp_tree" >&2
echo >&2
fi
fi
elif test -e "$temp_tree"
then
rm -r "$temp_tree"
fi
if test -z "$efi_temp_tree"
then
echo >&2
echo "$0 : NOTE : Could not extract efi.img to $temp_tree" >&2
echo "$0 : NOTE : Thus cannot obey MKRESCUE_SED_UNPACK_EFI_TO_ISO." >&2
echo >&2
fi
fi
fi
efi_tmp_name= efi_tmp_name=
if test x"$mode" = xmjg \ if test x"$mode" = xmjg \
-o x"$mode" = xmbr_only \ -o x"$mode" = xmbr_only \
@ -229,10 +283,15 @@ if test x"$mode" = xmjg \
-o x"$mode" = xmbr_hfs -o x"$mode" = xmbr_hfs
then then
# Move EFI partition image file out of the "$dir" tree, i.e. out of the ISO # Move EFI partition image file out of the "$dir" tree, i.e. out of the ISO
efi_tmp_name=grub-mkrescue-sed-efi-img.$$ efi_tmp_name=grub-mkrescue-sed-ei.$$
if test -e "$dir"/efi.img if test -e "$dir"/efi.img
then then
mv "$dir"/efi.img /tmp/$efi_tmp_name mv "$dir"/efi.img /tmp/$efi_tmp_name
if test x"$debug" = xyes -o x"$debug" = xextra
then
echo "Temporarily moved $dir/efi.img to /tmp/$efi_tmp_name" >&2
echo >&2
fi
elif test -e /tmp/$efi_tmp_name elif test -e /tmp/$efi_tmp_name
then then
rm /tmp/$efi_tmp_name rm /tmp/$efi_tmp_name
@ -322,6 +381,27 @@ else
exit 1 exit 1
fi fi
if echo "$efi_temp_tree" | grep '^/tmp/' >/dev/null
then
# Does the xorriso run end in native command mode ?
separator_seen=0
for i in "$@"
do
if test x"$i" = x--
then
separator_seen=1
fi
done
if test "$separator_seen" = 1
then
# Native mode possible: Enable it for sure and then use -map
x=" $x -- -map $efi_temp_tree /"
else
# Hopefully nobody finds a way to leave mkisofs emulation without "--" arg
x=" $x -graft-points /=$efi_temp_tree"
fi
fi
if test x"$debug" = xyes -o x"$debug" = xextra if test x"$debug" = xyes -o x"$debug" = xextra
then then
echo "+ converted xorriso arguments:" >&2 echo "+ converted xorriso arguments:" >&2
@ -349,5 +429,11 @@ then
mv /tmp/$efi_tmp_name "$dir"/efi.img mv /tmp/$efi_tmp_name "$dir"/efi.img
fi fi
# Remove possible extracted EFI partition tree
if echo "$efi_temp_tree" | grep '^/tmp/' >/dev/null
then
rm -r "$efi_temp_tree"
fi
exit $ret exit $ret

Binary file not shown.

View File

@ -1,7 +1,7 @@
#!/usr/bin/wish #!/usr/bin/wish
# #
# xorriso-tcltk # xorriso-tcltk
# Copyright (C) 2012 - 2021 # Copyright (C) 2012 - 2023
# Thomas Schmitt <scdbackup@gmx.net>, libburnia project. # Thomas Schmitt <scdbackup@gmx.net>, libburnia project.
# Provided under BSD license: Use, modify, and distribute as you like. # Provided under BSD license: Use, modify, and distribute as you like.
# #
@ -23,7 +23,7 @@
# And, well, a graphical widget set would be nice. # And, well, a graphical widget set would be nice.
set own_version "1.5.4" set own_version "1.5.7"
# Minimum version of xorriso to be used as backend process. # Minimum version of xorriso to be used as backend process.
# Older versions of xorriso do not offer commands -msg_op and -launch_frontend # Older versions of xorriso do not offer commands -msg_op and -launch_frontend

View File

@ -6,7 +6,7 @@
*/ */
/* libburn wrappers for libisoburn /* 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. 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; enum burn_disc_status s;
#ifndef Hardcoded_cd_rW #ifndef Hardcoded_cd_rW
int lba, nwa; off_t lba, nwa;
#endif #endif
s= burn_disc_get_status(d); 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 #ifdef Hardcoded_cd_rW
(*o)->nwa= Hardcoded_cd_rw_nwA; (*o)->nwa= Hardcoded_cd_rw_nwA;
#else #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) if(ret>0)
(*o)->nwa= nwa; (*o)->nwa= nwa;
if((*o)->nwa < (*o)->zero_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); return((off_t) 0);
local_opts= burn_write_opts_new(d); local_opts= burn_write_opts_new(d);
eff_opts= local_opts; eff_opts= local_opts;
burn_write_opts_set_start_byte(eff_opts, ((off_t) o->nwa) * (off_t) 2048); burn_write_opts_set_start_byte(eff_opts, o->nwa * (off_t) 2048);
} }
avail= burn_disc_available_space(d, eff_opts); avail= burn_disc_available_space(d, eff_opts);
if(local_opts!=NULL) 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; struct isoburn *o;
#ifdef Hardcoded_cd_rW #ifdef Hardcoded_cd_rW
@ -824,13 +824,35 @@ int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba)
*start_lba= 0; *start_lba= 0;
return(1); 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, int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba)
struct burn_write_opts *opts, {
int trackno, int *lba, int *nwa) 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; int ret;
struct isoburn *o; struct isoburn *o;
@ -858,19 +880,45 @@ int isoburn_disc_track_lba_nwa(struct burn_drive *d,
s= isoburn_disc_get_status(d); s= isoburn_disc_get_status(d);
if(s == BURN_DISC_BLANK) /* We do not believe in anything but nwa = lba = 0 */ if(s == BURN_DISC_BLANK) /* We do not believe in anything but nwa = lba = 0 */
return(1); 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, 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) if(o->fabricated_msc2>=0)
*msc2= o->fabricated_msc2; *msc2= o->fabricated_msc2;
else { 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) if(ret<=0)
return(ret); return(ret);
*msc2= nwa; *msc2= nwa;
@ -878,6 +926,7 @@ int isoburn_get_msc2(struct isoburn *o,
return(1); return(1);
} }
/* @param flag bit0= truncate (else do not truncate) /* @param flag bit0= truncate (else do not truncate)
bit1= do not warn if call is inappropriate to drive bit1= do not warn if call is inappropriate to drive
bit2= only set if truncation is currently enabled 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 @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 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; int i, info_mode;
@ -1284,13 +1333,15 @@ int isoburn_read_iso_head_parse(unsigned char *data,
} }
return(1); return(1);
} }
/* API /* API
@param flag bit0-7: info return mode @param flag bit0-7: info return mode
0= do not return anything in info (do not even touch it) 0= do not return anything in info (do not even touch it)
1= copy volume id to info (info needs 33 bytes) 1= copy volume id to info (info needs 33 bytes)
2= copy 64 kB header to info (needs 65536 bytes) 2= copy 64 kB header to info (needs 65536 bytes)
bit12= read even if the start of multi-session emulation
yielded a read error
bit13= do not read head from media but use first 64 kB from info bit13= do not read head from media but use first 64 kB from info
bit14= check both half buffers (not only second) bit14= check both half buffers (not only second)
return 2 if found in first block return 2 if found in first block
@ -1298,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, @return 1 seems to be a valid ISO image , 2 found in first half buffer,
0 format not recognized, <0 error 0 format not recognized, <0 error
*/ */
int isoburn_read_iso_head(struct burn_drive *d, int lba, int isoburn_read_iso_head_v2(struct burn_drive *d, off_t lba,
int *image_blocks, char *info, int flag) off_t *image_blocks, char *info, int flag)
{ {
unsigned char *buffer= NULL; unsigned char *buffer= NULL;
int ret, info_mode, capacity, role; int ret, info_mode, role;
off_t capacity;
off_t data_count, to_read; off_t data_count, to_read;
struct isoburn *o; struct isoburn *o;
@ -1322,22 +1374,22 @@ int isoburn_read_iso_head(struct burn_drive *d, int lba,
/* >>> ??? return always 0 ? */ /* >>> ??? return always 0 ? */
{ret= (-1*!!(flag&(1<<15))); goto ex;} {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)) { if (ret <= 0 && (role == 2 || role == 4)) {
/* Might be a block device on a system where libburn cannot determine its /* Might be a block device on a system where libburn cannot determine its
size. Try to read anyway. */ size. Try to read anyway. */
capacity = 0x7ffffff0; capacity = 0x7fffffffffffffff;
ret = 1; 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)) { if(ret > 0 && to_read >= (off_t) (36 * 1024)) {
ret= isoburn_find_emulator(&o, d, 0); ret= isoburn_find_emulator(&o, d, 0);
if(ret > 0) if(ret > 0)
if(o->media_read_error) if(o->media_read_error && !(flag & (1 << 12)))
{ret= (-1 * !!(flag & (1 << 15))); goto ex;} {ret= (-1 * !!(flag & (1 << 15))); goto ex;}
if(to_read >= (off_t) (64 * 1024)) if(to_read >= (off_t) (64 * 1024))
to_read= 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 */ to_read, &data_count, 32); /* error messages as DEBUG */
} else } else
ret= 0; ret= 0;
@ -1366,8 +1418,23 @@ ex:;
} }
int isoburn_make_toc_entry(struct isoburn *o, int *session_count, int lba, int isoburn_read_iso_head(struct burn_drive *d, int lba,
int track_blocks, char *volid, int flag) 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; int ret;
struct isoburn_toc_entry *item; struct isoburn_toc_entry *item;
@ -1404,9 +1471,10 @@ no_memory:;
*/ */
int isoburn_emulate_toc(struct burn_drive *d, int flag) 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 ret, session_count= 0, read_flag= 0;
int scan_start= 0, scan_count= 0, probe_minus_16= 0, growisofs_nwa, role; int probe_minus_16= 0, role, with_enclosure= 0;
int with_enclosure= 0, readable_blocks= -1; off_t image_size= 0, lba, track_blocks, scan_start= 0, scan_count= 0;
off_t growisofs_nwa, readable_blocks= -1;
struct isoburn *o; struct isoburn *o;
char *msg= NULL, *size_text= NULL, *sev, volid[33], *volid_pt= NULL; char *msg= NULL, *size_text= NULL, *sev, volid[33], *volid_pt= NULL;
time_t start_time, last_pacifier, now; time_t start_time, last_pacifier, now;
@ -1425,13 +1493,13 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
if(o->emulation_mode<=0 && !(flag&1)) if(o->emulation_mode<=0 && !(flag&1))
{ret= 0; goto ex;} {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) { if(ret <= 0) {
role = burn_drive_get_drive_role(d); role = burn_drive_get_drive_role(d);
if (role == 2 || role == 4) if (role == 2 || role == 4)
/* Might be a block device on a system where libburn cannot determine its /* Might be a block device on a system where libburn cannot determine its
size. Try to read anyway. */ size. Try to read anyway. */
readable_blocks= 0x7ffffff0; /* try to read anyway */ readable_blocks= 0x7fffffffffffffff; /* try to read anyway */
else else
readable_blocks= -1; readable_blocks= -1;
} }
@ -1442,11 +1510,11 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
lba= 0; lba= 0;
if(flag & 2) { if(flag & 2) {
/* If there is a PVD at LBA 32 then this is an image with emulated TOC */ /* 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) if(ret > 0)
lba= 32; lba= 32;
} else { } 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) if(ret<=0)
{ret= 0; goto failure;} {ret= 0; goto failure;}
lba= o->target_iso_head_size / 2048; lba= o->target_iso_head_size / 2048;
@ -1455,6 +1523,11 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
ret= 1; ret= 1;
goto failure; /* This will represent the medium as single session */ goto failure; /* This will represent the medium as single session */
} }
if(!(lba < image_size || (flag&2))) {
/* Not enough readable space for chained session superblocks */
ret= 1;
goto failure;
}
} }
while(lba<image_size || (flag&2)) { while(lba<image_size || (flag&2)) {
now= time(NULL); now= time(NULL);
@ -1486,7 +1559,7 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
probe_minus_16= 0; 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) { if(ret > 0) {
volid_pt= volid; volid_pt= volid;
} else { } else {
@ -1503,8 +1576,8 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
break; break;
} }
sprintf(msg, sprintf(msg,
"Chain of ISO session headers broken at #%d, LBA %ds", "Chain of ISO session headers broken at #%d, LBA %.fs",
session_count+1, lba); session_count+1, (double) lba);
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0); isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
if(with_enclosure) { if(with_enclosure) {
@ -1521,8 +1594,8 @@ int isoburn_emulate_toc(struct burn_drive *d, int flag)
lba-= 16; lba-= 16;
if(readable_blocks >= 0 && lba + track_blocks > readable_blocks) { if(readable_blocks >= 0 && lba + track_blocks > readable_blocks) {
sprintf(msg, "ISO image size %ds larger than readable size %ds", sprintf(msg, "ISO image size %.fs larger than readable size %.fs",
lba + track_blocks, readable_blocks); (double) (lba + track_blocks), (double) readable_blocks);
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0); isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
track_blocks= readable_blocks - lba; track_blocks= readable_blocks - lba;
} }
@ -1560,8 +1633,8 @@ failure:;
isoburn_toc_entry_destroy(&(o->toc), 1); isoburn_toc_entry_destroy(&(o->toc), 1);
if(with_enclosure && o->emulation_mode == 1) { if(with_enclosure && o->emulation_mode == 1) {
if(readable_blocks >= 0 && image_size > readable_blocks) { if(readable_blocks >= 0 && image_size > readable_blocks) {
sprintf(msg, "ISO image size %ds larger than readable size %ds", sprintf(msg, "ISO image size %.fs larger than readable size %.fs",
image_size, readable_blocks); (double) image_size, (double) readable_blocks);
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0); isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
image_size= readable_blocks; image_size= readable_blocks;
} }
@ -1725,10 +1798,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; 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_session **sessions;
struct burn_track **tracks; struct burn_track **tracks;
struct burn_toc_entry entry; struct burn_toc_entry entry;
@ -1759,7 +1833,9 @@ int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc)
} }
if(num_tracks > 0) { if(num_tracks > 0) {
burn_track_get_entry(tracks[num_tracks - 1], &entry); 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; ret= entry.start_lba + entry.track_blocks;
} }
} }
@ -1771,6 +1847,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_session **isoburn_toc_disc_get_sessions(
struct isoburn_toc_disc *disc, int *num) struct isoburn_toc_disc *disc, int *num)
{ {
@ -1785,10 +1872,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; struct isoburn_toc_entry *t;
int count= 0, i; int i;
off_t count= 0;
if(s==NULL) if(s==NULL)
return(0); return(0);
@ -1799,17 +1887,28 @@ int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s)
t= t->next; t= t->next;
} }
} else if(s->session!=NULL) } else if(s->session!=NULL)
count= burn_session_get_sectors(s->session); count= burn_session_get_sectors_v2(s->session);
return(count); 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 isoburn_toc_entry_finish(struct burn_toc_entry *entry,
int session_no, int track_no, int flag) int session_no, int track_no, int flag)
{ {
int pmin, psec, pframe; int pmin, psec, pframe;
entry->extensions_valid= 1; entry->extensions_valid= 1 | 8;
entry->adr= 1; entry->adr= 1;
entry->control= 4; entry->control= 4;
entry->session= session_no & 255; entry->session= session_no & 255;
@ -1817,7 +1916,13 @@ int isoburn_toc_entry_finish(struct burn_toc_entry *entry,
entry->point= track_no & 255; entry->point= track_no & 255;
entry->point_msb= (track_no >> 8) & 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) if(pmin<=255)
entry->pmin= pmin; entry->pmin= pmin;
else else
@ -1842,7 +1947,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) if(s->track_count<=0 || s->track_pointers==NULL || s->toc_entry==NULL)
return; return;
t= s->track_pointers[s->track_count-1]; 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; entry->track_blocks= 0;
isoburn_toc_entry_finish(entry, s->toc_entry->session, t->toc_entry->track_no, isoburn_toc_entry_finish(entry, s->toc_entry->session, t->toc_entry->track_no,
0); 0);
@ -1868,15 +1979,26 @@ void isoburn_toc_track_get_entry(struct isoburn_toc_track *t,
} }
if(t->toc_entry==NULL) if(t->toc_entry==NULL)
return; return;
entry->start_lba= t->toc_entry->start_lba; entry->long_start_lba= t->toc_entry->start_lba;
entry->track_blocks= 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= 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, isoburn_toc_entry_finish(entry, t->toc_entry->session, t->toc_entry->track_no,
0); 0);
} }
int isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba, int isoburn_toc_track_get_emul_v2(struct isoburn_toc_track *t,
int *image_blocks, char volid[33], int flag) off_t *start_lba, off_t *image_blocks,
char volid[33], int flag)
{ {
if(t->toc_entry == NULL) if(t->toc_entry == NULL)
return(0); return(0);
@ -1890,6 +2012,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) void isoburn_toc_disc_free(struct isoburn_toc_disc *d)
{ {
if(d->disc!=NULL) if(d->disc!=NULL)
@ -1899,15 +2047,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; struct burn_toc_entry entry;
isoburn_toc_track_get_entry(track, &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; *lba= entry.start_lba;
else } else {
*lba= burn_msf_to_lba(entry.pmin, entry.psec, entry.pframe); *lba= burn_msf_to_lba(entry.pmin, entry.psec, entry.pframe);
}
return(1); return(1);
} }
@ -1938,8 +2090,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 isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
int flag) int flag)
{ {
int ret, num_sessions= 0, num_tracks, adr_num, i, j, total_tracks; int ret, num_sessions= 0, num_tracks, i, j, total_tracks;
int lba, best_lba, size, re_valid= 0, track_count= 0; 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; time_t start_time= 0, last_pacifier= 0, now;
char volid[33], *msg= NULL; char volid[33], *msg= NULL;
struct isoburn *o; struct isoburn *o;
@ -1963,7 +2117,11 @@ int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
{ret= -1; goto ex;} {ret= -1; goto ex;}
start_time= last_pacifier= time(NULL); 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)) { if(adr_mode!=3 || (flag & 2)) {
disc= isoburn_toc_drive_get_disc(d); disc= isoburn_toc_drive_get_disc(d);
if(disc==NULL) { if(disc==NULL) {
@ -2025,7 +2183,8 @@ not_found:;
} }
if((flag & 1) && o->fabricated_msc1 >= 16) { if((flag & 1) && o->fabricated_msc1 >= 16) {
/* adr_num is possibly 16 blocks too high */ /* 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) if(ret==2)
o->fabricated_msc1-= 16; o->fabricated_msc1-= 16;
} }
@ -2053,12 +2212,12 @@ not_found:;
isoburn_msgs_submit(o, 0x00060000, msg, 0, "UPDATE", 0); isoburn_msgs_submit(o, 0x00060000, msg, 0, "UPDATE", 0);
} }
track_count++; 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) if(ret < 0)
continue; continue;
if(ret == 0) { if(ret == 0) {
isoburn_get_track_lba(tracks[0], &lba, 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) if(ret<=0)
continue; continue;
} }
@ -2102,13 +2261,13 @@ ex:;
} }
int isoburn_get_mount_params(struct burn_drive *d, int isoburn_get_mount_params_v2(struct burn_drive *d,
int adr_mode, char *adr_value, int adr_mode, char *adr_value,
int *lba, int *track, int *session, off_t *lba, int *track, int *session,
char volid[33], int flag) char volid[33], int flag)
{ {
int msc1_mem, ret, total_tracks, num_sessions, num_tracks, i, j, track_lba; int ret, total_tracks, num_sessions, num_tracks, i, j, is_iso= 0;
int size, is_iso= 0; off_t msc1_mem, track_lba, size;
struct isoburn *o; struct isoburn *o;
struct isoburn_toc_disc *disc= NULL; struct isoburn_toc_disc *disc= NULL;
struct isoburn_toc_session **sessions= NULL; struct isoburn_toc_session **sessions= NULL;
@ -2145,7 +2304,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) if(ret <= 0)
volid[0]= 0; volid[0]= 0;
else else
@ -2159,3 +2318,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

@ -7,7 +7,7 @@
Class core of libisoburn. Class core of libisoburn.
Copyright 2007 - 2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es> Copyright 2007 - 2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Copyright 2007 - 2020 Thomas Schmitt <scdbackup@gmx.net> Copyright 2007 - 2023 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
*/ */
@ -405,7 +405,8 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
IsoWriteOpts *wopts, IsoWriteOpts *wopts,
int flag) 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; struct burn_drive *out_d;
new_img= flag&1; new_img= flag&1;
@ -481,6 +482,13 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
if(opts->vol_uuid[0] == 0 && opts->gpt_guid_mode == 2) if(opts->vol_uuid[0] == 0 && opts->gpt_guid_mode == 2)
guid_mode= 0; guid_mode= 0;
iso_write_opts_set_gpt_guid(wopts, opts->gpt_guid, guid_mode); iso_write_opts_set_gpt_guid(wopts, opts->gpt_guid, guid_mode);
ret = iso_write_opts_set_max_ce_entries(wopts, opts->max_ce_entries,
opts->max_ce_entries_flag);
if (ret < 0) {
isoburn_report_iso_error(ret, "Cannot set limit for number of CE entries",
0, "FAILURE", 0);
{ret= -1; goto ex;}
}
iso_write_opts_attach_jte(wopts, opts->libjte_handle); iso_write_opts_attach_jte(wopts, opts->libjte_handle);
iso_write_opts_set_hfsp_serial_number(wopts, opts->hfsp_serial_number); iso_write_opts_set_hfsp_serial_number(wopts, opts->hfsp_serial_number);
@ -501,7 +509,7 @@ int isoburn_make_iso_write_opts(struct isoburn *out_o,
out_o->min_start_byte= 0; 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; opts->effective_lba= nwa;
ret= isoburn_get_msc2(out_o, NULL, &nwa, 0); ret= isoburn_get_msc2(out_o, NULL, &nwa, 0);
if (ret != 1) { if (ret != 1) {
@ -588,7 +596,7 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
IsoWriteOpts *wopts= NULL; IsoWriteOpts *wopts= NULL;
enum burn_disc_status state; enum burn_disc_status state;
int ret, fifo_chunks, i, new_img, early_indev_release; 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; size_t buffer_size= 0, buffer_free= 0;
char *msg= NULL; char *msg= NULL;
@ -686,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); ret= iso_write_opts_get_data_start(wopts, &data_start, 0);
opts->data_start_lba= -1; opts->data_start_lba= -1;
if(ret > 0 && data_start <= 0x7FFFFFFF) if(ret > 0)
opts->data_start_lba= data_start; opts->data_start_lba= data_start;
/* TODO check return values for failure. properly clean-up on error */ /* TODO check return values for failure. properly clean-up on error */
@ -735,10 +743,11 @@ int isoburn_prepare_new_image(struct burn_drive *d, struct burn_disc **disc,
} }
/* API since 0.2.2 */ /* API since 1.5.8 */
int isoburn_prepare_blind_grow(struct burn_drive *d, struct burn_disc **disc, int isoburn_prepare_blind_grow_v2(struct burn_drive *d,
struct isoburn_imgen_opts *opts, struct burn_disc **disc,
struct burn_drive *out_drive, int nwa) struct isoburn_imgen_opts *opts,
struct burn_drive *out_drive, off_t nwa)
{ {
int ret; int ret;
struct isoburn *o= NULL; struct isoburn *o= NULL;
@ -760,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 /* API @since 0.1.0
@param flag bit0= this is a regular end, not an abort @param flag bit0= this is a regular end, not an abort
give up source reference give up source reference
@ -1204,6 +1225,8 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
o->iso_mbr_part_type= -1; o->iso_mbr_part_type= -1;
memset(o->gpt_guid, 0, 16); memset(o->gpt_guid, 0, 16);
o->gpt_guid_mode= 0; o->gpt_guid_mode= 0;
o->max_ce_entries= 31; /* Linux hates >= RR_MAX_CE_ENTRIES = 32 */
o->max_ce_entries_flag= 2; /* omit non-isofs fattr and ACL if needed */
memset(o->hfsp_serial_number, 0, 8); memset(o->hfsp_serial_number, 0, 8);
o->hfsp_block_size= 0; o->hfsp_block_size= 0;
o->apm_block_size= 0; o->apm_block_size= 0;
@ -1493,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; *lba= o->effective_lba;
return(1); 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; *lba= o->data_start_lba;
return(1); 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, int isoburn_igopt_set_scdbackup_tag(struct isoburn_imgen_opts *o, char *name,
char *timestamp, char *tag_written) char *timestamp, char *tag_written)
{ {
@ -1549,7 +1609,7 @@ int isoburn_igopt_set_system_area(struct isoburn_imgen_opts *opts,
} }
memcpy(opts->system_area_data, data, 32768); memcpy(opts->system_area_data, data, 32768);
} }
opts->system_area_options = options & 0xffff; opts->system_area_options = options & 0x3ffff;
return(1); return(1);
} }
@ -1937,6 +1997,32 @@ int isoburn_igopt_get_gpt_guid(struct isoburn_imgen_opts *opts,
} }
int isoburn_igopt_set_max_ce_entries(struct isoburn_imgen_opts *opts,
uint32_t num, int flag)
{
if(num > 100000) {
isoburn_msgs_submit(NULL, 0x00060000,
"Too many CE entries enabled for single file (max 100000)",
0, "SORRY", 0);
return(0);
}
if(num == 0)
num= 1;
opts->max_ce_entries= num;
opts->max_ce_entries_flag= (flag & 15);
return(1);
}
int isoburn_igopt_get_max_ce_entries(struct isoburn_imgen_opts *opts,
uint32_t *num, int *max_ce_flag)
{
*num= opts->max_ce_entries;
*max_ce_flag= opts->max_ce_entries_flag;
return(1);
}
int isoburn_igopt_set_disc_label(struct isoburn_imgen_opts *opts, char *label) int isoburn_igopt_set_disc_label(struct isoburn_imgen_opts *opts, char *label)
{ {
strncpy(opts->ascii_disc_label, label, Libisoburn_disc_label_sizE - 1); strncpy(opts->ascii_disc_label, label, Libisoburn_disc_label_sizE - 1);

View File

@ -3,7 +3,7 @@
Class struct of libisoburn. Class struct of libisoburn.
Copyright 2007 - 2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es> 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. Provided under GPL version 2 or later.
*/ */
@ -27,8 +27,8 @@
struct isoburn_toc_entry { struct isoburn_toc_entry {
int session; int session;
int track_no; /* point */ int track_no; /* point */
int start_lba; off_t start_lba;
int track_blocks; off_t track_blocks;
char *volid; /* For caching a volume id from emulated toc on overwritables */ char *volid; /* For caching a volume id from emulated toc on overwritables */
struct isoburn_toc_entry *next; struct isoburn_toc_entry *next;
@ -82,26 +82,26 @@ struct isoburn {
/* If >= 0, this address is used as reply for isoburn_disc_get_msc1() /* 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() /* If >= 0, this address is used in isoburn_disc_track_lba_nwa()
as reply parameter nwa. as reply parameter nwa.
(The other nwa parameters below apply only to the effective write address (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.) 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 /* 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) 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) */ /* Start address as given by image examination (bytes, not blocks) */
off_t min_start_byte; off_t min_start_byte;
/* Aligned start address to be used for processing (counted in blocks) */ /* 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 */ /* Truncate to .nwa an eventual regular file serving as output drive */
@ -142,7 +142,7 @@ struct isoburn {
IsoImage *image; IsoImage *image;
/* The start LBA of the 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. /* 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 @return <=0 is failure , >0 success
*/ */
int isoburn_get_msc2(struct isoburn *o, 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() /** Get a data source suitable for read from a drive using burn_read_data()
function. function.
@ -629,14 +629,14 @@ struct isoburn_imgen_opts {
If <0 : Invalid If <0 : Invalid
If >=0: Valid block number. Block size is always 2 KiB. 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 /** Output value: Block address of data section start as predicted by
libisofs. libisofs.
If < 16: Invalid If < 16: Invalid
If >=16: Valid block number. Block size is always 2 KiB. 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 * If not empty: Parameters "name" and "timestamp" for a scdbackup stream
@ -769,6 +769,9 @@ struct isoburn_imgen_opts {
/* Whether to fsync() stdio_drives after isoburn_activate_session() */ /* Whether to fsync() stdio_drives after isoburn_activate_session() */
int do_fsync; int do_fsync;
/* See libisoburn.h isoburn_igopt_set_max_ce_entries() */
uint32_t max_ce_entries;
int max_ce_entries_flag;
}; };

View File

@ -7,7 +7,7 @@
libisofs related functions of libisoburn. libisofs related functions of libisoburn.
Copyright 2007 - 2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es> 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. 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 /* API function. See libisoburn.h
*/ */
IsoImage *isoburn_get_attached_image(struct burn_drive *d) IsoImage *isoburn_get_attached_image(struct burn_drive *d)
@ -106,7 +118,7 @@ IsoImage *isoburn_get_attached_image(struct burn_drive *d)
/* API */ /* 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; int ret;
struct isoburn *o= NULL; 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) static void isoburn_idle_free_function(void *ignored)
{ {
return; return;
@ -137,16 +160,113 @@ int isoburn_root_defaults(IsoImage *image, int flag)
} }
/* @return <=0 = error , 1 = ok , 2 = no ISO filesystem found
*/
int isoburn_make_iso_read_opts(struct burn_drive *d,
struct isoburn *o,
struct isoburn_read_opts *read_opts,
IsoReadOpts **ropts)
{
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_v2(d, &off_t_num);
if (ret <= 0)
{ret= -2; goto ex;}
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_v2(d, off_t_num, &dummy, NULL, 0);
if (ret <= 0) {
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;}
}
if(read_opts->displacement != 0 && abs(read_opts->displacement_sign) == 1) {
/* Apply reverse displacement to session start */
if(read_opts->displacement_sign == -1) {
if(ms_block+ read_opts->displacement < ms_block) {
displacement_rollover:;
sprintf(msg, "Displacement offset leads outside 32 bit range.");
isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
ms_block+= read_opts->displacement;
} else {
if(ms_block < read_opts->displacement)
goto displacement_rollover;
ms_block-= read_opts->displacement;
}
}
ret = iso_read_opts_new(ropts, 0);
if (ret < 0) {
isoburn_report_iso_error(ret, "Cannot create write opts", 0, "FATAL", 0);
goto ex;
}
iso_read_opts_set_start_block(*ropts, ms_block);
iso_read_opts_set_no_rockridge(*ropts, read_opts->norock);
iso_read_opts_set_no_aaip(*ropts, read_opts->noaaip);
if(read_opts->nomd5 == 2)
int_num= 2;
else if(read_opts->nomd5 == 1)
int_num= 1;
else
int_num= 0;
iso_read_opts_set_no_md5(*ropts, int_num);
if(read_opts->do_ecma119_map)
iso_read_opts_set_ecma119_map(*ropts, read_opts->map_mode);
if(read_opts->do_joliet_map)
iso_read_opts_set_joliet_map(*ropts, read_opts->joliet_map_mode);
iso_read_opts_set_new_inos(*ropts, read_opts->noino);
iso_read_opts_set_no_joliet(*ropts, read_opts->nojoliet);
iso_read_opts_set_no_iso1999(*ropts, read_opts->noiso1999);
iso_read_opts_set_preferjoliet(*ropts, read_opts->preferjoliet);
iso_read_opts_set_default_permissions(*ropts,
read_opts->mode, read_opts->dirmode);
iso_read_opts_set_default_uid(*ropts, read_opts->uid);
iso_read_opts_set_default_gid(*ropts, read_opts->gid);
iso_read_opts_set_input_charset(*ropts, read_opts->input_charset);
iso_read_opts_auto_input_charset(*ropts, read_opts->auto_input_charset);
iso_read_opts_load_system_area(*ropts, 1);
iso_read_opts_keep_import_src(*ropts, 1);
ret= 1;
ex:;
if(ret <= 0) {
if(*ropts != NULL)
iso_read_opts_free(*ropts);
*ropts= NULL;
}
if(msg != NULL)
free(msg);
return(ret);
}
/* API function. See libisoburn.h /* API function. See libisoburn.h
*/ */
int isoburn_read_image(struct burn_drive *d, int isoburn_read_image(struct burn_drive *d,
struct isoburn_read_opts *read_opts, struct isoburn_read_opts *read_opts,
IsoImage **image) IsoImage **image)
{ {
int ret, int_num, dummy, ignore_aclea= 0; int ret, ignore_aclea= 0;
IsoReadOpts *ropts= NULL; IsoReadOpts *ropts= NULL;
IsoReadImageFeatures *features= NULL; IsoReadImageFeatures *features= NULL;
uint32_t ms_block;
char *msg= NULL; char *msg= NULL;
enum burn_disc_status status= BURN_DISC_BLANK; enum burn_disc_status status= BURN_DISC_BLANK;
IsoDataSource *ds= NULL; IsoDataSource *ds= NULL;
@ -223,73 +343,19 @@ create_blank_image:;
{ret= -4; goto ex;} {ret= -4; goto ex;}
} }
ret = isoburn_disc_get_msc1(d, &int_num);
if (ret <= 0) /* create the data source */
{ret= -2; goto ex;} ret= isoburn_make_iso_read_opts(d, o, read_opts, &ropts);
ms_block= int_num; if(ret <= 0)
if (o != NULL) goto ex;
o->image_start_lba= ms_block; if(ret == 2) {
ret = isoburn_read_iso_head(d, int_num, &dummy, NULL, 0); sprintf(msg, "Creating blank image.");
if (ret <= 0) {
sprintf(msg, "No ISO 9660 image at LBA %d. Creating blank image.", int_num);
isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0); isoburn_msgs_submit(o, 0x00060000, msg, 0, "WARNING", 0);
goto create_blank_image; goto create_blank_image;
} }
if(read_opts->displacement != 0 && abs(read_opts->displacement_sign) == 1) {
/* Apply reverse displacement to session start */
if(read_opts->displacement_sign == -1) {
if(ms_block+ read_opts->displacement < ms_block) {
displacement_rollover:;
sprintf(msg, "Displacement offset leads outside 32 bit range.");
isoburn_msgs_submit(o, 0x00060000, msg, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
ms_block+= read_opts->displacement;
} else {
if(ms_block < read_opts->displacement)
goto displacement_rollover;
ms_block-= read_opts->displacement;
}
}
/* create the data source */
ret = iso_read_opts_new(&ropts, 0);
if (ret < 0) {
isoburn_report_iso_error(ret, "Cannot create write opts", 0, "FATAL", 0);
goto ex;
}
/* Important: do not return until iso_read_opts_free() */ /* Important: do not return until iso_read_opts_free() */
iso_read_opts_set_start_block(ropts, ms_block);
iso_read_opts_set_no_rockridge(ropts, read_opts->norock);
iso_read_opts_set_no_aaip(ropts, read_opts->noaaip);
if(read_opts->nomd5 == 2)
int_num= 2;
else if(read_opts->nomd5 == 1)
int_num= 1;
else
int_num= 0;
iso_read_opts_set_no_md5(ropts, int_num);
if(read_opts->do_ecma119_map)
iso_read_opts_set_ecma119_map(ropts, read_opts->map_mode);
if(read_opts->do_joliet_map)
iso_read_opts_set_joliet_map(ropts, read_opts->joliet_map_mode);
iso_read_opts_set_new_inos(ropts, read_opts->noino);
iso_read_opts_set_no_joliet(ropts, read_opts->nojoliet);
iso_read_opts_set_no_iso1999(ropts, read_opts->noiso1999);
iso_read_opts_set_preferjoliet(ropts, read_opts->preferjoliet);
iso_read_opts_set_default_permissions(ropts,
read_opts->mode, read_opts->dirmode);
iso_read_opts_set_default_uid(ropts, read_opts->uid);
iso_read_opts_set_default_gid(ropts, read_opts->gid);
iso_read_opts_set_input_charset(ropts, read_opts->input_charset);
iso_read_opts_auto_input_charset(ropts, read_opts->auto_input_charset);
iso_read_opts_load_system_area(ropts, 1);
iso_read_opts_keep_import_src(ropts, 1);
ret= iso_image_set_truncate_mode(o->image, read_opts->truncate_mode, ret= iso_image_set_truncate_mode(o->image, read_opts->truncate_mode,
read_opts->truncate_length); read_opts->truncate_length);
if(ret < 0) if(ret < 0)
@ -346,6 +412,170 @@ ex:;
} }
/* API function. See libisoburn.h
*/
int isoburn_assess_written_features(struct burn_drive *d,
struct isoburn_read_opts *read_opts,
IsoReadImageFeatures **features,
struct isoburn_imgen_opts **imgen_opts,
int flag)
{
int ret, type, ext;
int64_t num_value;
void *pt_value;
size_t pt_size;
IsoReadOpts *ropts= NULL;
char *msg= NULL;
enum burn_disc_status status= BURN_DISC_BLANK;
IsoDataSource *ds= NULL;
struct isoburn *o= NULL;
IsoWriteOpts *write_opts= NULL;
msg= calloc(1, 160);
if(d != NULL) {
ret = isoburn_find_emulator(&o, d, 0);
if (ret < 0 || o == NULL)
{ret= 0; goto ex;}
status = isoburn_disc_get_status(d);
o->image_start_lba= -1;
}
if(read_opts==NULL) {
isoburn_msgs_submit(o, 0x00060000,
"Program error: isoburn_read_image: read_opts==NULL",
0, "FATAL", 0);
{ret= -1; goto ex;}
}
if (d == NULL || read_opts->pretend_blank ||
(status != BURN_DISC_APPENDABLE && status != BURN_DISC_FULL)) {
isoburn_msgs_submit(o, 0x00060000,
"Empty drive, unsuitable medium state, or read option 'pretend_blank'",
0, "FAILURE", 0);
{ret= 0; goto ex;}
}
ret= isoburn_make_iso_read_opts(d, o, read_opts, &ropts);
if(ret <= 0)
goto ex;
if(ret == 2)
{ret= 0; goto ex;}
/* ??? Only if o->iso_data_source == NULL ? */
ds = isoburn_data_source_new(d, read_opts->displacement,
read_opts->displacement_sign,
read_opts->cache_tiles, read_opts->cache_tile_blocks);
if (ds == NULL) {
isoburn_report_iso_error(ret, "Cannot create IsoDataSource object", 0,
"FATAL", 0);
ret= -1; goto ex;
}
if(o->iso_data_source != NULL)
iso_data_source_unref(o->iso_data_source);
o->iso_data_source= ds;
ret= iso_assess_written_features(ds, ropts, features, &write_opts);
if(ret < 0) {
isoburn_report_iso_error(ret, "Failed to assess ISO filesystem features",
0, "FAILURE", 0);
ret= 0; goto ex;
}
ret= isoburn_igopt_new(imgen_opts, 0);
if(ret <= 0)
goto ex;
/* Convert features to imgen_opts */
if(iso_read_image_feature_named(*features, "iso_level", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
isoburn_igopt_set_level(*imgen_opts, num_value);
ext= 0;
if(iso_read_image_feature_named(*features, "rock_ridge", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_rockridge * !!num_value;
if(iso_read_image_feature_named(*features, "joliet", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_joliet * !!num_value;
if(iso_read_image_feature_named(*features, "iso1999", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_iso1999 * !!num_value;
if(iso_read_image_feature_named(*features, "aaip", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_aaip * !!num_value;
if(iso_read_image_feature_named(*features, "record_md5_session", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_session_md5 * !!num_value;
if(iso_read_image_feature_named(*features, "record_md5_files", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_file_md5 * !!num_value;
isoburn_igopt_set_extensions(*imgen_opts, ext);
ext= 0;
if(iso_read_image_feature_named(*features, "omit_version_numbers", NULL, &type,
&num_value, &pt_value, &pt_size) == 1) {
if((num_value & 3) == 2)
ext|= isoburn_igopt_only_iso_versions;
else if(num_value & 3)
ext|= isoburn_igopt_omit_version_numbers;
}
if(iso_read_image_feature_named(*features, "allow_deep_paths", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_allow_deep_paths * !!num_value;
if(iso_read_image_feature_named(*features, "allow_longer_paths", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_allow_longer_paths * !!num_value;
if(iso_read_image_feature_named(*features, "max_37_char_filenames", NULL,
&type, &num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_max_37_char_filenames * !!num_value;
if(iso_read_image_feature_named(*features, "no_force_dots", NULL, &type,
&num_value, &pt_value, &pt_size) == 1) {
if(num_value & 1)
ext|= isoburn_igopt_only_iso_versions;
if(num_value & 2)
ext|= isoburn_igopt_no_force_dots;
}
if(iso_read_image_feature_named(*features, "allow_lowercase", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_allow_lowercase * !!num_value;
if(iso_read_image_feature_named(*features, "allow_full_ascii", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_allow_full_ascii * !!num_value;
if(iso_read_image_feature_named(*features, "joliet_longer_paths", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_joliet_longer_paths * !!num_value;
if(iso_read_image_feature_named(*features, "rrip_version_1_10", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_rrip_version_1_10 * !!num_value;
if(iso_read_image_feature_named(*features, "aaip_susp_1_10", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_aaip_susp_1_10 * !!num_value;
if(iso_read_image_feature_named(*features, "allow_dir_id_ext", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_allow_dir_id_ext * !!num_value;
if(iso_read_image_feature_named(*features, "joliet_long_names", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_joliet_long_names * !!num_value;
if(iso_read_image_feature_named(*features, "joliet_utf16", NULL, &type,
&num_value, &pt_value, &pt_size) == 1)
ext|= isoburn_igopt_joliet_utf16 * !!num_value;
isoburn_igopt_set_relaxed(*imgen_opts, ext);
if(iso_read_image_feature_named(*features, "untranslated_name_len", NULL,
&type, &num_value, &pt_value, &pt_size) == 1)
isoburn_igopt_set_untranslated_name_len(*imgen_opts, num_value);
ret= 1;
ex:;
if(msg != NULL)
free(msg);
if(ropts != NULL)
iso_read_opts_free(ropts);
if(write_opts != NULL)
iso_write_opts_free(write_opts);
return(ret);
}
/* API function. See libisoburn.h /* API function. See libisoburn.h
*/ */
int isoburn_attach_image(struct burn_drive *d, IsoImage *image) int isoburn_attach_image(struct burn_drive *d, IsoImage *image)
@ -371,7 +601,7 @@ int isoburn_attach_image(struct burn_drive *d, IsoImage *image)
/* API */ /* 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; int ret;
struct isoburn *o; struct isoburn *o;
@ -388,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 /* API function. See libisoburn.h
*/ */
int isoburn_activate_session(struct burn_drive *drive) int isoburn_activate_session(struct burn_drive *drive)
@ -440,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 /* Check for MBR signature and a first partition that starts at a 2k block
and ends where the image ends. and ends where the image ends.
If not too large or too small, accept its start as partition offset. If not too large or too small, accept its start as partition offset.
@ -449,6 +723,7 @@ static int isoburn_inspect_partition(struct isoburn *o, uint32_t img_size,
{ {
uint8_t *mbr, *part, *buf= NULL; uint8_t *mbr, *part, *buf= NULL;
uint32_t offst, numsec; uint32_t offst, numsec;
uint64_t gpt_start_lba, gpt_size;
struct ecma119_pri_vol_desc *pvm; struct ecma119_pri_vol_desc *pvm;
off_t data_count; off_t data_count;
int ret; int ret;
@ -471,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) if(part[1] == 0 && part[2] == 0 && part[3] == 0)
{ret= 2; goto ex;} /* Zero C/H/S start address */ {ret= 2; goto ex;} /* Zero C/H/S start address */
/* Does it match the normal ISO image ? */
offst= iso_read_lsb(part + 8, 4); offst= iso_read_lsb(part + 8, 4);
numsec= iso_read_lsb(part + 12, 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) if(offst < 64)
{ret= 2; goto ex;} /* Zero or unusably small partition start */ {ret= 2; goto ex;} /* Zero or unusably small partition start */
if((offst % 4) || (numsec % 4)) if((offst % 4) || (numsec % 4))
@ -536,7 +822,8 @@ ex:;
*/ */
int isoburn_start_emulation(struct isoburn *o, int flag) 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; off_t data_count, to_read;
struct burn_drive *drive; struct burn_drive *drive;
struct ecma119_pri_vol_desc *pvm; struct ecma119_pri_vol_desc *pvm;
@ -564,13 +851,13 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
The data there point to the most recent session. The data there point to the most recent session.
*/ */
role = burn_drive_get_drive_role(drive); 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) if (ret <= 0)
capacity = -1; capacity = -1;
if (role == 5) { /* random access write-only medium */ if (role == 5) { /* random access write-only medium */
s = burn_disc_get_status(drive); s = burn_disc_get_status(drive);
o->fabricated_disc_status= s; 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) if(o->nwa < o->zero_nwa)
o->zero_nwa= 0; o->zero_nwa= 0;
{ret= 1; goto ex;} {ret= 1; goto ex;}
@ -579,8 +866,8 @@ int isoburn_start_emulation(struct isoburn *o, int flag)
size. Try to read anyway. */ size. Try to read anyway. */
to_read = o->target_iso_head_size; to_read = o->target_iso_head_size;
memset(o->target_iso_head, 0, to_read); memset(o->target_iso_head, 0, to_read);
if(capacity > 0 && (off_t) capacity * (off_t) 2048 < to_read) if(capacity > 0 && capacity * (off_t) 2048 < to_read)
to_read = (off_t) capacity * (off_t) 2048; to_read = capacity * (off_t) 2048;
ret = burn_read_data(drive, (off_t) 0, (char*)o->target_iso_head, ret = burn_read_data(drive, (off_t) 0, (char*)o->target_iso_head,
to_read, &data_count, 32 | 8); to_read, &data_count, 32 | 8);
if (ret <= 0) { if (ret <= 0) {

View File

@ -6,7 +6,7 @@
Lower level API definition of libisoburn. Lower level API definition of libisoburn.
Copyright 2007-2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es> Copyright 2007-2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
Copyright 2007-2021 Thomas Schmitt <scdbackup@gmx.net> Copyright 2007-2024 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later. 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 /* Important: If you add a public API function then add its name to file
libisoburn/libisoburn.ver 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 So micro revisions {1,3,5,7,9} should never be used for
dynamic linking unless the proper library match can be dynamic linking unless the proper library match can be
guaranteed by external circumstances. guaranteed by external circumstances.
@return 1 success, <=0 might in future become an error indication
*/ */
void isoburn_version(int *major, int *minor, int *micro); void isoburn_version(int *major, int *minor, int *micro);
@ -249,7 +249,7 @@ void isoburn_version(int *major, int *minor, int *micro);
*/ */
#define isoburn_libisofs_req_major 1 #define isoburn_libisofs_req_major 1
#define isoburn_libisofs_req_minor 5 #define isoburn_libisofs_req_minor 5
#define isoburn_libisofs_req_micro 4 #define isoburn_libisofs_req_micro 6
/** The minimum version of libburn to be used with this version of libisoburn /** The minimum version of libburn to be used with this version of libisoburn
at compile time. at compile time.
@ -257,7 +257,7 @@ void isoburn_version(int *major, int *minor, int *micro);
*/ */
#define isoburn_libburn_req_major 1 #define isoburn_libburn_req_major 1
#define isoburn_libburn_req_minor 5 #define isoburn_libburn_req_minor 5
#define isoburn_libburn_req_micro 4 #define isoburn_libburn_req_micro 7
/** The minimum compile time requirements of libisoburn towards libjte are /** The minimum compile time requirements of libisoburn towards libjte are
the same as of a suitable libisofs towards libjte. 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_major 1
#define isoburn_header_version_minor 5 #define isoburn_header_version_minor 5
#define isoburn_header_version_micro 4 #define isoburn_header_version_micro 7
/** Note: /** Note:
Above version numbers are also recorded in configure.ac because libtool Above version numbers are also recorded in configure.ac because libtool
wants them as parameters at build time. wants them as parameters at build time.
@ -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); 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 /** Get the array of session handles and the number of complete sessions
from the table of content. 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); 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. /** Obtain a copy of the entry which describes the end of a particular session.
Wrapper for: burn_session_get_leadout_entry() 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 isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba,
int *image_blocks, char volid[33], int flag); 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. /** Release the memory associated with a master handle of a medium.
@ -725,6 +741,9 @@ void isoburn_toc_disc_free(struct isoburn_toc_disc *disc);
1= copy volume id to info (info needs 33 bytes) 1= copy volume id to info (info needs 33 bytes)
2= @since 0.2.2 : 2= @since 0.2.2 :
copy 64 kB header to info (needs 65536 bytes) copy 64 kB header to info (needs 65536 bytes)
bit12= @since 1.5.6 :
Read even if the start of multi-session emulation
yielded a read error
bit13= @since 0.2.2: bit13= @since 0.2.2:
Do not read head from medium but use first 64 kB from Do not read head from medium but use first 64 kB from
info. info.
@ -737,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 isoburn_read_iso_head(struct burn_drive *d, int lba,
int *image_blocks, char *info, int flag); 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 /** Try to convert the given entity address into various entity addresses
which would describe it. which would describe it.
@ -766,6 +791,14 @@ int isoburn_get_mount_params(struct burn_drive *d,
int *lba, int *track, int *session, int *lba, int *track, int *session,
char volid[33], int flag); 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);
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/* /*
@ -1310,7 +1343,7 @@ int isoburn_igopt_get_extensions(struct isoburn_imgen_opts *o, int *ext);
prefixed ES fields. This saves 5 to 10 bytes per file and prefixed ES fields. This saves 5 to 10 bytes per file and
might avoid problems with readers which only accept RRIP. might avoid problems with readers which only accept RRIP.
SUSP-1.10 allows it, SUSP-1.12 frowns on it. SUSP-1.10 allows it, SUSP-1.12 frowns on it.
bit12= only_iso_numbers bit12= only_iso_versions
Same as bit1 omit_version_number but restricted to the names Same as bit1 omit_version_number but restricted to the names
in the eventual Joliet tree. in the eventual Joliet tree.
@since 0.5.4 @since 0.5.4
@ -1542,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); 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 /** Obtain after image preparation the lowest block address of file content
data. Failure can occur if libisofs is too old to provide this information, data. Failure can occur if libisofs is too old to provide this information,
@ -1556,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); 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 /** 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 tag. It will be appended to the libisofs session tag if the image starts at
@ -1585,8 +1629,10 @@ int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o,
/** Attach 32 kB of binary data which shall get written to the first 32 kB /** Attach 32 kB of binary data which shall get written to the first 32 kB
of the ISO image, the System Area. of the ISO image, the System Area.
options can cause manipulations of these data before writing happens. options can cause manipulations of these data before writing happens.
If system area data are giveni or options bit0 is set, then bit1 of If system area data are given or options bit0 is set, then bit1 of
el_torito_set_isolinux_options() is automatically disabled. el_torito_set_isolinux_options() is automatically disabled.
(For the meaning of options see also in libisofs.h
iso_write_opts_set_system_area() parameter "options".)
@since 0.5.4 @since 0.5.4
@param o The option set to work on @param o The option set to work on
@param data Either NULL or 32 kB of data. Do not submit less bytes ! @param data Either NULL or 32 kB of data. Do not submit less bytes !
@ -1655,6 +1701,20 @@ int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o,
Little-endian 8-byte. Little-endian 8-byte.
Should be combined with options bit0. Should be combined with options bit0.
Will not be in effect if options bit1 is set. Will not be in effect if options bit1 is set.
bit15= Only with System area type MBR but not with CHRP
@since 1.4.4
Enforce MBR "bootable/active" flag. In worst case by
dummy partition of type 0x00 which occupies block 0.
bit16= "Legacy BIOS bootable" in GPT
@since 1.5.6
If this bit is set and a GPT partition for the
ISO 9660 filesystem gets written, then set the GPT
partition flags bit 2 "Legacy BIOS bootable".
bit17= ISO not read-only
@since 1.5.6
Do not set GPT partition flag bit 60 "read-only" for
the ISO 9660 filesystem partition, if such a
partition gets written.
@return 1 success, 0 no data to get, <0 failure @return 1 success, 0 no data to get, <0 failure
*/ */
int isoburn_igopt_set_system_area(struct isoburn_imgen_opts *o, int isoburn_igopt_set_system_area(struct isoburn_imgen_opts *o,
@ -1987,7 +2047,7 @@ int isoburn_igopt_set_part_type_guid(struct isoburn_imgen_opts *opts,
The option set to be inquired. The option set to be inquired.
@param num_entries @param num_entries
Number of array elements in part_flags[]. 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 The array elements 0 to num_entries - 1 will get filled by the
16 flag bits of the images of the corresponding partition. 16 flag bits of the images of the corresponding partition.
@param valids @param valids
@ -2167,6 +2227,48 @@ int isoburn_igopt_set_gpt_guid(struct isoburn_imgen_opts *opts,
int isoburn_igopt_get_gpt_guid(struct isoburn_imgen_opts *opts, int isoburn_igopt_get_gpt_guid(struct isoburn_imgen_opts *opts,
uint8_t guid[16], int *mode); uint8_t guid[16], int *mode);
/** Set the maximum number of SUSP CE entries and thus continuation areas.
Each continuation area can hold at most 2048 bytes of SUSP data (Rock Ridge
or AAIP). The first area can be smaller. There might be some waste at the
end of each area.
When the maximum number is exceeded during ISO filesystem production
then possibly xattr and ACL get removed or error ISO_TOO_MANY_CE gets
reported and filesystem production is prevented.
Files with 32 or more CE entries do not show up in mounted filesystems on
Linux. So the default setting is 31 with drop mode 2. If a higher limit is
chosen and 31 gets surpassed, then a warning message gets reported.
@since 1.5.6
@param opts
The option set to be inquired.
@param num
The maximum number of CE entries per file.
Not more than 100000 may be set here.
0 gets silently mapped to 1,because the root directory needs one CE.
@param flag
bit0-bit3 = Drop mode: What to do with AAIP data on too many CE:
0 = throw ISO_TOO_MANY_CE, without dropping anything
1 = permanently drop non-isofs fattr from IsoNode and
retry filesystem production
2 = drop ACL if dropping non-isofs fattr does not suffice
@return
<=0 = error, 1 = success
*/
int isoburn_igopt_set_max_ce_entries(struct isoburn_imgen_opts *opts,
uint32_t num, int flag);
/** Inquire the current setting of isoburn_igopt_().
@since 1.5.6
@param opts
The option set to be inquired.
@param num
Returns the current setting
@param max_ce_flag
Returns the current flag setting
@return
<=0 = error, 1 = success
*/
int isoburn_igopt_get_max_ce_entries(struct isoburn_imgen_opts *opts,
uint32_t *num, int *max_ce_flag);
/** Set a name for the system area. This setting is ignored unless system area /** Set a name for the system area. This setting is ignored unless system area
type 3 "SUN Disk Label" is in effect by iso_write_opts_set_system_area(). type 3 "SUN Disk Label" is in effect by iso_write_opts_set_system_area().
@ -2329,13 +2431,13 @@ int isoburn_igopt_get_stdio_endsync(struct isoburn_imgen_opts *opts,
@param flag @param flag
Bitfield for control purposes. Bitfield for control purposes.
bit0-bit7= Name space bit0-bit7= Name space
0= generic (to_charset is valid, 0= generic (out_charset is valid,
no reserved characters, no length limits) no reserved characters, no length limits)
1= Rock Ridge (to_charset is valid) 1= Rock Ridge (out_charset is valid)
2= Joliet (to_charset gets overridden by UCS-2 or UTF-16) 2= Joliet (out_charset gets overridden by UCS-2 or UTF-16)
3= ECMA-119 (to_charset gets overridden by the 3= ECMA-119 (out_charset gets overridden by the
dull ISO 9660 subset of ASCII) dull ISO 9660 subset of ASCII)
4= HFS+ (to_charset gets overridden by UTF-16BE) 4= HFS+ (out_charset gets overridden by UTF-16BE)
bit8= Treat input text as directory name bit8= Treat input text as directory name
(matters for Joliet and ECMA-119) (matters for Joliet and ECMA-119)
bit9= Do not issue error messages bit9= Do not issue error messages
@ -2366,6 +2468,11 @@ IsoImage *isoburn_get_attached_image(struct burn_drive *d);
*/ */
int isoburn_get_attached_start_lba(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. /** 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 This will give libisoburn the base on which it can let libisofs perform
@ -2431,6 +2538,30 @@ int isoburn_set_read_pacifier(struct burn_drive *drive,
int isoburn_get_img_partition_offset(struct burn_drive *drive, int isoburn_get_img_partition_offset(struct burn_drive *drive,
uint32_t *block_offset_2k); uint32_t *block_offset_2k);
/** Assess features of the importable directory trees and an estimation of the
write options which would cause the recognized features.
@since 1.5.6
@param d The drive with the ISO filesystem
@param read_opts The read options which would be used by
isoburn_read_image()
@param features Returned information which may be inquired by
iso_read_image_features_*() or by
iso_read_image_feature_named().
Dispose by iso_read_image_features_destroy() when
no longer needed.
@param imgen_opts Returned set of write options which were derived
from the features.
Dispose by isoburn_igopt_destroy when no longer
needed.
@param flag Bitfield for control purposes, submit 0 for now.
@return 1= success, <= 0 = error
*/
int isoburn_assess_written_features(struct burn_drive *d,
struct isoburn_read_opts *read_opts,
IsoReadImageFeatures **features,
struct isoburn_imgen_opts **imgen_opts,
int flag);
/** Set the IsoImage to be used with a drive. This eventually releases /** Set the IsoImage to be used with a drive. This eventually releases
the reference to the old IsoImage attached to the drive. the reference to the old IsoImage attached to the drive.
@ -2461,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); 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 /** Return the best possible estimation of the currently available capacity of
the medium. This might depend on particular write option settings and on the medium. This might depend on particular write option settings and on
@ -2494,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); 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 /** Use this with trackno==0 to obtain the predicted start block number of the
new session. The interesting number is returned in parameter nwa. new session. The interesting number is returned in parameter nwa.
@ -2509,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 isoburn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
int trackno, int *lba, int *nwa); 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 /** Obtain the size which was attributed to an emulated appendable on actually
overwritable media. This value is supposed to be <= 2048 * nwa as of overwritable media. This value is supposed to be <= 2048 * nwa as of
@ -2620,6 +2768,14 @@ int isoburn_prepare_blind_grow(struct burn_drive *in_drive,
struct isoburn_imgen_opts *opts, struct isoburn_imgen_opts *opts,
struct burn_drive *out_drive, int nwa); 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(). Revoke isoburn_prepare_*() instead of running isoburn_disc_write().

View File

@ -1,6 +1,7 @@
LIBISOBURN1 { LIBISOBURN1 {
global: global:
isoburn_activate_session; isoburn_activate_session;
isoburn_assess_written_features;
isoburn_attach_image; isoburn_attach_image;
isoburn_attach_start_lba; isoburn_attach_start_lba;
isoburn_conv_name_chars; isoburn_conv_name_chars;
@ -42,6 +43,7 @@ isoburn_igopt_get_hfsp_serial_number;
isoburn_igopt_get_iso_mbr_part_type; isoburn_igopt_get_iso_mbr_part_type;
isoburn_igopt_get_iso_type_guid; isoburn_igopt_get_iso_type_guid;
isoburn_igopt_get_level; isoburn_igopt_get_level;
isoburn_igopt_get_max_ce_entries;
isoburn_igopt_get_out_charset; isoburn_igopt_get_out_charset;
isoburn_igopt_get_over_mode; isoburn_igopt_get_over_mode;
isoburn_igopt_get_over_ugid; isoburn_igopt_get_over_ugid;
@ -73,6 +75,7 @@ isoburn_igopt_set_hfsp_serial_number;
isoburn_igopt_set_iso_mbr_part_type; isoburn_igopt_set_iso_mbr_part_type;
isoburn_igopt_set_iso_type_guid; isoburn_igopt_set_iso_type_guid;
isoburn_igopt_set_level; isoburn_igopt_set_level;
isoburn_igopt_set_max_ce_entries;
isoburn_igopt_set_out_charset; isoburn_igopt_set_out_charset;
isoburn_igopt_set_over_mode; isoburn_igopt_set_over_mode;
isoburn_igopt_set_over_ugid; isoburn_igopt_set_over_ugid;
@ -172,6 +175,7 @@ Xorriso_option_application_id;
Xorriso_option_application_use; Xorriso_option_application_use;
Xorriso_option_as; Xorriso_option_as;
Xorriso_option_assert_volid; Xorriso_option_assert_volid;
Xorriso_option_assess_indev_features;
Xorriso_option_auto_charset; Xorriso_option_auto_charset;
Xorriso_option_backslash_codes; Xorriso_option_backslash_codes;
Xorriso_option_ban_stdio_write; Xorriso_option_ban_stdio_write;
@ -359,3 +363,18 @@ Xorriso_stop_msg_watcher;
local: *; 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

@ -141,8 +141,9 @@ All general options are accepted.
./auto_cxx ./auto_cxx
Not included in GNU xorriso. Not included in GNU xorriso.
Exercises inclusion of xorriso/xorriso.h and libisoburn/libisoburn.h Exercises inclusion of xorriso/xorriso.h and libisoburn/libisoburn.h
in C++ programs and linking of the libraries. It might be necessary in C++ programs and linking of the libraries. It is possible to override the
to set compiler options by shell variable CFLAGS before running the test. use of g++ as compiler by shell variable CC. It might be necessary to set
compiler options by shell variable CFLAGS before running the test.
It might be necessary to hand over the install directory of libburn and It might be necessary to hand over the install directory of libburn and
libisofs in shell variable LD_LIBRARY_PATH. libisofs in shell variable LD_LIBRARY_PATH.
E.g. if on FreeBSD the include headers libisofs.h , libburn.h are not found: E.g. if on FreeBSD the include headers libisofs.h , libburn.h are not found:

View File

@ -29,7 +29,7 @@ fi
# xorriso binary is not needed for that particular test # xorriso binary is not needed for that particular test
SAMPLE_CODE_DIR=codesamples SAMPLE_CODE_DIR=codesamples
CC=g++ CC=${CC:-g++}
# check compiler # check compiler
if ! which "${CC}" >/dev/null 2>&1; then if ! which "${CC}" >/dev/null 2>&1; then

View File

@ -229,16 +229,22 @@ fi
# lines, perl regex, leading tabs # lines, perl regex, leading tabs
grep -n -E "${LIST_KWD}" "${CLOG}" grep -n -E "${LIST_KWD}" "${CLOG}"
RET_GREP="$?" RET_GREP="$?"
ok=0
case ${RET_GREP} in case ${RET_GREP} in
0) # found 0) # found
;; ;;
1) # not found 1) # not found
echo "${SELF}: Log file looks clear." # | tee -a ${CLOG} echo "${SELF}: Log file looks clear." # | tee -a ${CLOG}
ok=1
;; ;;
*) # *) #
echo "${SELF}: grep returned EXIT CODE: ${RET_GREP}." # | tee -a ${CLOG} echo "${SELF}: grep returned EXIT CODE: ${RET_GREP}." # | tee -a ${CLOG}
;; ;;
esac esac
if test "$ok" = 0 && test "$exit_value" = 0
then
exit_value=1
fi
set -e set -e
fi fi
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" | tee -a ${CLOG} echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" | tee -a ${CLOG}
@ -259,5 +265,13 @@ fi
ls -lth "${GEN_DATA_DIR}" # | tee -a ${CLOG} ls -lth "${GEN_DATA_DIR}" # | tee -a ${CLOG}
# Fin # Fin
if test "$exit_value" = 0
then
echo "${SELF}: +++ Test run and its log look like success."
else
echo
echo "${SELF}: --- Test run detected some failures."
echo
fi
exit $exit_value exit $exit_value

370
test/merge_2_debian_isos Executable file
View File

@ -0,0 +1,370 @@
#!/bin/bash
echo >&2
echo "THIS SCRIPT IS DEPRECATED ! USE ITS SUCCESSOR: merge_debian_isos" >&2
echo >&2
echo "The script merge_2_debian_isos still exists only because it was mentioned">&2
echo "in Debian bug 1011343. The successor can merge more than two ISOs.">&2
echo "So do not edit this script to remove this warning and the 'exit 7' line.">&2
echo >&2
exit 7
usage() {
echo "usage: $(basename "$0") "'\' >&2
echo " boot_iso boot_mount add_iso add_mount result_iso [for_dist]" >&2
echo >&2
echo "Mounts by sudo the boot_iso at directory boot_mount and add_iso at" >&2
echo "add_mount, if not already mounted that way. Then both Debian pools" >&2
echo "and package lists get merged and a new ISO 9660 image result_iso" >&2
echo "is produced, which must not yet exist." >&2
echo "If boot_iso is bootable then the new image will be bootable by the" >&2
echo "same means." >&2
echo "This script creates the following temporary tree and files which" >&2
echo "must not yet exist in the current working directory:" >&2
echo " ./merged_dists , ./merged_md5sum.txt , ./merged_REAMDE.txt" >&2
echo " ./temp_file" >&2
echo "The optional sixth argument for_dist should only be given if" >&2
echo "this script refuses to work and proposes to give this argument." >&2
echo "Exported non-empty variable MERGE_DATE enforces a particular" >&2
echo "date string in the text which gets prepended to /README.txt ." >&2
echo "Exported non-empty variable XORRISO overrides command xorriso," >&2
echo "which may be needed if installed xorriso is older than 1.4.2." >&2
echo "Example using GNU xorriso-1.5.4 instead of /usr/bin/xorriso:" >&2
echo " export XORRISO="'$HOME'"/xorriso-1.5.4/xorriso/xorriso" >&2
echo " $(basename "$0") debian-11.2.0-amd64-DVD-1.iso /mnt/iso1 "'\' >&2
echo " debian-11.2.0-amd64-DVD-2.iso /mnt/iso2 merged.iso" >&2
}
if test "$#" -lt 5
then
usage
exit 1
fi
BOOT_ISO="$1"
BOOT_ISO_MOUNT="$2"
ADD_ISO="$3"
ADD_ISO_MOUNT="$4"
RESULT_ISO="$5"
# The sixth argument is optional
FOR_DIST="$6"
## Check arguments
if test -e "$RESULT_ISO"
then
echo "--- A file '""$RESULT_ISO""' is already existing." >&2
echo "--- Will not overwrite it by the resulting ISO image." >&2
exit 1
fi
if test -e merged_dists || test -e merged_md5sum.txt || test -e temp_file \
|| test -e merged_README.txt
then
echo "--- At least one of ./merged_dists, ./merged_md5sum.txt, ./temp_file," >&2
echo "--- or merged_README.txt is already existing. Will not overwrite them." >&2
exit 1
fi
if test "$BOOT_ISO" = "$RESULT_ISO" || test "$BOOT_ISO" = "$ADD_ISO" || \
test "$ADD_ISO" = "$RESULT_ISO"
then
echo "--- At least two of the three given ISO image paths are equal." >&2
echo "--- boot_iso and add_iso must exist and differ, result_iso must not exist." >&2
usage
exit 1
fi
## Mount and copy out the files which need to be changed
do_mount_1=1
x=$(mount | grep " $BOOT_ISO_MOUNT " | awk '{print $1}')
if test -n "$x"
then
i1=$(ls -i "$x" | awk '{print $1}')
i2=$(ls -i "$BOOT_ISO" | awk '{print $1}')
if test "$i1" = "$i2"
then
do_mount_1=0
echo "Note: Found $BOOT_ISO already mounted at $BOOT_ISO_MOUNT"
fi
fi
if test "$do_mount_1" = 1
then
echo "Note: sudo mount $BOOT_ISO $BOOT_ISO_MOUNT"
sudo mount "$BOOT_ISO" "$BOOT_ISO_MOUNT" || exit 3
fi
cp -a "$BOOT_ISO_MOUNT/dists" merged_dists
cp -a "$BOOT_ISO_MOUNT/md5sum.txt" merged_md5sum.txt
chmod -R u+w merged_dists
chmod u+w merged_md5sum.txt
do_mount_2=1
x=$(mount | grep " $ADD_ISO_MOUNT " | awk '{print $1}')
if test -n "$x"
then
i1=$(ls -i "$x" | awk '{print $1}')
i2=$(ls -i "$ADD_ISO" | awk '{print $1}')
if test "$i1" = "$i2"
then
do_mount_2=0
echo "Note: Found $ADD_ISO already mounted at $ADD_ISO_MOUNT"
fi
fi
if test "$do_mount_2" = 1
then
echo "Note: sudo mount $ADD_ISO $ADD_ISO_MOUNT"
if sudo mount "$ADD_ISO" "$ADD_ISO_MOUNT"
then
dummy=dummy
else
if test "$do_mount_1"
then
sudo umount "$BOOT_ISO_MOUNT"
fi
exit 3
fi
fi
## Helper functions
# Put out the list of checksummed paths as listed in /dists/$dist/Release
extract_checksum_paths() {
mode=0
cat "$1" | \
while true
do
read x || break
if test "$x" = "MD5Sum:" || test "$x" = "SHA1:" \
|| test "$x" = "SHA256:" || test "$x" = "SHA512:"
then
if test "$mode" = 0
then
mode=1
elif test "$mode" = 1
then
break
fi
elif test "$mode" = 1
then
echo "$x"
fi
done
}
# Put out the part before the first checksum field
extract_release_head() {
cat "$1" | \
while true
do
read x || break
if test "$x" = "MD5Sum:" || test "$x" = "SHA1:" \
|| test "$x" = "SHA256:" || test "$x" = "SHA512:"
then
break
fi
echo "$x"
done
}
## Determine which Debian release is on BOOT_ISO
dist=
for i in $(ls -1d "$BOOT_ISO_MOUNT"/dists/*)
do
if test -d "$i"
then
if test -L "$i"
then
continue
fi
test -n "$dist" && dist="$dist "
dist="$dist""$(basename $i)"
fi
done
if test -z "$dist"
then
if test -z "$FOR_DIST"
then
echo "--- Cannot determine Debian release from directories in /dists" >&2
echo "--- (You may provide the release name as sixth argument)" >&2
echo >&2
usage
exit 2
fi
elif test "$(echo "$dist" | wc -w)" -gt 1
then
if test -z "$FOR_DIST"
then
echo "--- More than one Debian release found in /dists: $dist" >&2
echo "--- (You may provide the release name as sixth argument)" >&2
echo >&2
usage
exit 2
fi
fi
if test -n "$FOR_DIST"
then
echo "Note: Overriding release name '$dist' by '""$FOR_DIST""'" >&2
dist="$FOR_DIST"
fi
if test -d "$BOOT_ISO_MOUNT"/dists/"$dist"
then
echo "Note: Will work along $BOOT_ISO_MOUNT"/dists/"$dist"/Release >&2
else
echo "--- Cannot find directory $BOOT_ISO_MOUNT"/dists/"$dist" >&2
exit 2
fi
## Prepend info to /README.txt
if test -z "$MERGE_DATE"
then
MERGE_DATE=$(date +'%Y%m%d-%H:%M')
fi
printf 'Result of a run of %s at %s\r\n' \
"$(basename $0)" "$MERGE_DATE" >temp_file
printf 'Package pools and Packages lists were merged.\r\n' >>temp_file
printf 'The other files stem from the first input ISO.\r\n' >>temp_file
printf '\r\n' >>temp_file
printf 'Input ISO: %s\r\n' "$BOOT_ISO" >>temp_file
head -2 "$BOOT_ISO_MOUNT"/README.txt >>temp_file
printf '\r\n' >>temp_file
printf 'Input ISO: %s\r\n' "$ADD_ISO" >>temp_file
head -2 "$ADD_ISO_MOUNT"/README.txt >>temp_file
printf '\r\n' >>temp_file
printf '%s%s\r\n' " --------------------------------------" \
"----------------------------------------" >>temp_file
printf '\r\n' >>temp_file
cat "$BOOT_ISO_MOUNT"/README.txt >>temp_file
mv temp_file merged_README.txt
## Merge package description files with those from "$ADD_ISO"
# /md5sum.txt seems to be the only overall package list
cat merged_md5sum.txt "$ADD_ISO_MOUNT"/md5sum.txt | sort >temp_file
mv temp_file merged_md5sum.txt
# Determine the files which are mentioned with checksum in main Release files
path_list=$( (extract_checksum_paths merged_dists/"$dist"/Release
extract_checksum_paths "$ADD_ISO_MOUNT"/dists/"$dist"/Release ) \
| awk '{print $3}' | sort | uniq )
# Merge .gz files (Release should not be merged. Unclear what others need.)
for i in $path_list
do
if echo "$i" | grep -v '.gz$' >/dev/null
then
continue
fi
if test -e merged_dists/"$dist"/"$i"
then
if test -e "$ADD_ISO_MOUNT"/dists/"$dist"/"$i"
then
if test "$(gunzip <merged_dists/"$dist"/"$i" | tail -1)" = ""
then
empty_line=
else
empty_line=echo
fi
( gunzip <merged_dists/"$dist"/"$i"
$empty_line
gunzip <"$ADD_ISO_MOUNT"/dists/"$dist"/"$i" ) | gzip >temp_file
mv temp_file merged_dists/"$dist"/"$i"
fi
elif test -e "$ADD_ISO_MOUNT"/dists/"$dist"/"$i"
then
if test -e $(dirname merged_dists/"$dist"/"$i")
then
dummy=dummy
else
mkdir -p $(dirname merged_dists/"$dist"/"$i")
fi
cp "$ADD_ISO_MOUNT"/dists/"$dist"/"$i" merged_dists/"$dist"/"$i"
fi
test -e temp_file && rm temp_file
done
## Update dists/"$dist"/Release
extract_release_head merged_dists/"$dist"/Release >temp_file
# Re-create "MD5Sum:", "SHA256:", "SHA512:" sections
for cmd in md5sum sha1sum sha256sum sha512sum
do
if type "$cmd" >/dev/null
then
case "$cmd" in
md5sum) echo "MD5Sum:" ;;
sha1sum) echo "SHA1:" ;;
sha256sum) echo "SHA256:" ;;
sha512sum) echo "SHA512:" ;;
esac
for i in $path_list
do
file=merged_dists/"$dist"/"$i"
if test -e "$file"
then
sum=$("$cmd" "$file" | awk '{print $1}')
size=$(stat -c '%s' "$file")
elif test -e "$file".gz
then
sum=$(gunzip <"$file".gz | "$cmd" | awk '{print $1}')
size=$(gunzip <"$file".gz | wc -c)
else
continue
fi
list_path=$(echo "$file" | sed -e 's/^merged_dists\/'"$dist"'\///')
printf ' %s %8ld %s\n' "$sum" "$size" "$list_path"
done
fi
done >>temp_file
mv temp_file merged_dists/"$dist"/Release
## Produce the new ISO image
if test -z "$XORRISO"
then
XORRISO=xorriso
fi
"$XORRISO" \
-indev "$BOOT_ISO" \
-outdev "$RESULT_ISO" \
-map "$ADD_ISO_MOUNT"/pool /pool \
-map merged_dists /dists \
-map merged_md5sum.txt /md5sum.txt \
-map merged_README.txt /README.txt \
-chown_r 0 /dists /md5sum.txt /README.txt -- \
-chgrp_r 0 /dists /md5sum.txt /README.txt -- \
-chmod_r a-w /dists /md5sum.txt -- \
-chmod_r a=r /README.txt -- \
-boot_image any replay \
-stdio_sync off \
-padding included \
-compliance no_emul_toc
## Clean up
if test "$do_mount_1" = 1
then
sudo umount "$BOOT_ISO_MOUNT"
fi
if test "$do_mount_2" = 1
then
sudo umount "$ADD_ISO_MOUNT"
fi
rm -r merged_dists merged_md5sum.txt merged_README.txt

1136
test/merge_debian_isos Executable file

File diff suppressed because it is too large Load Diff

293
test/merge_debian_isos.1 Normal file
View File

@ -0,0 +1,293 @@
.\" Hey, EMACS: -*- nroff -*-
.\"
.\" IMPORTANT NOTE:
.\"
.\" The original of this file is kept in test/merge_debian_isos.texi
.\" This here was generated by program xorriso/make_xorriso_1
.\"
.\"
.\" 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.7, Jun 07, 2023"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.nh
.SH NAME
merge_debian_isos \- Program to merge multiple debian\-cd ISO images
.SH SYNOPSIS
.B merge_debian_isos
result_iso mount_template iso1 iso2 [... isoN]
.br
.SH DESCRIPTION
.PP
\fBmerge_debian_isos\fR
mounts by \fBsudo\fR the ISO 9660 images iso1 to isoN at directories
mount_template1 to mount_templateN, if not already mounted that way.
Then the Debian pools and package lists get merged and a new
ISO 9660 image result_iso is produced by a run of \fBxorriso\fR.
If iso1 is bootable then
the new image will be bootable by the same means.
.br
.PP
The file depicted by result_iso must not yet exist or has to be a
device which is acceptable for Linux\-specific helper script
\fBxorriso\-dd\-target\fR. If xorriso\-dd\-target agrees and the user
confirms by input "yes" then xorriso will be run under sudo.
.br
Exempted from this evaluation are addresses which begin by "mmc:"
for an optical drive on Linux, BSDs, Solaris, or by "stdio:/dev/"
for which the user takes full and dangerous responsibility.
.br
Special result_iso path \fBxorriso\-dd\-target\-plug\-test\fR determines
on systems with Linux kernel the target USB stick by a dialog around plugging
it in.
xorriso will be run under sudo, if xorriso\-dd\-target agrees and
the user confirms by input "yes".
.br
.PP
At least the parent directory of argument \fBmount_template\fR must already
exist or has to be given by a plain name without "/" so that it can be
created in the current directory. (I.e. without even "./".)
.br
All arguments must be single words without using quotation marks.
None of the isoN must be equal to another isoM.
.br
.PP
This script creates and finally removes the following temporary tree
and files which must not yet exist in the current working directory:
./merged_dists , ./merged_md5sum.txt , ./merged_REAMDE.txt
./temp_file
.br
Further it creates and finally removes directories mount_template*
if they are needed and do not exist when the script starts. If the
parent directory in the mount_template path does not exist and
its path contains no "/" then it gets created and finally removed.
The script depends on the following programs:
.br
awk, basename, cat, chmod, cp, date, dirname, expr, fgrep, grep,
gunzip, gzip, head, ls, md5sum, mkdir, mount, mv, rm, rmdir,
sed, sh, sha256sum, sort, stat, sudo, umount, uniq, xorriso
.br
With device writing involving helper script xorriso\-dd\-target:
.br
dd, Linux kernel, lsblk, sleep, tr, uname, wc, whoami,
xorriso\-dd\-target
.br
Recommended are: sha1sum, sha512sum
.SS
.br
.SH OPTIONS
.br
.PP
merge_debian_isos has no command line options besides the input words described
above, but it reacts on some environment variables.
.br
See section ENVIRONMENT.
.br
.PP
If less than 4 arguments are given, the script will print its help text to
standard error and exit with non\-zero value, indicating failure.
.SS
.SH EXAMPLES
.SS
.B Overview of examples:
Merge DVD images 1 to 5
.br
Use GNU xorriso instead of installed xorriso
.br
Write result directly to an optical drive
.br
Write result directly and safely to USB stick (Linux only)
.br
Write result directly and unsafely to USB stick
.SS
.B Merge DVD images 1 to 5
The resulting image will be named "merged.iso".
.br
Directory ./merge_mount/ will be created if not yet existing.
.br
merge_debian_isos merged.iso merge_mount/iso \\
debian\-11.2.0\-amd64\-DVD\-[12345].iso
.br
Expect to see some harmless warnings like
.br
xorriso : WARNING : \-volid text does not comply to ISO 9660 / ECMA 119 rules
libisofs: WARNING : Cannot add /debian to Joliet tree. Symlinks can only be added to a Rock Ridge tree.
libisofs: WARNING : Image size exceeds 1024 cylinders. Cannot align partition.
.SS
.B Use GNU xorriso instead of installed xorriso
merge_debian_isos will refuse to work if the installed version of xorriso
is older than 1.4.2. In this case consider to download and compile the
GNU xorriso tarball from
.br
https://www.gnu.org/software/xorriso/#download
.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.6 tarball in your $HOME directory and have successfully compiled
it, do:
.br
export XORRISO="$HOME"/xorriso\-1.5.6/xorriso/xorriso
.br
merge_debian_isos merged.iso merge_mount/iso \\
debian\-11.2.0\-amd64\-DVD\-[12345].iso
.SS
.B Write result directly to an optical drive
xorriso is able to burn optical media on GNU/Linux (/dev/sr*),
Solaris (/dev/rdsk/*) , FreeBSD (/dev/cd*) , NetBSD (/dev/rcd*),
and OpenBSD (/dev/rcd*). Get a list of available optical drive devices by:
.br
xorriso \-devices
.br
It might be that you need superuser powers for this and then have to enable
access to the device file for the user who runs merge_debian_isos.
.br
In order to directly write the merged ISO image to an optical medium,
use the desired device file path with prefix "mmc:":
.br
merge_debian_isos mmc:/dev/sr0 merge_mount/iso \\
debian\-11.2.0\-amd64\-DVD\-[12345].iso
.SS
.B Write result directly and safely to USB stick (Linux only)
The Linux\-specific script \fBxorriso\-dd\-target\fR evaluates device files
whether they and their content look unimportant enough for being overwritten
by an image file.
.br
This mainly means that the storage device is attached to USB and contains
no filesystems which are not of type FAT or ISO 9660.
.br
You may get xorriso\-dd\-target by:
.br
wget \\
https://dev.lovelyhq.com/libburnia/libisoburn/raw/master/xorriso\-dd\-target/xorriso\-dd\-target
chmod u+x xorriso\-dd\-target
.br
Consider to also download xorriso\-dd\-target.sig and to verify the script by
.br
gpg \-\-verify xorriso\-dd\-target.sig xorriso\-dd\-target
.br
Announce the storage location of the downloaded xorriso\-dd\-target:
.br
export XORRISO_DD_TARGET_PATH="$(pwd)"
.br
The prepared use case in merge_debian_isos uses the xorriso\-dd\-target
option \-plug_test under \fBsudo\fR, which asks the user for first having
the desired USB stick unplugged so that the unwanted devices can get
registered. Then it asks the user to plug in the USB stick, so that it gets
recognized as desired target.
.br
xorriso\-dd\-target evaluates the content and decides whether it looks
disposable enough. If so, then it allows merge_debian_isos to write its
result to the device.
.br
merge_debian_isos xorriso\-dd\-target\-plug\-test merge_mount/iso \\
debian\-11.2.0\-amd64\-DVD\-[12345].iso
.SS
.B Write result directly and unsafely to USB stick
On operating systems other than GNU/Linux or with storage devices not
acceptable to xorriso\-dd\-target it is possible to remove all safety
precautions beyond those of xorriso, which can be overcome by "blanking"
the device.
.br
So after due evaluation of the device situation and on your very own risk
you may use the device path prefix "stdio:", possibly with superuser powers:
.br
xorriso \-outdev stdio:/dev/sdd \-blank as_needed
merge_debian_isos stdio:/dev/sdd merge_mount/iso \\
debian\-11.2.0\-amd64\-DVD\-[12345].iso
For details about "stdio:" and pseudo\-blanking non\-optical devices read
man xorriso.
.br
The xorriso run in merge_debian_isos ignores locally defined xorriso startup
files (by command \-no_rc).
.SH FILES
For now, no files are defined for configuration.
.SH ENVIRONMENT
The following environment variables influence the program behavior:
.br
Exported non\-empty variable MERGE_DATE enforces a particular
date string in the text which gets prepended to /README.txt .
.br
Exported non\-empty variable MERGE_FOR_DIST enforces the use of a
particular directory in /dists of iso1. Normally only one
such directory is found and thus no need to set MERGE_FOR_DIST.
.br
Exported non\-empty variable MERGE_KEEP_ISO prevents the removal
of result_iso after xorriso indicated failure of production.
.br
Exported non\-empty variable XORRISO gives the path to a xorriso binary,
which will be used instead of the system\-wide installed xorriso binary.
This may be needed if installed xorriso is older than 1.4.2.
.br
If XORRISO is set to "dummy" then no new ISO will emerge.
.br
Exported non\-empty variable XORRISO_DD_TARGET_PATH names the
directory where to find xorriso\-dd\-target, which evaluates the
suitability of result_iso devices or does the plug\-test dialog.
.br
.SH SEE ALSO
.BR xorriso(1),
.BR xorriso-dd-target(1),
.SH BUGS
To report bugs, request help, or suggest enhancements for
\fBmerge_debian_isos\fR,
please send electronic mail to the public list <bug\-xorriso@gnu.org>.
If more privacy is desired, mail to <scdbackup@gmx.net>.
.br
Please describe what you expect the program to do, the program arguments
which you used, the messages of \fBmerge_debian_isos\fR, and the
undesirable outcome of your program run.
.br
Expect to get asked more questions before solutions can be proposed.
.SH AUTHOR
Thomas Schmitt <scdbackup@gmx.net>
.br
for libburnia\-project.org
.SH COPYRIGHT
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.
If you make use of the license to derive modified versions of merge_debian_isos
then you are entitled to modify this text under that same license.
.SH CREDITS
\fBmerge_debian_isos\fR was originally developed with advise and testing
by Zhang Boyang in the course of Debian bug #1011343. Steve McIntyre provided
information about various file aspects of debian\-cd ISO images.

359
test/merge_debian_isos.info Normal file
View File

@ -0,0 +1,359 @@
This is merge_debian_isos.info, produced by makeinfo version 5.2 from
merge_debian_isos.texi.
merge_debian_isos - sh script to merge multiple debian-cd ISO images
Copyright (C) 2023 Thomas Schmitt
Permission is granted to distribute this text freely.
INFO-DIR-SECTION Archiving
START-INFO-DIR-ENTRY
* Merge_debian_isos: (merge_debian_isos). Merge debian-cd ISO images to a single image
END-INFO-DIR-ENTRY

File: merge_debian_isos.info, Node: Top, Next: Overview, Up: (dir)
merge_debian_isos 1.5.7
***********************
merge_debian_isos - Program to merge multiple debian-cd ISO images
* Menu:
* Overview:: Overview
* Options:: Options
* Examples:: Examples
* Files:: Files
* Environ:: Environment
* Seealso:: See also
* Bugreport:: Reporting bugs
* Legal:: Author, Copyright, Credits
* CommandIdx:: Alphabetic Option List
* ConceptIdx:: Alphabetic List of Concepts and Objects

File: merge_debian_isos.info, Node: Overview, Next: Options, Prev: Top, Up: Top
1 Overview
**********
'merge_debian_isos' mounts by *sudo* the ISO 9660 images iso1 to isoN at
directories mount_template1 to mount_templateN, if not already mounted
that way. Then the Debian pools and package lists get merged and a new
ISO 9660 image result_iso is produced by a run of *xorriso*. If iso1 is
bootable then the new image will be bootable by the same means.
The file depicted by result_iso must not yet exist or has to be a
device which is acceptable for Linux-specific helper script
*xorriso-dd-target*. If xorriso-dd-target agrees and the user confirms
by input "yes" then xorriso will be run under sudo.
Exempted from this evaluation are addresses which begin by "mmc:" for an
optical drive on Linux, BSDs, Solaris, or by "stdio:/dev/" for which the
user takes full and dangerous responsibility.
Special result_iso path *xorriso-dd-target-plug-test* determines on
systems with Linux kernel the target USB stick by a dialog around
plugging it in. xorriso will be run under sudo, if xorriso-dd-target
agrees and the user confirms by input "yes".
At least the parent directory of argument *mount_template* must
already exist or has to be given by a plain name without "/" so that it
can be created in the current directory. (I.e. without even "./".)
All arguments must be single words without using quotation marks. None
of the isoN must be equal to another isoM.
This script creates and finally removes the following temporary tree
and files which must not yet exist in the current working directory:
./merged_dists , ./merged_md5sum.txt , ./merged_REAMDE.txt ./temp_file
Further it creates and finally removes directories mount_template* if
they are needed and do not exist when the script starts. If the parent
directory in the mount_template path does not exist and its path
contains no "/" then it gets created and finally removed. The script
depends on the following programs:
awk, basename, cat, chmod, cp, date, dirname, expr, fgrep, grep, gunzip,
gzip, head, ls, md5sum, mkdir, mount, mv, rm, rmdir, sed, sh, sha256sum,
sort, stat, sudo, umount, uniq, xorriso
With device writing involving helper script xorriso-dd-target:
dd, Linux kernel, lsblk, sleep, tr, uname, wc, whoami, xorriso-dd-target
Recommended are: sha1sum, sha512sum

File: merge_debian_isos.info, Node: Options, Next: Examples, Prev: Overview, Up: Top
2 Options
*********
merge_debian_isos has no command line options besides the input words
described above, but it reacts on some environment variables.
If less than 4 arguments are given, the script will print its help
text to standard error and exit with non-zero value, indicating failure.

File: merge_debian_isos.info, Node: Examples, Next: Files, Prev: Options, Up: Top
3 Examples
**********
* Menu:
* ExPlain:: Merge DVD images 1 to 5
* ExXorriso:: Use GNU xorriso instead of installed xorriso
* ExOptical:: Write result directly to an optical drive
* ExDdTarget:: Write result directly and safely to USB stick (Linux only)
* ExStdio:: Write result directly and unsafely to USB stick

File: merge_debian_isos.info, Node: ExPlain, Next: ExXorriso, Prev: Options, Up: Examples
3.1 Merge DVD images 1 to 5
===========================
The resulting image will be named "merged.iso".
Directory ./merge_mount/ will be created if not yet existing.
merge_debian_isos merged.iso merge_mount/iso \
debian-11.2.0-amd64-DVD-[12345].iso
Expect to see some harmless warnings like
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA
119 rules
libisofs: WARNING : Cannot add /debian to Joliet tree. Symlinks can
only be added to a Rock Ridge tree.
libisofs: WARNING : Image size exceeds 1024 cylinders. Cannot align
partition.

File: merge_debian_isos.info, Node: ExXorriso, Next: ExOptical, Prev: ExPlain, Up: Examples
3.2 Use GNU xorriso instead of installed xorriso
================================================
merge_debian_isos will refuse to work if the installed version of
xorriso is older than 1.4.2. In this case consider to download and
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.6 tarball in your $HOME directory and have successfully
compiled it, do:
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

File: merge_debian_isos.info, Node: ExOptical, Next: ExDdTarget, Prev: ExXorriso, Up: Examples
3.3 Write result directly to an optical drive
=============================================
xorriso is able to burn optical media on GNU/Linux (/dev/sr*), Solaris
(/dev/rdsk/*) , FreeBSD (/dev/cd*) , NetBSD (/dev/rcd*), and OpenBSD
(/dev/rcd*). Get a list of available optical drive devices by:
xorriso -devices
It might be that you need superuser powers for this and then have to
enable access to the device file for the user who runs
merge_debian_isos.
In order to directly write the merged ISO image to an optical medium,
use the desired device file path with prefix "mmc:":
merge_debian_isos mmc:/dev/sr0 merge_mount/iso \
debian-11.2.0-amd64-DVD-[12345].iso

File: merge_debian_isos.info, Node: ExDdTarget, Next: ExStdio, Prev: ExOptical, Up: Examples
3.4 Write result directly and safely to USB stick (Linux only)
==============================================================
The Linux-specific script *xorriso-dd-target* evaluates device files
whether they and their content look unimportant enough for being
overwritten by an image file.
This mainly means that the storage device is attached to USB and
contains no filesystems which are not of type FAT or ISO 9660.
You may get xorriso-dd-target by:
wget \
https://dev.lovelyhq.com/libburnia/libisoburn/raw/master/xorriso-dd-target/xorriso-dd-target
chmod u+x xorriso-dd-target
Consider to also download xorriso-dd-target.sig and to verify the
script by
gpg -verify xorriso-dd-target.sig xorriso-dd-target
Announce the storage location of the downloaded xorriso-dd-target:
export XORRISO_DD_TARGET_PATH="$(pwd)"
The prepared use case in merge_debian_isos uses the xorriso-dd-target
option -plug_test under *sudo*, which asks the user for first having the
desired USB stick unplugged so that the unwanted devices can get
registered. Then it asks the user to plug in the USB stick, so that it
gets recognized as desired target.
xorriso-dd-target evaluates the content and decides whether it looks
disposable enough. If so, then it allows merge_debian_isos to write its
result to the device.
merge_debian_isos xorriso-dd-target-plug-test merge_mount/iso \
debian-11.2.0-amd64-DVD-[12345].iso

File: merge_debian_isos.info, Node: ExStdio, Next: Files, Prev: ExDdTarget, Up: Examples
3.5 Write result directly and unsafely to USB stick
===================================================
On operating systems other than GNU/Linux or with storage devices not
acceptable to xorriso-dd-target it is possible to remove all safety
precautions beyond those of xorriso, which can be overcome by "blanking"
the device.
So after due evaluation of the device situation and on your very own
risk you may use the device path prefix "stdio:", possibly with
superuser powers:
xorriso -outdev stdio:/dev/sdd -blank as_needed
merge_debian_isos stdio:/dev/sdd merge_mount/iso \
debian-11.2.0-amd64-DVD-[12345].iso
For details about "stdio:" and pseudo-blanking non-optical devices
read man xorriso.
The xorriso run in merge_debian_isos ignores locally defined xorriso
startup files (by command -no_rc).

File: merge_debian_isos.info, Node: Files, Next: Environ, Prev: Examples, Up: Top
4 Files
*******
For now, no files are defined for configuration.

File: merge_debian_isos.info, Node: Environ, Next: Seealso, Prev: Files, Up: Top
5 Environ
*********
The following environment variables influence the program behavior:
Exported non-empty variable MERGE_DATE enforces a particular date string
in the text which gets prepended to /README.txt .
Exported non-empty variable MERGE_FOR_DIST enforces the use of a
particular directory in /dists of iso1. Normally only one such
directory is found and thus no need to set MERGE_FOR_DIST.
Exported non-empty variable MERGE_KEEP_ISO prevents the removal of
result_iso after xorriso indicated failure of production.
Exported non-empty variable XORRISO gives the path to a xorriso binary,
which will be used instead of the system-wide installed xorriso binary.
This may be needed if installed xorriso is older than 1.4.2.
If XORRISO is set to "dummy" then no new ISO will emerge.
Exported non-empty variable XORRISO_DD_TARGET_PATH names the directory
where to find xorriso-dd-target, which evaluates the suitability of
result_iso devices or does the plug-test dialog.

File: merge_debian_isos.info, Node: Seealso, Next: Bugreport, Prev: Environ, Up: Top
6 See also
**********
xorriso(1), xorriso-dd-target(1)

File: merge_debian_isos.info, Node: Bugreport, Next: Legal, Prev: Seealso, Up: Top
7 Reporting bugs
****************
To report bugs, request help, or suggest enhancements for
'merge_debian_isos', please send electronic mail to the public list
<bug-xorriso@gnu.org>. If more privacy is desired, mail to
<scdbackup@gmx.net>.
Please describe what you expect the program to do, the program
arguments which you used, the messages of 'merge_debian_isos', and the
undesirable outcome of your program run.
Expect to get asked more questions before solutions can be proposed.

File: merge_debian_isos.info, Node: Legal, Next: CommandIdx, Prev: Bugreport, Up: Top
8 Author, Copyright, Credits
****************************
8.1 Author
==========
Thomas Schmitt <scdbackup@gmx.net>
for libburnia-project.org
8.2 Copyright
=============
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
merge_debian_isos then you are entitled to modify this text under that
same license.
8.3 Credits
===========
'merge_debian_isos' was originally developed with advise and testing by
Zhang Boyang in the course of Debian bug #1011343. Steve McIntyre
provided information about various file aspects of debian-cd ISO images.

File: merge_debian_isos.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
9 Alphabetic Options List
*************************

File: merge_debian_isos.info, Node: ConceptIdx, Next: Top, Prev: CommandIdx, Up: Top
10 Alphabetic List of Concepts and Objects
******************************************
[index]
* Menu:
* Bugs, reporting: Bugreport. (line 6)
* Examples: Examples. (line 6)
* merge_debian_isos, options: Options. (line 6)
* Problems, reporting: Bugreport. (line 6)

Tag Table:
Node: Top417
Node: Overview1014
Node: Options3381
Node: Examples3771
Node: ExPlain4196
Node: ExXorriso4870
Node: ExOptical5664
Node: ExDdTarget6448
Node: ExStdio7971
Node: Files8883
Node: Environ9039
Node: Seealso10104
Node: Bugreport10253
Node: Legal10838
Node: CommandIdx11666
Node: ConceptIdx11813

End Tag Table

BIN
test/merge_debian_isos.sig Normal file

Binary file not shown.

446
test/merge_debian_isos.texi Normal file
View File

@ -0,0 +1,446 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename merge_debian_isos.info
@settitle merge_debian_isos 1.5.7
@c %**end of header
@c
@c man-ignore-lines begin
@dircategory Archiving
@direntry
* Merge_debian_isos: (merge_debian_isos). Merge debian-cd ISO images to a single image
@end direntry
@c man-ignore-lines end
@c
@c Notes about embedded man page:
@c This texinfo code contains the necessary info to produce a man page.
@c One can produce it by applying the following rules:
@c The first line gets discarded.
@c Line start "@c man " will become "", the remainder is put out unaltered.
@c Lines "@*" will be converted to ".br"
@c "@c man-ignore-lines N" will discard N following lines.
@c "@c man-ignore-lines begin" discards all following lines
@c up to "@c man-ignore-lines end".
@c Line blocks of "@menu" "@end menu" will be discarded.
@c "@item word words" becomes "\fBword\fR words".
@c @b{...}, @command{...}, @dfn{...}, @emph{...}, @strong{...}
@c get mapped to \fB...\fR .
@c @abbr{...}, @code{...}, @file{...}, @i{...}, @option{...}, @r{...},
@c @ref{...}, @samp{...},@var{...}, get mapped to ... .
@c @ref{...}, @xref{...} get mapped to empty text.
@c @email{...} gets mapped to <...> .
@c Mapped {...} content is subject to the rules except {...} mapping.
@c @minus{} will become "-".
@c @@ , @{, @} will get stripped of their first @.
@c Other lines which begin by "@" will be discarded.
@c In lines not stemming from "@c man", "\" becomes "\\"
@c "-" which are not preceded by an uneven number of "\" will get
@c prepended one "\".
@c
@c
@c man .\" Hey, EMACS: -*- nroff -*-
@c man .\"
@c man .\" IMPORTANT NOTE:
@c man .\"
@c man .\" The original of this file is kept in test/merge_debian_isos.texi
@c man .\" This here was generated by program xorriso/make_xorriso_1
@c man .\"
@c man .\"
@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.7, Jun 07, 2023"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@c man .\" .nh disable hyphenation
@c man .\" .hy enable hyphenation
@c man .\" .ad l left justify
@c man .\" .ad b justify to both left and right margins
@c man .\" .nf disable filling
@c man .\" .fi enable filling
@c man .\" .br insert line break
@c man .\" .sp <n> insert n+1 empty lines
@c man .\" for manpage-specific macros, see man(7)
@c man .nh
@c man-ignore-lines begin
@copying
merge_debian_isos - sh script to merge multiple debian-cd ISO images
Copyright @copyright{} 2023 Thomas Schmitt
@quotation
Permission is granted to distribute this text freely.
@end quotation
@end copying
@c man-ignore-lines end
@titlepage
@title Manual of GNU xorriso companion merge_debian_isos 1.5.7
@author Thomas Schmitt
@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage
@contents
@ifnottex
@node Top
@top merge_debian_isos 1.5.7
@c man-ignore-lines 1
@c man .SH NAME
merge_debian_isos - Program to merge multiple debian-cd ISO images
@end ifnottex
@menu
* Overview:: Overview
* Options:: Options
* Examples:: Examples
* Files:: Files
* Environ:: Environment
* Seealso:: See also
* Bugreport:: Reporting bugs
* Legal:: Author, Copyright, Credits
* CommandIdx:: Alphabetic Option List
* ConceptIdx:: Alphabetic List of Concepts and Objects
@end menu
@node Overview, Options, Top, Top
@chapter Overview
@c man .SH SYNOPSIS
@c man .B merge_debian_isos
@c man result_iso mount_template iso1 iso2 [... isoN]
@c man .br
@c man .SH DESCRIPTION
@c man .PP
@command{merge_debian_isos}
mounts by @strong{sudo} the ISO 9660 images iso1 to isoN at directories
mount_template1 to mount_templateN, if not already mounted that way.
Then the Debian pools and package lists get merged and a new
ISO 9660 image result_iso is produced by a run of @strong{xorriso}.
If iso1 is bootable then
the new image will be bootable by the same means.
@*
@sp 1
@c man .PP
The file depicted by result_iso must not yet exist or has to be a
device which is acceptable for Linux-specific helper script
@strong{xorriso-dd-target}. If xorriso-dd-target agrees and the user
confirms by input "yes" then xorriso will be run under sudo.
@*
Exempted from this evaluation are addresses which begin by "mmc:"
for an optical drive on Linux, BSDs, Solaris, or by "stdio:/dev/"
for which the user takes full and dangerous responsibility.
@*
Special result_iso path @strong{xorriso-dd-target-plug-test} determines
on systems with Linux kernel the target USB stick by a dialog around plugging
it in.
xorriso will be run under sudo, if xorriso-dd-target agrees and
the user confirms by input "yes".
@*
@sp 1
@c man .PP
At least the parent directory of argument @strong{mount_template} must already
exist or has to be given by a plain name without "/" so that it can be
created in the current directory. (I.e. without even "./".)
@*
All arguments must be single words without using quotation marks.
None of the isoN must be equal to another isoM.
@*
@sp 1
@c man .PP
This script creates and finally removes the following temporary tree
and files which must not yet exist in the current working directory:
./merged_dists , ./merged_md5sum.txt , ./merged_REAMDE.txt
./temp_file
@*
Further it creates and finally removes directories mount_template*
if they are needed and do not exist when the script starts. If the
parent directory in the mount_template path does not exist and
its path contains no "/" then it gets created and finally removed.
The script depends on the following programs:
@*
awk, basename, cat, chmod, cp, date, dirname, expr, fgrep, grep,
gunzip, gzip, head, ls, md5sum, mkdir, mount, mv, rm, rmdir,
sed, sh, sha256sum, sort, stat, sudo, umount, uniq, xorriso
@*
With device writing involving helper script xorriso-dd-target:
@*
dd, Linux kernel, lsblk, sleep, tr, uname, wc, whoami,
xorriso-dd-target
@*
Recommended are: sha1sum, sha512sum
@c man .SS
@node Options, Examples, Overview, Top
@chapter Options
@cindex merge_debian_isos, options
@c man .br
@c man .SH OPTIONS
@c man .br
@c man .PP
merge_debian_isos has no command line options besides the input words described
above, but it reacts on some environment variables.
@c man .br
@c man See section ENVIRONMENT.
@*
@sp 1
@c man .PP
If less than 4 arguments are given, the script will print its help text to
standard error and exit with non-zero value, indicating failure.
@c man .SS
@node Examples, Files, Options, Top
@chapter Examples
@c man .SH EXAMPLES
@c man .SS
@c man .B Overview of examples:
@c man Merge DVD images 1 to 5
@c man .br
@c man Use GNU xorriso instead of installed xorriso
@c man .br
@c man Write result directly to an optical drive
@c man .br
@c man Write result directly and safely to USB stick (Linux only)
@c man .br
@c man Write result directly and unsafely to USB stick
@cindex Examples
@menu
* ExPlain:: Merge DVD images 1 to 5
* ExXorriso:: Use GNU xorriso instead of installed xorriso
* ExOptical:: Write result directly to an optical drive
* ExDdTarget:: Write result directly and safely to USB stick (Linux only)
* ExStdio:: Write result directly and unsafely to USB stick
@end menu
@c man .SS
@c man .B Merge DVD images 1 to 5
@node ExPlain, ExXorriso, Options, Examples
@section Merge DVD images 1 to 5
The resulting image will be named "merged.iso".
@*
Directory ./merge_mount/ will be created if not yet existing.
@*
@sp 1
merge_debian_isos merged.iso merge_mount/iso \
debian-11.2.0-amd64-DVD-[12345].iso
@*
@sp 1
Expect to see some harmless warnings like
@*
@sp 1
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
libisofs: WARNING : Cannot add /debian to Joliet tree. Symlinks can only be added to a Rock Ridge tree.
libisofs: WARNING : Image size exceeds 1024 cylinders. Cannot align partition.
@c man .SS
@c man .B Use GNU xorriso instead of installed xorriso
@node ExXorriso, ExOptical, ExPlain, Examples
@section Use GNU xorriso instead of installed xorriso
merge_debian_isos will refuse to work if the installed version of xorriso
is older than 1.4.2. In this case consider to download and 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.6 tarball in your $HOME directory and have successfully compiled
it, do:
@*
@sp 1
export XORRISO="$HOME"/xorriso-1.5.6/xorriso/xorriso
@*
@sp 1
merge_debian_isos merged.iso merge_mount/iso \
debian-11.2.0-amd64-DVD-[12345].iso
@c man .SS
@c man .B Write result directly to an optical drive
@node ExOptical, ExDdTarget, ExXorriso, Examples
@section Write result directly to an optical drive
xorriso is able to burn optical media on GNU/Linux (/dev/sr*),
Solaris (/dev/rdsk/*) , FreeBSD (/dev/cd*) , NetBSD (/dev/rcd*),
and OpenBSD (/dev/rcd*). Get a list of available optical drive devices by:
@*
@sp 1
xorriso -devices
@*
@sp 1
It might be that you need superuser powers for this and then have to enable
access to the device file for the user who runs merge_debian_isos.
@*
@sp 1
In order to directly write the merged ISO image to an optical medium,
use the desired device file path with prefix "mmc:":
@*
@sp 1
merge_debian_isos mmc:/dev/sr0 merge_mount/iso \
debian-11.2.0-amd64-DVD-[12345].iso
@c man .SS
@c man .B Write result directly and safely to USB stick (Linux only)
@node ExDdTarget, ExStdio, ExOptical, Examples
@section Write result directly and safely to USB stick (Linux only)
The Linux-specific script @strong{xorriso-dd-target} evaluates device files
whether they and their content look unimportant enough for being overwritten
by an image file.
@*
This mainly means that the storage device is attached to USB and contains
no filesystems which are not of type FAT or ISO 9660.
@*
You may get xorriso-dd-target by:
@*
@sp 1
wget \
https://dev.lovelyhq.com/libburnia/libisoburn/raw/master/xorriso-dd-target/xorriso-dd-target
chmod u+x xorriso-dd-target
@*
@sp 1
Consider to also download xorriso-dd-target.sig and to verify the script by
@*
@sp 1
gpg --verify xorriso-dd-target.sig xorriso-dd-target
@*
@sp 1
Announce the storage location of the downloaded xorriso-dd-target:
@*
@sp 1
export XORRISO_DD_TARGET_PATH="$(pwd)"
@*
@sp 1
The prepared use case in merge_debian_isos uses the xorriso-dd-target
option -plug_test under @strong{sudo}, which asks the user for first having
the desired USB stick unplugged so that the unwanted devices can get
registered. Then it asks the user to plug in the USB stick, so that it gets
recognized as desired target.
@*
xorriso-dd-target evaluates the content and decides whether it looks
disposable enough. If so, then it allows merge_debian_isos to write its
result to the device.
@*
@sp 1
merge_debian_isos xorriso-dd-target-plug-test merge_mount/iso \
debian-11.2.0-amd64-DVD-[12345].iso
@c man .SS
@c man .B Write result directly and unsafely to USB stick
@node ExStdio, Files, ExDdTarget, Examples
@section Write result directly and unsafely to USB stick
On operating systems other than GNU/Linux or with storage devices not
acceptable to xorriso-dd-target it is possible to remove all safety
precautions beyond those of xorriso, which can be overcome by "blanking"
the device.
@*
So after due evaluation of the device situation and on your very own risk
you may use the device path prefix "stdio:", possibly with superuser powers:
@*
@sp 1
xorriso -outdev stdio:/dev/sdd -blank as_needed
merge_debian_isos stdio:/dev/sdd merge_mount/iso \
debian-11.2.0-amd64-DVD-[12345].iso
For details about "stdio:" and pseudo-blanking non-optical devices read
man xorriso.
@*
The xorriso run in merge_debian_isos ignores locally defined xorriso startup
files (by command -no_rc).
@node Files, Environ, Examples, Top
@chapter Files
@c man .SH FILES
For now, no files are defined for configuration.
@c man .SH ENVIRONMENT
@node Environ, Seealso, Files, Top
@chapter Environ
The following environment variables influence the program behavior:
@*
Exported non-empty variable MERGE_DATE enforces a particular
date string in the text which gets prepended to /README.txt .
@*
Exported non-empty variable MERGE_FOR_DIST enforces the use of a
particular directory in /dists of iso1. Normally only one
such directory is found and thus no need to set MERGE_FOR_DIST.
@*
Exported non-empty variable MERGE_KEEP_ISO prevents the removal
of result_iso after xorriso indicated failure of production.
@*
Exported non-empty variable XORRISO gives the path to a xorriso binary,
which will be used instead of the system-wide installed xorriso binary.
This may be needed if installed xorriso is older than 1.4.2.
@*
If XORRISO is set to "dummy" then no new ISO will emerge.
@*
Exported non-empty variable XORRISO_DD_TARGET_PATH names the
directory where to find xorriso-dd-target, which evaluates the
suitability of result_iso devices or does the plug-test dialog.
@*
@c man .SH SEE ALSO
@c man .BR xorriso(1),
@c man .BR xorriso-dd-target(1),
@c man-ignore-lines begin
@node Seealso, Bugreport, Environ, Top
@chapter See also
xorriso(1), xorriso-dd-target(1)
@c man-ignore-lines end
@c man .SH BUGS
@node Bugreport, Legal, Seealso, Top
@chapter Reporting bugs
@cindex Bugs, reporting
@cindex Problems, reporting
To report bugs, request help, or suggest enhancements for
@command{merge_debian_isos},
please send electronic mail to the public list @email{bug-xorriso@@gnu.org}.
If more privacy is desired, mail to @email{scdbackup@@gmx.net}.
@*
@sp 1
Please describe what you expect the program to do, the program arguments
which you used, the messages of @command{merge_debian_isos}, and the
undesirable outcome of your program run.
@*
@sp 1
Expect to get asked more questions before solutions can be proposed.
@c man .SH AUTHOR
@node Legal, CommandIdx, Bugreport, Top
@chapter Author, Copyright, Credits
@section Author
Thomas Schmitt <scdbackup@@gmx.net>
@*
for libburnia-project.org
@c man .SH COPYRIGHT
@section Copyright
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 merge_debian_isos
then you are entitled to modify this text under that same license.
@c man .SH CREDITS
@section Credits
@command{merge_debian_isos} was originally developed with advise and testing
by Zhang Boyang in the course of Debian bug #1011343. Steve McIntyre provided
information about various file aspects of debian-cd ISO images.
@c man-ignore-lines begin
@node CommandIdx, ConceptIdx, Legal, Top
@chapter Alphabetic Options List
@printindex ky
@node ConceptIdx, Top, CommandIdx, Top
@chapter Alphabetic List of Concepts and Objects
@printindex cp
@c man-ignore-lines end
@bye

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# Copyright (c) 2019 - 2021 # Copyright (c) 2019 - 2023
# Nio Wiklund alias sudodus <nio dot wiklund at gmail dot com> # Nio Wiklund alias sudodus <nio dot wiklund at gmail dot com>
# Thomas Schmitt <scdbackup@gmx.net> # Thomas Schmitt <scdbackup@gmx.net>
# Provided under GPL version 2 or later. # Provided under GPL version 2 or later.
@ -15,7 +15,7 @@
# announces. # announces.
xdt_print_version() { xdt_print_version() {
echo "xorriso-dd-target , version 1.5.4 , 2021.01.30.150001" echo "xorriso-dd-target , version 1.5.7 , 2023.06.07.200919"
} }
@ -429,7 +429,7 @@ xdt_plug_in_watcher() {
echo >&2 echo >&2
echo "Step 1:" >&2 echo "Step 1:" >&2
echo "Please make sure that the desired target device is plugged _out_ now." >&2 echo "Please make sure that the desired target device is plugged _out_ now." >&2
echo "If it is currently plugged in, make sure to unmount all its fileystems" >&2 echo "If it is currently plugged in, make sure to unmount all its filesystems" >&2
echo "and then unplug it." >&2 echo "and then unplug it." >&2
echo "Press the Enter key when ready." >&2 echo "Press the Enter key when ready." >&2
read xdt_dummy read xdt_dummy

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH XORRISO-DD-TARGET 1 "Version 1.5.4, Jan 30, 2021" .TH XORRISO-DD-TARGET 1 "Version 1.5.7, Jun 07, 2023"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -205,7 +205,7 @@ Step 1:
.br .br
Please make sure that the desired target device is plugged _out_ now. Please make sure that the desired target device is plugged _out_ now.
.br .br
If it is currently plugged in, make sure to unmount all its fileystems If it is currently plugged in, make sure to unmount all its filesystems
.br .br
and then unplug it. and then unplug it.
.br .br
@ -564,7 +564,7 @@ Thomas Schmitt <scdbackup@gmx.net>
.br .br
for libburnia\-project.org for libburnia\-project.org
.SH COPYRIGHT .SH COPYRIGHT
Copyright (c) 2019 \- 2021 Thomas Schmitt Copyright (c) 2019 \- 2023 Thomas Schmitt
.br .br
Permission is granted to distribute this text freely. It shall only be Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of xorriso\-dd\-target. modified in sync with the technical properties of xorriso\-dd\-target.

View File

@ -3,7 +3,7 @@ xorriso-dd-target.texi.
xorriso-dd-target - Device evaluator and disk image copier for GNU/Linux xorriso-dd-target - Device evaluator and disk image copier for GNU/Linux
Copyright (C) 2021 Thomas Schmitt Copyright (C) 2023 Thomas Schmitt
Permission is granted to distribute this text freely. Permission is granted to distribute this text freely.
INFO-DIR-SECTION Archiving INFO-DIR-SECTION Archiving
@ -14,7 +14,7 @@ END-INFO-DIR-ENTRY
 
File: xorriso-dd-target.info, Node: Top, Next: Overview, Up: (dir) File: xorriso-dd-target.info, Node: Top, Next: Overview, Up: (dir)
xorriso-dd-target 1.5.4 xorriso-dd-target 1.5.7
*********************** ***********************
xorriso-dd-target - Device evaluator and disk image copier for GNU/Linux xorriso-dd-target - Device evaluator and disk image copier for GNU/Linux
@ -178,7 +178,7 @@ Caused by option -plug_test: Attempt to find the desired device by
watching it appear after being plugged in. watching it appear after being plugged in.
Step 1: Step 1:
Please make sure that the desired target device is plugged _out_ now. Please make sure that the desired target device is plugged _out_ now.
If it is currently plugged in, make sure to unmount all its fileystems If it is currently plugged in, make sure to unmount all its filesystems
and then unplug it. and then unplug it.
Press the Enter key when ready. Press the Enter key when ready.
@ -478,7 +478,7 @@ for libburnia-project.org
14.2 Copyright 14.2 Copyright
============== ==============
Copyright (c) 2019 - 2021 Thomas Schmitt Copyright (c) 2019 - 2023 Thomas Schmitt
Permission is granted to distribute this text freely. It shall only be Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of xorriso-dd-target. If modified in sync with the technical properties of xorriso-dd-target. If
you make use of the license to derive modified versions of you make use of the license to derive modified versions of
@ -563,16 +563,16 @@ Node: Simplenames2789
Node: Listall3513 Node: Listall3513
Node: Givendevices5086 Node: Givendevices5086
Node: Plugtest6050 Node: Plugtest6050
Node: Dowrite7955 Node: Dowrite7956
Node: Unwise9336 Node: Unwise9337
Node: Reasons10958 Node: Reasons10959
Node: Options13539 Node: Options13540
Node: Examples17147 Node: Examples17148
Node: Files17320 Node: Files17321
Node: Seealso17478 Node: Seealso17479
Node: Bugreport17644 Node: Bugreport17645
Node: Legal18231 Node: Legal18232
Node: CommandIdx18942 Node: CommandIdx18943
Node: ConceptIdx20281 Node: ConceptIdx20282
 
End Tag Table End Tag Table

Binary file not shown.

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*- \input texinfo @c -*-texinfo-*-
@c %**start of header @c %**start of header
@setfilename xorriso-dd-target.info @setfilename xorriso-dd-target.info
@settitle GNU xorriso-dd-target 1.5.4 @settitle GNU xorriso-dd-target 1.5.7
@c %**end of header @c %**end of header
@c @c
@c man-ignore-lines begin @c man-ignore-lines begin
@ -48,7 +48,7 @@
@c man .\" First parameter, NAME, should be all caps @c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @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 .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO-DD-TARGET 1 "Version 1.5.4, Jan 30, 2021" @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 .\" Please adjust this date whenever revising the manpage.
@c man .\" @c man .\"
@c man .\" Some roff macros, for reference: @c man .\" Some roff macros, for reference:
@ -66,7 +66,7 @@
@copying @copying
xorriso-dd-target - Device evaluator and disk image copier for GNU/Linux xorriso-dd-target - Device evaluator and disk image copier for GNU/Linux
Copyright @copyright{} 2021 Thomas Schmitt Copyright @copyright{} 2023 Thomas Schmitt
@quotation @quotation
Permission is granted to distribute this text freely. Permission is granted to distribute this text freely.
@ -74,7 +74,7 @@ Permission is granted to distribute this text freely.
@end copying @end copying
@c man-ignore-lines end @c man-ignore-lines end
@titlepage @titlepage
@title Manual of GNU xorriso companion xorriso-dd-target 1.5.4 @title Manual of GNU xorriso companion xorriso-dd-target 1.5.7
@author Thomas Schmitt @author Thomas Schmitt
@page @page
@vskip 0pt plus 1filll @vskip 0pt plus 1filll
@ -83,7 +83,7 @@ Permission is granted to distribute this text freely.
@contents @contents
@ifnottex @ifnottex
@node Top @node Top
@top xorriso-dd-target 1.5.4 @top xorriso-dd-target 1.5.7
@c man-ignore-lines 1 @c man-ignore-lines 1
@c man .SH NAME @c man .SH NAME
@ -305,7 +305,7 @@ Step 1:
@* @*
Please make sure that the desired target device is plugged _out_ now. Please make sure that the desired target device is plugged _out_ now.
@* @*
If it is currently plugged in, make sure to unmount all its fileystems If it is currently plugged in, make sure to unmount all its filesystems
@* @*
and then unplug it. and then unplug it.
@* @*
@ -730,7 +730,7 @@ Thomas Schmitt <scdbackup@@gmx.net>
for libburnia-project.org for libburnia-project.org
@c man .SH COPYRIGHT @c man .SH COPYRIGHT
@section Copyright @section Copyright
Copyright (c) 2019 - 2021 Thomas Schmitt Copyright (c) 2019 - 2023 Thomas Schmitt
@* @*
Permission is granted to distribute this text freely. It shall only be Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of xorriso-dd-target. modified in sync with the technical properties of xorriso-dd-target.

View File

@ -4,7 +4,7 @@
GNU xorriso. By Thomas Schmitt <scdbackup@gmx.net> GNU xorriso. By Thomas Schmitt <scdbackup@gmx.net>
Derived from and supported by libburnia-project.org, published via: 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_eng.html
http://www.gnu.org/software/xorriso/xorriso-1.5.4.tar.gz http://www.gnu.org/software/xorriso/xorriso-1.5.7.tar.gz
Provided under GPL version 3 or later. No warranty. 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 If they were present at compile time, then the optional libraries have to
be present at runtime, too. be present at runtime, too.
Obtain xorriso-1.5.4.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.4.tar.gz tar xzf xorriso-1.5.7.tar.gz
cd xorriso-1.5.4 cd xorriso-1.5.7
Within that directory execute: 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. 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 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 newline character. The first 25 say "xorriso sector bitmap v2 " or
remaining six characters give the size of the info text as decimal number. "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 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 by xorriso. They are rather to inform a human reader about the media type
and its track layout. and its track layout.
After the info text there are two 4 byte signed integers, most significant After the info text there are two signed integers, most significant byte
byte first. The first one, N, gives the number of bits in the following bitmap first. The number of bytes per integer is 4 for "v2" and 8 for "v3".
and the second number S gives the number of 2 KiB blocks governed by a single 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. 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 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. 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 This binary is very lean but depends on properly installed libraries of
suitable revision. suitable revision.
Dynamic library and compile time header requirements for libisoburn-1.5.4 : Dynamic library and compile time header requirements for libisoburn-1.5.6 :
- libburn.so.4 , version libburn-1.5.4 or higher - libburn.so.4 , version libburn-1.5.6 or higher
- libisofs.so.6 , version libisofs-1.5.4 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 libisoburn and xorriso will not start with libraries which are older than their
headers seen at compile time. So compile in the oldest possible installation headers seen at compile time. So compile in the oldest possible installation
setup unless you have reason to enforce a newer bug fix level. setup unless you have reason to enforce a newer bug fix level.
@ -521,7 +524,7 @@ By Mario Danic <mario.danic@gmail.com>, libburn, libisofs
Vreixo Formoso <metalpain2002@yahoo.es>, libisofs, libisoburn Vreixo Formoso <metalpain2002@yahoo.es>, libisofs, libisoburn
Thomas Schmitt <scdbackup@gmx.net>, libburn, libisofs, Thomas Schmitt <scdbackup@gmx.net>, libburn, libisofs,
libisoburn, xorriso libisoburn, xorriso
Copyright (C) 2006-2021 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 libburnia-project.org is inspired by and in libburn still containing parts
of old of old
@ -540,7 +543,7 @@ Copyright (C) 2019-2021 Nio Wiklund alias sudodus, Thomas Schmitt
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
This text itself is This text itself is
Copyright (c) 2007 - 2021 Thomas Schmitt <scdbackup@gmx.net> Copyright (c) 2007 - 2024 Thomas Schmitt <scdbackup@gmx.net>
and is freely distributable. and is freely distributable.
It shall only be modified in sync with the technical properties of xorriso. 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 If you make use of the license to derive modified versions of xorriso

View File

@ -3,7 +3,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2020 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
@ -121,6 +121,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->initial_wdx[0]= 0; m->initial_wdx[0]= 0;
m->no_rc= 0; m->no_rc= 0;
m->argument_emulation= 0; m->argument_emulation= 0;
m->current_interpreter= 0;
m->rc_filename_count= Xorriso_rc_nuM; m->rc_filename_count= Xorriso_rc_nuM;
for(i=0;i<m->rc_filename_count-1;i++) for(i=0;i<m->rc_filename_count-1;i++)
@ -238,6 +239,10 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->indev_off_adr[0]= 0; m->indev_off_adr[0]= 0;
m->isofs_st_in= 0; m->isofs_st_in= 0;
m->volset_change_pending= 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->no_volset_present= 0;
m->in_sector_map= NULL; m->in_sector_map= NULL;
m->check_media_default= NULL; m->check_media_default= NULL;
@ -264,6 +269,8 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->alignment= 0; m->alignment= 0;
m->do_stream_recording= 0; m->do_stream_recording= 0;
m->dvd_obs= 0; m->dvd_obs= 0;
m->do_obs_pad= 0;
m->bdr_obs_exempt= 0;
m->modesty_on_drive= 0; m->modesty_on_drive= 0;
m->min_buffer_usec= 5000; m->min_buffer_usec= 5000;
m->max_buffer_usec= 25000; m->max_buffer_usec= 25000;
@ -320,6 +327,8 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->iso_mbr_part_flag= 0; m->iso_mbr_part_flag= 0;
memset(m->gpt_guid, 0, 16); memset(m->gpt_guid, 0, 16);
m->gpt_guid_mode= 0; m->gpt_guid_mode= 0;
m->max_ce_entries= 31; /* Linux hates >= RR_MAX_CE_ENTRIES = 32 */
m->max_ce_entries_flag= 2; /* omit non-isofs fattr and ACL if needed */
m->ascii_disc_label[0]= 0; m->ascii_disc_label[0]= 0;
m->grub2_sparc_core[0]= 0; m->grub2_sparc_core[0]= 0;
memset(m->hfsp_serial_number, 0, 8); memset(m->hfsp_serial_number, 0, 8);

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. Provided under GPL version 2 or later.
@ -39,14 +39,14 @@
struct SpotlistiteM { struct SpotlistiteM {
int start_lba; off_t start_lba;
int blocks; off_t blocks;
int quality; int quality;
struct SpotlistiteM *next; 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) int quality, int flag)
{ {
struct SpotlistiteM *m; struct SpotlistiteM *m;
@ -76,9 +76,9 @@ int Spotlistitem_destroy(struct SpotlistiteM **o, int flag)
struct SpotlisT { struct SpotlisT {
struct SpotlistiteM *list_start; struct SpotlistiteM *list_start;
struct SpotlistiteM *list_end; struct SpotlistiteM *list_end;
int list_count; off_t list_count;
struct SpotlistiteM *current_item; 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 quality, int flag)
{ {
int ret; int ret;
@ -135,8 +135,9 @@ int Spotlist_add_item(struct SpotlisT *o, int start_lba, int blocks,
(o->list_count)++; (o->list_count)++;
if(debug_verbous) {char quality_name[80]; if(debug_verbous) {char quality_name[80];
fprintf(stderr, "debug: lba %10d , size %10d , quality '%s'\n", fprintf(stderr, "debug: lba %10.f , size %10.f , quality '%s'\n",
start_lba, blocks, Spotlist__quality_name(quality, quality_name, (double) start_lba, (double) blocks,
Spotlist__quality_name(quality, quality_name,
Xorriso_read_quality_invaliD, 0) + 2); 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; 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; struct SpotlistiteM *li;
for(li= o->list_start; li != NULL; li= li->next) { 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; struct SpotlistiteM *li;
sector_size= read_chunk * 2048; 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 Spotlist_get_item(struct SpotlisT *o, off_t idx,
int *start_lba, int *blocks, int *quality, int flag) off_t *start_lba, off_t *blocks, int *quality, int flag)
{ {
int i; off_t i;
struct SpotlistiteM *li; struct SpotlistiteM *li;
if(idx < 0 || idx > o->list_count) if(idx < 0 || idx > o->list_count)
@ -249,7 +250,7 @@ char *Spotlist__quality_name(int quality, char name[80], int bad_limit,
/* ---------------------------- SectorbitmaP ------------------------------ */ /* ---------------------------- 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) int flag)
{ {
struct SectorbitmaP *m; 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 Sectorbitmap_from_file(struct SectorbitmaP **o, char *path, char *msg,
int *os_errno, int flag) 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 *map;
unsigned char *buf; unsigned char *buf, buf_head[26];
buf= TSOB_FELD(unsigned char, bufsize); buf= TSOB_FELD(unsigned char, bufsize);
if(buf == NULL) if(buf == NULL)
return(-1); return(-1);
buf_head[0]= 0;
*os_errno= 0; *os_errno= 0;
if(msg != NULL) if(msg != NULL)
@ -319,9 +323,12 @@ wrong_filetype:;
} }
ret= 0; goto ex; ret= 0; goto ex;
} }
if(strncmp((char *) buf, "xorriso sector bitmap v1 ", 32) == 0) if(strncmp((char *) buf, "xorriso sector bitmap v1 ", 32) == 0) {
/* ok */; memcpy(buf_head, buf, 25);
else if(strncmp((char *) buf, "xorriso sector bitmap v2 ", 25) == 0) { } 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; skip= -1;
sscanf(((char *) buf) + 25, "%d", &skip); sscanf(((char *) buf) + 25, "%d", &skip);
if(skip < 0) if(skip < 0)
@ -336,17 +343,33 @@ wrong_filetype:;
} }
} else } else
{ret= 0; goto wrong_filetype;} {ret= 0; goto wrong_filetype;}
ret= read(fd, buf, 8); if(strncmp((char *) buf_head, "xorriso sector bitmap v1 ", 25) == 0 ||
if(ret < 4) strncmp((char *) buf_head, "xorriso sector bitmap v2 ", 25) == 0) {
goto wrong_filetype; ret= read(fd, buf, 8);
sectors= (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; if(ret < 8)
sector_size= (buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7]; goto wrong_filetype;
if(sectors <= 0 || sector_size <= 0) if((buf[0] & 128) || (buf[4] & 128))
goto wrong_filetype; 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); ret= Sectorbitmap_new(o, sectors, sector_size, 0);
if(ret <= 0) { if(ret <= 0) {
if(msg != NULL) 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; ret= -1; goto ex;
} }
map= (*o)->map; map= (*o)->map;
@ -375,7 +398,8 @@ ex:;
int Sectorbitmap_to_file(struct SectorbitmaP *o, char *path, char *info, int Sectorbitmap_to_file(struct SectorbitmaP *o, char *path, char *info,
char *msg, int *os_errno, int flag) 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]; unsigned char buf[40];
*os_errno= 0; *os_errno= 0;
@ -389,6 +413,8 @@ int Sectorbitmap_to_file(struct SectorbitmaP *o, char *path, char *info,
ret= 0; goto ex; ret= 0; goto ex;
} }
if(o->sectors > 0x7fffffff || o->sector_size > 0x7fffffff)
version= 3;
l= 0; l= 0;
if(info != NULL) if(info != NULL)
l= strlen(info); 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"); strcpy(msg, "Info string is longer than 999999 bytes");
ret= 0; goto ex; 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); ret= write(fd, buf, 32);
if(ret != 32) { if(ret != 32) {
@ -414,13 +440,24 @@ cannot_write:;
goto cannot_write; goto cannot_write;
} }
for(j= 0; j < 4; j++) { if(version == 2) {
buf[j]= o->sectors >> (24 - j * 8); for(j= 0; j < 4; j++) {
buf[j+4]= o->sector_size >> (24 - j * 8); 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); ret= write(fd, o->map, o->map_size);
if(ret != o->map_size) if(ret != o->map_size)
goto cannot_write; goto cannot_write;
@ -435,7 +472,7 @@ ex:;
/* @param flag bit0= sector bit value /* @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) if(sector < 0 || sector >= o->sectors)
return(0); return(0);
@ -450,9 +487,9 @@ int Sectorbitmap_set(struct SectorbitmaP *o, int sector, int flag)
/* @param flag bit0= sector bit value /* @param flag bit0= sector bit value
*/ */
int Sectorbitmap_set_range(struct SectorbitmaP *o, 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; unsigned char value;
if(start_sector < 0 || start_sector + sectors > o->sectors || sectors < 1) 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) if(sector < 0 || sector >= o->sectors)
return(0); 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, int Sectorbitmap_bytes_are_set(struct SectorbitmaP *o,
off_t start_byte, off_t end_byte, int flag) 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; end_sector= end_byte / o->sector_size;
for(i= start_byte / o->sector_size; i <= end_sector; i++) 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 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; *sectors= o->sectors;
*sector_size= o->sector_size; *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 Sectorbitmap_copy(struct SectorbitmaP *from, struct SectorbitmaP *to,
int flag) int flag)
{ {
int i, run_start, run_value, start_sec, limit_sec, start_aligned; int run_value, start_aligned, end_complete;
int end_complete; off_t i, run_start, start_sec, limit_sec;
if(((off_t) from->sectors) * ((off_t) from->sector_size) > if(((off_t) from->sectors) * ((off_t) from->sector_size) >
((off_t) to->sectors) * ((off_t) to->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); return(1);
} }
run_start= 0; 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++) { for(i= 1; i <= from->sectors; i++) {
if(i < from->sectors) if(i < from->sectors)
if(Sectorbitmap_is_set(from, i, 0) == run_value) 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) { strncmp(argv[i], "min_lba=", 8) == 0) {
num= -1; num= -1;
sscanf(argv[i] + 8, "%lf", &num); sscanf(argv[i] + 8, "%lf", &num);
if(num > 0x7fffffff || num < 0) if(num > 0x7fffffffffffffff || num < 0)
num= -1; num= -1;
if(strncmp(argv[i], "max_lba=", 8) == 0) if(strncmp(argv[i], "max_lba=", 8) == 0)
job->max_lba= num; 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') { else if(argv[i][11] >= '1' && argv[i][11] <= '9') {
num= -1; num= -1;
sscanf(argv[i] + 11, "%lf", &num); sscanf(argv[i] + 11, "%lf", &num);
if(num > 0x7fffffff || num < 0) if(num > 0x7fffffffffffffff || num < 0)
goto bad_value; goto bad_value;
job->patch_lba0_msc1= num; job->patch_lba0_msc1= num;
job->patch_lba0= (num >= 32) + (strstr(argv[i] + 11, ":force") != NULL); 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", sprintf(report + strlen(report), " what=%s",
job->mode == 1 ? "disc" : "tracks"); job->mode == 1 ? "disc" : "tracks");
if(all || job->min_lba != dflt->min_lba) 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) 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) if(all || job->retry != dflt->retry)
sprintf(report + strlen(report), " retry=%s", sprintf(report + strlen(report), " retry=%s",
job->retry == 1 ? "on" : job->retry == -1 ? "off" : "default"); 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) if(job->patch_lba0 == 0)
sprintf(report + strlen(report), "off"); sprintf(report + strlen(report), "off");
else if(job->patch_lba0_msc1 >= 0) else if(job->patch_lba0_msc1 >= 0)
sprintf(report + strlen(report), "%d%s", sprintf(report + strlen(report), "%.f%s",
job->patch_lba0_msc1, job->patch_lba0 == 2 ? ":force" : ""); (double) job->patch_lba0_msc1,
job->patch_lba0 == 2 ? ":force" : "");
else else
sprintf(report + strlen(report), "%s", sprintf(report + strlen(report), "%s",
job->patch_lba0 == 2 ? "force" : "on"); job->patch_lba0 == 2 ? "force" : "on");
@ -942,7 +980,8 @@ int Xorriso_sectormap_to_spotlist(struct XorrisO *xorriso,
int flag) int flag)
{ {
struct SectorbitmaP *map; 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; map= job->sector_map;
if(map == NULL) if(map == NULL)
@ -1005,14 +1044,16 @@ ex:;
*/ */
int Xorriso_spotlist_to_sectormap(struct XorrisO *xorriso, int Xorriso_spotlist_to_sectormap(struct XorrisO *xorriso,
struct SpotlisT *spotlist, struct SpotlisT *spotlist,
int read_chunk, off_t read_chunk,
struct SectorbitmaP **map, struct SectorbitmaP **map,
int flag) int flag)
{ {
struct SectorbitmaP *m; struct SectorbitmaP *m;
int map_sectors= -1, map_sector_size= -1, valid; int valid;
int list_sectors, list_blocks, sector_size, sector_blocks; off_t map_sectors= -1, map_sector_size= -1;
int replace_map= 0, count, i, lba, blocks, quality, ret, pass; 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_size= Spotlist_sector_size(spotlist, read_chunk, 0);
sector_blocks= sector_size / 2048; sector_blocks= sector_size / 2048;
@ -1032,11 +1073,8 @@ int Xorriso_spotlist_to_sectormap(struct XorrisO *xorriso,
m= *map; m= *map;
else { else {
if(*map != NULL) { if(*map != NULL) {
if(((off_t) (*map)->sectors) * ((off_t) (*map)->sector_size) > if((*map)->sectors * (*map)->sector_size > list_sectors * sector_size)
((off_t) list_sectors) * ((off_t) sector_size)) list_sectors= (*map)->sectors * (*map)->sector_size / sector_size + 1;
list_sectors= (((off_t) (*map)->sectors) *
((off_t) (*map)->sector_size)) / ((off_t) sector_size)
+ 1;
} }
ret= Sectorbitmap_new(&m, list_sectors, sector_size, 0); ret= Sectorbitmap_new(&m, list_sectors, sector_size, 0);
if(ret <= 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, 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) struct CheckmediajoB *job, int flag)
{ {
int sectors, sector_size, sector_blocks, ret; int ret;
off_t sectors, sector_size, sector_blocks;
struct SectorbitmaP *map; struct SectorbitmaP *map;
Sectorbitmap_destroy(&(xorriso->in_sector_map), 0); Sectorbitmap_destroy(&(xorriso->in_sector_map), 0);

View File

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

View File

@ -1,9 +1,9 @@
# configure.ac stems from xorriso/configure_ac.txt and leads to ./configure # configure.ac stems from xorriso/configure_ac.txt and leads to ./configure
# Copyright (c) 2007 - 2021 Thomas Schmitt <scdbackup@gmx.net> # Copyright (c) 2007 - 2023 Thomas Schmitt <scdbackup@gmx.net>
# Provided under GPL version 2 or later. # Provided under GPL version 2 or later.
AC_INIT([xorriso], [1.5.4], [http://libburnia-project.org]) AC_INIT([xorriso], [1.5.7], [http://libburnia-project.org])
AC_PREREQ([2.50]) AC_PREREQ([2.50])
AC_CANONICAL_HOST AC_CANONICAL_HOST
@ -23,14 +23,14 @@ AC_DEFINE([Xorriso_standalonE], [])
BURN_MAJOR_VERSION=1 BURN_MAJOR_VERSION=1
BURN_MINOR_VERSION=5 BURN_MINOR_VERSION=5
BURN_MICRO_VERSION=4 BURN_MICRO_VERSION=7
AC_SUBST(BURN_MAJOR_VERSION) AC_SUBST(BURN_MAJOR_VERSION)
AC_SUBST(BURN_MINOR_VERSION) AC_SUBST(BURN_MINOR_VERSION)
AC_SUBST(BURN_MICRO_VERSION) AC_SUBST(BURN_MICRO_VERSION)
LIBISOFS_MAJOR_VERSION=1 LIBISOFS_MAJOR_VERSION=1
LIBISOFS_MINOR_VERSION=5 LIBISOFS_MINOR_VERSION=5
LIBISOFS_MICRO_VERSION=4 LIBISOFS_MICRO_VERSION=7
AC_SUBST(LIBISOFS_MAJOR_VERSION) AC_SUBST(LIBISOFS_MAJOR_VERSION)
AC_SUBST(LIBISOFS_MINOR_VERSION) AC_SUBST(LIBISOFS_MINOR_VERSION)
AC_SUBST(LIBISOFS_MICRO_VERSION) AC_SUBST(LIBISOFS_MICRO_VERSION)

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2019 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
@ -300,11 +300,14 @@ unrecognizable:;
/* @param flag bit0= for Xorriso_msgs_submit: use pager /* @param flag bit0= for Xorriso_msgs_submit: use pager
bit1= do not issue warnings bit1= do not issue warnings
bit2= warn about dangling link
bit3= report sorry if dangling link
*/ */
int Xorriso_hop_link(struct XorrisO *xorriso, char *link_path, int Xorriso_hop_link(struct XorrisO *xorriso, char *link_path,
struct LinkiteM **link_stack, struct stat *stbuf, int flag) struct LinkiteM **link_stack, struct stat *stbuf, int flag)
{ {
int ret; int ret;
char *severity;
struct LinkiteM *litm; struct LinkiteM *litm;
if(*link_stack != NULL) { if(*link_stack != NULL) {
@ -318,8 +321,19 @@ int Xorriso_hop_link(struct XorrisO *xorriso, char *link_path,
} }
} }
ret= stat(link_path, stbuf); ret= stat(link_path, stbuf);
if(ret==-1) if(ret == -1) {
if(flag & (4 | 8)) {
if(flag & 8)
severity= "SORRY";
else
severity= "WARNING";
sprintf(xorriso->info_text, "Non-existing link target with : ");
Text_shellsafe(link_path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, severity,
flag & 1);
}
return(0); return(0);
}
ret= Linkitem_find(*link_stack, stbuf->st_dev, stbuf->st_ino, &litm, 0); ret= Linkitem_find(*link_stack, stbuf->st_dev, stbuf->st_ino, &litm, 0);
if(ret>0) { if(ret>0) {
sprintf(xorriso->info_text, "Detected symbolic link loop around : "); sprintf(xorriso->info_text, "Detected symbolic link loop around : ");
@ -1829,11 +1843,11 @@ int Xorriso_afile_fopen(struct XorrisO *xorriso,
bit3= do not care for device filetype bit3= do not care for device filetype
*/ */
int Xorriso_make_mount_cmd(struct XorrisO *xorriso, char *cmd, 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) char *devadr, char result[SfileadrL], int flag)
{ {
int ret, reg_file= 0, is_safe= 0, sys_code= 0; 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 *vars[5][2], *sfe= NULL, *volid_sfe= NULL, *cpt, *sysname;
char *cooked_dev= NULL, *eff_dev; char *cooked_dev= NULL, *eff_dev;
struct stat stbuf; struct stat stbuf;
@ -1937,7 +1951,7 @@ int Xorriso_make_mount_cmd(struct XorrisO *xorriso, char *cmd,
} }
sprintf(session_text, "%d", session); sprintf(session_text, "%d", session);
sprintf(track_text, "%d", track); sprintf(track_text, "%d", track);
sprintf(lba_text, "%d", lba); sprintf(lba_text, "%.f", (double) lba);
vars[0][0]= "sbsector"; vars[0][0]= "sbsector";
vars[0][1]= lba_text; vars[0][1]= lba_text;
vars[1][0]= "track"; vars[1][0]= "track";
@ -2172,3 +2186,108 @@ ex:;
Xorriso_wait_child_end(xorriso, forked_pid, &status, 0); Xorriso_wait_child_end(xorriso, forked_pid, &status, 0);
return(ret); return(ret);
} }
/* flag: bit0= *capacity is a desired value.
Try SEEK_SET with *capacity
bit1= open for writing
return: 0= no random access , -1= cannot open path
1= *capacity is valid
*/
int Xorriso_lseek_capacity(struct XorrisO *xorriso, char *path,
off_t *capacity, int flag)
{
int fd;
off_t seek_result;
if(flag & 2)
fd= open(path, O_WRONLY);
else
fd= open(path, O_RDONLY);
if(fd < 0) {
sprintf(xorriso->info_text,
"Cannot open for determination of random-access capacity: ");
Text_shellsafe(path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE", 0);
return(-1);
}
if(flag & 1) {
seek_result= lseek(fd, *capacity, SEEK_SET);
} else {
seek_result= lseek(fd, 0, SEEK_END);
}
close(fd);
if(seek_result < 0)
return(0);
*capacity= seek_result;
return(1);
}
/* flag: bit0= *capacity is a desired value.
If SEEK_END fails, try SEEK_SET with *capacity
bit1= open for writing
return: 0= no random access , -1= path does not exist , -2= wrong type
-3= cannot open path
1= *capacity is valid
*/
int Xorriso_determine_capacity(struct XorrisO *xorriso, char *path,
off_t *capacity, char **reason, int flag)
{
int ret;
off_t src_size, src_seek_size= -1;
struct stat stbuf;
if(reason != NULL)
*reason= "offers no random access";
if(lstat(path, &stbuf) == -1) {
*capacity= 0;
if(reason != NULL)
*reason= "does not exist";
return(-1);
}
if(S_ISREG(stbuf.st_mode)) {
src_size= stbuf.st_size;
} else if(!(S_ISDIR(stbuf.st_mode) || S_ISLNK(stbuf.st_mode) ||
S_ISFIFO(stbuf.st_mode) || S_ISSOCK(stbuf.st_mode))) {
ret= Xorriso_lseek_capacity(xorriso, path, &src_size, flag & 2);
if(ret <= 0 || src_size <= 0) {
if(ret == -1 || !(flag & 1)) {
*capacity= 0;
if(ret == -1) {
if(reason != NULL)
*reason= "cannot be opened";
return(-3);
}
return(ret > 0);
}
if(ret > 0)
src_seek_size= 0;
src_size= *capacity;
ret= Xorriso_lseek_capacity(xorriso, path, &src_size, flag & 3);
if(ret <= 0 || src_size < src_seek_size) {
if(src_seek_size == 0) {
src_size= src_seek_size;
} else {
*capacity= 0;
if(ret == -1) {
if(reason != NULL)
*reason= "cannot be opened";
return(-3);
}
return(0);
}
}
}
} else {
*capacity= 0;
if(reason != NULL)
*reason= "is of wrong type";
return(-2);
}
*capacity= src_size;
if(reason != NULL)
*reason= "";
return(1);
}

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2019 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. 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); char *filename, char *mode, FILE **ret_fp, int flag);
int Xorriso_make_mount_cmd(struct XorrisO *xorriso, char *cmd, 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); char *devadr, char result[SfileadrL], int flag);
int Xorriso_append_scdbackup_record(struct XorrisO *xorriso, int flag); int Xorriso_append_scdbackup_record(struct XorrisO *xorriso, int flag);
@ -127,5 +127,8 @@ int Xorriso_concat(struct XorrisO *xorriso, char *mode, char *target,
int progc, char **progv, int progc, char **progv,
int filec, char **filev, int flag); int filec, char **filev, int flag);
int Xorriso_determine_capacity(struct XorrisO *xorriso, char *path,
off_t *capacity, char **reason, int flag);
#endif /* ! Xorriso_pvt_diskop_includeD */ #endif /* ! Xorriso_pvt_diskop_includeD */

File diff suppressed because it is too large Load Diff

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, int Xorriso_check_interval(struct XorrisO *xorriso, struct SpotlisT *spotlist,
struct CheckmediajoB *job, struct CheckmediajoB *job,
int from_lba, int block_count, int read_chunk, off_t from_lba, off_t block_count, off_t read_chunk,
int md5_start, int flag); off_t md5_start, int flag);
int Xorriso_get_drive_handles(struct XorrisO *xorriso, int Xorriso_get_drive_handles(struct XorrisO *xorriso,
struct burn_drive_info **dinfo, struct burn_drive_info **dinfo,

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. Provided under GPL version 2 or later.
@ -81,13 +81,15 @@ int Xorriso_cdrskin_help(struct XorrisO *xorriso, int flag)
"\t-pad\t\tpadsize=30k", "\t-pad\t\tpadsize=30k",
"\t-nopad\t\tDo not pad", "\t-nopad\t\tDo not pad",
"\tminbuf=\t\tKeep drive buffer hungry", "\tminbuf=\t\tKeep drive buffer hungry",
"\tmodesty_on_drive=\tLike minbuf=, but with more parameters",
"\t-immed\t\tEquivalent to minbuf=75", "\t-immed\t\tEquivalent to minbuf=75",
"\tmodesty_on_drive=\tLike minbuf=, but with more parameters",
"\t--grow_overwriteable_iso\temulate multi-session on DVD+RW, BD-RE", "\t--grow_overwriteable_iso\temulate multi-session on DVD+RW, BD-RE",
"\twrite_start_address=#\t\twrite to byte address on DVD+RW, BD-RE", "\twrite_start_address=#\t\twrite to byte address on DVD+RW, BD-RE",
"\tstream_recording=on|number\ttry to get full speed on DVD-RAM, BD", "\tstream_recording=on|number\ttry to get full speed on DVD-RAM, BD",
"\tuse_immed_bit=on|off|default\tcontrol use of Immed bit", "\tuse_immed_bit=on|off|default\tcontrol use of Immed bit",
"\tdvd_obs=default|32k|64k\t\tbytes per DVD/BD write operation", "\tdvd_obs=default|32k|64k\t\tbytes per DVD/BD write operation",
"\t--obs_pad\t\tpad DVD DAO and stdio to full 32k or 64k",
"\t--bdr_obs_exempt\tpossibly exempt BD-R from padding to full 64k",
"\tstdio_sync=on|off|end|number\twhether to fsync output to \"stdio:\"", "\tstdio_sync=on|off|end|number\twhether to fsync output to \"stdio:\"",
"\t--no_rc\t\tDo not execute xorriso startup files", "\t--no_rc\t\tDo not execute xorriso startup files",
"\t-help\t\tprint this text to stderr and exit emulation", "\t-help\t\tprint this text to stderr and exit emulation",
@ -119,11 +121,12 @@ int Xorriso_cdrskin_help(struct XorrisO *xorriso, int flag)
int Xorriso_cdrskin(struct XorrisO *xorriso, char *whom, int argc, char **argv, int Xorriso_cdrskin(struct XorrisO *xorriso, char *whom, int argc, char **argv,
int flag) 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_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_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; int do_multi= 0, do_msinfo= 0, do_grow= 0, do_isosize= 0, do_xa1= 0;
int do_auto_close= 0; int do_auto_close= 0, mem_current_interpreter;
double write_start_address= -1.0, tsize= -1.0, mem_auto_close; double write_start_address= -1.0, tsize= -1.0, mem_auto_close;
char *track_source= NULL, *dev_adr= NULL, *cpt; char *track_source= NULL, *dev_adr= NULL, *cpt;
char mem_report_about_text[80], *report_about= "SORRY", blank_mode[80]; char mem_report_about_text[80], *report_about= "SORRY", blank_mode[80];
@ -180,6 +183,9 @@ static char blank_help[][80]= {
"@End_of_helptexT@" "@End_of_helptexT@"
}; };
mem_current_interpreter= xorriso->current_interpreter;
xorriso->current_interpreter= 2;
mem_do_close= xorriso->do_close; mem_do_close= xorriso->do_close;
mem_auto_close= xorriso->auto_close; mem_auto_close= xorriso->auto_close;
Xorriso_alloc_meM(track_source, char, SfileadrL); Xorriso_alloc_meM(track_source, char, SfileadrL);
@ -290,6 +296,11 @@ no_volunteer:;
strncmp(argpt, "dvd_obs=", 8)==0) { strncmp(argpt, "dvd_obs=", 8)==0) {
cpt= strchr(argpt, '=') + 1; cpt= strchr(argpt, '=') + 1;
Xorriso_option_dvd_obs(xorriso, cpt, 0); Xorriso_option_dvd_obs(xorriso, cpt, 0);
} else if(strcmp(argv[i], "--obs_pad") == 0) { /* intentional: argv[i] */
xorriso->do_obs_pad= 1;
} else if(strcmp(argv[i], "--bdr_obs_exempt") == 0) {
/* intentional: argv[i] */
xorriso->bdr_obs_exempt= 1;
} else if(strcmp(argpt, "-eject")==0) { } else if(strcmp(argpt, "-eject")==0) {
do_eject= 1; do_eject= 1;
} else if(strncmp(argpt, "-fs=", 4)==0 || strncmp(argpt, "fs=", 3)==0) { } else if(strncmp(argpt, "-fs=", 4)==0 || strncmp(argpt, "fs=", 3)==0) {
@ -518,7 +529,7 @@ no_volunteer:;
ret= Xorriso_msinfo(xorriso, &msc1, &msc2, 2 | !!do_grow); ret= Xorriso_msinfo(xorriso, &msc1, &msc2, 2 | !!do_grow);
if(ret<=0) if(ret<=0)
goto ex; 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); Xorriso_result(xorriso, 1);
} }
@ -587,6 +598,7 @@ ex:;
xorriso->auto_close= mem_auto_close; xorriso->auto_close= mem_auto_close;
Xorriso_free_meM(dev_adr); Xorriso_free_meM(dev_adr);
Xorriso_free_meM(track_source); Xorriso_free_meM(track_source);
xorriso->current_interpreter= mem_current_interpreter;
return(ret); return(ret);
} }
@ -636,6 +648,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
"-isohybrid-gpt-basdat", "-isohybrid-gpt-hfsplus", "-isohybrid-gpt-basdat", "-isohybrid-gpt-hfsplus",
"-isohybrid-apm-hfsplus", "--grub2-boot-info", "-joliet-utf16", "-isohybrid-apm-hfsplus", "--grub2-boot-info", "-joliet-utf16",
"-appended_part_as_gpt", "-appended_part_as_apm", "--mbr-force-bootable", "-appended_part_as_gpt", "-appended_part_as_apm", "--mbr-force-bootable",
"--gpt-iso-bootable", "--gpt-iso-not-ro",
"-part_like_isohybrid", "--zisofs-version-2", "--zisofs2-susp-z2", "-part_like_isohybrid", "--zisofs-version-2", "--zisofs2-susp-z2",
"--zisofs2-susp-zf", "--zisofs2-susp-zf",
"" ""
@ -682,13 +695,17 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
"" ""
}; };
static char arg2_options[][41]= { 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]= { static char arg3_options[][41]= {
"-append_partition", "-hfsplus-file-creator-type", "-append_partition", "-hfsplus-file-creator-type",
"" ""
}; };
static char arg4_options[][41]= {
"-cut_out",
""
};
static char final_options[][41]= { static char final_options[][41]= {
"-find", "-find",
"" ""
@ -714,6 +731,10 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
for(i=0; arg3_options[i][0]!=0; i++) for(i=0; arg3_options[i][0]!=0; i++)
if(strcmp(arg3_options[i], cmd)==0) if(strcmp(arg3_options[i], cmd)==0)
return(1); 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; *count= argc - 1;
for(i=0; final_options[i][0]!=0; i++) for(i=0; final_options[i][0]!=0; i++)
if(strcmp(final_options[i], cmd)==0) if(strcmp(final_options[i], cmd)==0)
@ -801,6 +822,8 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" -hide-joliet-list FILE File with list of Joliet files to hide", " -hide-joliet-list FILE File with list of Joliet files to hide",
" -hide-hfsplus GLOBFILE Hide HFS+ file", " -hide-hfsplus GLOBFILE Hide HFS+ file",
" -hide-hfsplus-list FILE File with list of HFS+ files to hide", " -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", " -input-charset CHARSET Local input charset for file name conversion",
" -output-charset CHARSET Output 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", " -iso-level LEVEL Set ISO9660 conformance level (1..3) or 4 for ISO9660 version 2",
@ -906,6 +929,8 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" --embedded-boot FILE Alias of -G", " --embedded-boot FILE Alias of -G",
" --protective-msdos-label Patch System Area by partition table", " --protective-msdos-label Patch System Area by partition table",
" --mbr-force-bootable Enforce existence of bootable flag in MBR", " --mbr-force-bootable Enforce existence of bootable flag in MBR",
" --gpt-iso-bootable Set Legacy BIOS bootable flag in ISO partition",
" --gpt-iso-not-ro Do not set Read-only flag in ISO partition",
" -partition_offset LBA Make image mountable by first partition, too", " -partition_offset LBA Make image mountable by first partition, too",
" -partition_sec_hd NUMBER Define number of sectors per head", " -partition_sec_hd NUMBER Define number of sectors per head",
" -partition_hd_cyl NUMBER Define number of heads per cylinder", " -partition_hd_cyl NUMBER Define number of heads per cylinder",
@ -932,6 +957,9 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" a GUID to be used if -appended_part_as_gpt.", " 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_gpt mark appended partitions in GPT instead of MBR.",
" -appended_part_as_apm mark appended partitions in APM.", " -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", " --modification-date=YYYYMMDDhhmmsscc",
" Override date of creation and modification", " Override date of creation and modification",
" --set_all_file_dates TIME Override mtime, atime, ctime in all files", " --set_all_file_dates TIME Override mtime, atime, ctime in all files",
@ -1350,7 +1378,7 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
int do_print_size= 0, fd, idx, iso_level= -1, palohdrversion; int do_print_size= 0, fd, idx, iso_level= -1, palohdrversion;
int was_failure= 0, fret, lower_r= 0, zero= 0; int was_failure= 0, fret, lower_r= 0, zero= 0;
int dir_mode= -1, file_mode= -1, count, partition_number; int dir_mode= -1, file_mode= -1, count, partition_number;
int allow_dir_id_ext= -1; int allow_dir_id_ext= -1, mem_current_interpreter;
int root_seen= 0, do_md5_mem, option_d= 0, arg_count; int root_seen= 0, do_md5_mem, option_d= 0, arg_count;
mode_t mode_and, mode_or; mode_t mode_and, mode_or;
int with_boot_image= 0, with_cat_path= 0, with_emul_toc= 0; int with_boot_image= 0, with_cat_path= 0, with_emul_toc= 0;
@ -1367,6 +1395,9 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
struct stat stbuf; struct stat stbuf;
mem_current_interpreter= xorriso->current_interpreter;
xorriso->current_interpreter= 1;
Xorriso_alloc_meM(sfe, char, 5*SfileadrL); Xorriso_alloc_meM(sfe, char, 5*SfileadrL);
Xorriso_alloc_meM(adr, char, SfileadrL+8); Xorriso_alloc_meM(adr, char, SfileadrL+8);
Xorriso_alloc_meM(pathspec, char, 2*SfileadrL); Xorriso_alloc_meM(pathspec, char, 2*SfileadrL);
@ -1960,6 +1991,8 @@ not_enough_args:;
strcmp(argpt, "-eltorito-alt-boot")==0 || strcmp(argpt, "-eltorito-alt-boot")==0 ||
strcmp(argpt, "--protective-msdos-label")==0 || strcmp(argpt, "--protective-msdos-label")==0 ||
strcmp(argpt, "--mbr-force-bootable")==0 || strcmp(argpt, "--mbr-force-bootable")==0 ||
strcmp(argpt, "--gpt-iso-bootable")==0 ||
strcmp(argpt, "--gpt-iso-not-ro")==0 ||
strcmp(argpt, "--boot-catalog-hide")==0 || strcmp(argpt, "--boot-catalog-hide")==0 ||
strcmp(argpt, "-isohybrid-gpt-basdat")==0 || strcmp(argpt, "-isohybrid-gpt-basdat")==0 ||
strcmp(argpt, "-isohybrid-gpt-hfsplus")==0 || strcmp(argpt, "-isohybrid-gpt-hfsplus")==0 ||
@ -1999,6 +2032,15 @@ not_enough_args:;
if(argv[i] != argpt) if(argv[i] != argpt)
delay_opt_list[delay_opt_count - 1]|= 1u<<31; delay_opt_list[delay_opt_count - 1]|= 1u<<31;
i++; 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) { } else if(strncmp(argpt, "--modification-date=", 20)==0) {
ret= Xorriso_option_volume_date(xorriso, "uuid", argpt + 20, 0); ret= Xorriso_option_volume_date(xorriso, "uuid", argpt + 20, 0);
if(ret <= 0) if(ret <= 0)
@ -2316,6 +2358,15 @@ rr_reloc_dir:;
if(ret <= 0) if(ret <= 0)
goto problem_handler_2; 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) { } else if(argpt[0]=='-' && argpt[1]!=0) {
ret= Xorriso_genisofs_fused_options(xorriso, whom, argv[i] + 1, ret= Xorriso_genisofs_fused_options(xorriso, whom, argv[i] + 1,
&option_d, &iso_level, &lower_r, ra_text, 1); &option_d, &iso_level, &lower_r, ra_text, 1);
@ -2653,8 +2704,14 @@ problem_handler_2:;
} else if(strcmp(argpt, "--mbr-force-bootable") == 0) { } else if(strcmp(argpt, "--mbr-force-bootable") == 0) {
xorriso->system_area_options= xorriso->system_area_options | (1 << 15); xorriso->system_area_options= xorriso->system_area_options | (1 << 15);
} else if(strcmp(argpt, "--gpt-iso-bootable") == 0) {
xorriso->system_area_options= xorriso->system_area_options | (1 << 16);
} else if(strcmp(argpt, "--gpt-iso-not-ro") == 0) {
xorriso->system_area_options= xorriso->system_area_options | (1 << 17);
} else if(strcmp(argpt, "--boot-catalog-hide")==0) { } else if(strcmp(argpt, "--boot-catalog-hide")==0) {
xorriso->boot_image_cat_hidden|= 3; xorriso->boot_image_cat_hidden|= 7;
} else if(strcmp(argpt, "-partition_offset") == 0 || } else if(strcmp(argpt, "-partition_offset") == 0 ||
strcmp(argpt, "-partition_sec_hd") == 0 || strcmp(argpt, "-partition_sec_hd") == 0 ||
strcmp(argpt, "-partition_hd_cyl") == 0 || strcmp(argpt, "-partition_hd_cyl") == 0 ||
@ -2741,6 +2798,14 @@ problem_handler_2:;
if(ret <= 0) if(ret <= 0)
goto problem_handler_boot; 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 */ continue; /* regular bottom of loop */
problem_handler_boot:; problem_handler_boot:;
@ -2751,7 +2816,8 @@ problem_handler_boot:;
continue; continue;
goto ex; goto ex;
} }
if(with_boot_image && with_cat_path == 0) if(with_boot_image && with_cat_path == 0 &&
!(xorriso->boot_image_cat_hidden & 1))
strcpy(xorriso->boot_image_cat_path, "/boot.catalog"); strcpy(xorriso->boot_image_cat_path, "/boot.catalog");
/* The boot catalog has to be hidden separately */ /* The boot catalog has to be hidden separately */
if(xorriso->boot_image_cat_path[0]) { if(xorriso->boot_image_cat_path[0]) {
@ -2793,6 +2859,7 @@ ex:;
Xorriso_free_meM(eff_path); Xorriso_free_meM(eff_path);
Xorriso_free_meM(indev); Xorriso_free_meM(indev);
Xorriso_free_meM(old_root); Xorriso_free_meM(old_root);
xorriso->current_interpreter= mem_current_interpreter;
return(ret); return(ret);
} }

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. Provided under GPL version 2 or later.
@ -895,16 +895,61 @@ int Findjob_set_num_filter(struct FindjoB *o, int test_type,
} }
int Findjob_set_lba_range(struct FindjoB *o, int start_lba, int count, int Findjob_set_size_filter(struct FindjoB *o, int test_type,
off_t num1, int 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(int), 1);
if(t->arg1 == NULL || t->arg2 == NULL)
return(-1);
*((off_t *) t->arg1)= num1;
*((int *) t->arg2)= num2;
return(1);
}
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 flag)
{ {
int ret, end_lba; int ret;
off_t end_lba;
if(start_lba > 0) if(start_lba > 0)
end_lba= start_lba + count - 1; end_lba= start_lba + count - 1;
else else
end_lba= start_lba - count + 1; 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); return(ret);
} }

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. Provided under GPL version 2 or later.
@ -32,7 +32,7 @@ struct ExprtesT {
1= -name char *arg1 (regex_t in *arg2) 1= -name char *arg1 (regex_t in *arg2)
2= -type char *arg1 2= -type char *arg1
3= -damaged 3= -damaged
4= -lba_range int *arg1 int *arg2 4= -lba_range off_t *arg1 off_t *arg2
5= -has_acl 5= -has_acl
6= -has_xattr 6= -has_xattr
7= -has_aaip 7= -has_aaip
@ -55,6 +55,8 @@ struct ExprtesT {
24= -name_limit_blocker int *arg1 24= -name_limit_blocker int *arg1
25= -maxdepth int *arg1 25= -maxdepth int *arg1
26= -mindepth int *arg1 26= -mindepth int *arg1
27= -size off_t *arg1 int *arg2 (0=test for equal, -1=smaller, 1=larger,
-2=smaller_or_equal , 2=larger_or_equal)
*/ */
int test_type; int test_type;
@ -245,7 +247,13 @@ int Findjob_set_commit_filter_2(struct FindjoB *o, int flag);
int Findjob_set_num_filter(struct FindjoB *o, int test_type, int Findjob_set_num_filter(struct FindjoB *o, int test_type,
int num1, int num2, int flag); int num1, int num2, int flag);
int Findjob_set_lba_range(struct FindjoB *o, int start_lba, int count, int Findjob_set_size_filter(struct FindjoB *o, int test_type,
off_t num1, int num2, int flag);
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 flag);
int Findjob_set_wanted_node(struct FindjoB *o, void *wanted_node, 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. /* 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. 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) if(bootimg_node != NULL)
Xorriso__file_start_lba((IsoNode *) bootimg_node, Xorriso__file_start_lba((IsoNode *) bootimg_node,
&(xorriso->loaded_boot_bin_lba), 0); &(xorriso->loaded_boot_bin_lba), 0);
if(bootcat_node != NULL) 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); xorriso->loaded_boot_cat_path, 0);
return(1); 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]; char volid[33];
struct burn_drive_info *dinfo; struct burn_drive_info *dinfo;
struct burn_drive *drive; 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); "on attempt to perform -assert_volid", 0);
if(ret<=0) if(ret<=0)
return(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); Xorriso_process_msg_queues(xorriso,0);
if(ret <= 0) { if(ret <= 0) {
sprintf(xorriso->info_text, 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_msgs_submit(xorriso, 0, xorriso->info_text, 0,
xorriso->assert_volid_sev, 0); xorriso->assert_volid_sev, 0);
return(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 Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
{ {
int ret, msc1= -1, msc2, i; int ret;
off_t msc1= -1, msc2, i;
IsoImage *image; IsoImage *image;
struct burn_drive_info *dinfo; struct burn_drive_info *dinfo;
struct burn_drive *drive; struct burn_drive *drive;
@ -285,7 +289,7 @@ int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
Xorriso_toc(xorriso, 128); Xorriso_toc(xorriso, 128);
if(msc1 >= 0) { if(msc1 >= 0) {
for(i = msc1 + 16; i < msc1 + 32; i++) { 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); (off_t) sizeof(block_head), &head_count, 2);
if(ret <= 0) { if(ret <= 0) {
i= msc1 + 32; i= msc1 + 32;
@ -295,7 +299,7 @@ int Xorriso_pvd_info(struct XorrisO *xorriso, int flag)
break; break;
} }
if(i < msc1 + 32) { if(i < msc1 + 32) {
sprintf(msg, "PVD address : %ds\n", i); sprintf(msg, "PVD address : %.fs\n", (double) i);
Xorriso_result(xorriso,0); Xorriso_result(xorriso,0);
} }
} }
@ -426,7 +430,11 @@ int Xorriso_boot_item_status(struct XorrisO *xorriso, char *cat_path,
} }
file_size= 0; file_size= 0;
ret= Xorriso_iso_lstat(xorriso, bin_path, &stbuf, 2 | 4); if(strncmp(bin_path, "--interval:appended_partition_", 30) == 0) {
ret= -1;
} else {
ret= Xorriso_iso_lstat(xorriso, bin_path, &stbuf, 2 | 4);
}
if(ret == 0) { if(ret == 0) {
file_size= ((stbuf.st_size / (off_t) 512) + file_size= ((stbuf.st_size / (off_t) 512) +
!!(stbuf.st_size % (off_t) 512)) * 512; !!(stbuf.st_size % (off_t) 512)) * 512;
@ -926,8 +934,8 @@ no_boot:;
} else if(xorriso->loaded_boot_bin_lba <= 0) { } else if(xorriso->loaded_boot_bin_lba <= 0) {
sprintf(respt, "Boot image : -not-found-at-load-time-"); sprintf(respt, "Boot image : -not-found-at-load-time-");
} else { } else {
sprintf(respt, "Boot image : -not-found-any-more-by-lba=%d", sprintf(respt, "Boot image : -not-found-any-more-by-lba=%.f",
xorriso->loaded_boot_bin_lba); (double) xorriso->loaded_boot_bin_lba);
} }
Xorriso__append_boot_params(respt, bootimg, 0); Xorriso__append_boot_params(respt, bootimg, 0);
strcat(respt, "\n"); strcat(respt, "\n");
@ -991,12 +999,32 @@ int Xorriso_get_volume(struct XorrisO *xorriso, IsoImage **volume,
/* @param flag bit0= do not return 1 on volset_change_pending != 1 /* @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 Xorriso_change_is_pending(struct XorrisO *xorriso, int flag)
{ {
int ret;
if(flag & 1) if(flag & 1)
return(xorriso->volset_change_pending == 1); ret= (xorriso->volset_change_pending == 1);
return(!!xorriso->volset_change_pending); 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);
} }
@ -1027,8 +1055,9 @@ int Xorriso_set_change_pending(struct XorrisO *xorriso, int flag)
int Xorriso_mount(struct XorrisO *xorriso, char *dev, int adr_mode, int Xorriso_mount(struct XorrisO *xorriso, char *dev, int adr_mode,
char *adr_value, char *cmd, int flag) 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; 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 volid[33], *devadr, *mount_command= NULL, *adr_data= NULL, *adr_pt;
char *dev_path, *libburn_adr= NULL; char *dev_path, *libburn_adr= NULL;
char *dpt, *sysname= ""; char *dpt, *sysname= "";
@ -1114,8 +1143,8 @@ int Xorriso_mount(struct XorrisO *xorriso, char *dev, int adr_mode,
(xorriso->drives_exclusive && !(xorriso->mount_opts_flag & 1)) | (xorriso->drives_exclusive && !(xorriso->mount_opts_flag & 1)) |
(xorriso->linux_scsi_dev_family << 2), 0, 0); (xorriso->linux_scsi_dev_family << 2), 0, 0);
aquire_flag= 1; aquire_flag= 1;
if((xorriso->toc_emulation_flag & 2) && adr_mode == 3) if((xorriso->toc_emulation_flag & 2) && (adr_mode == 3 || adr_mode == 0))
aquire_flag|= 16; aquire_flag|= 16; /* -rom_toc_scan emul_off with sbsector or auto */
if(xorriso->toc_emulation_flag & 4) if(xorriso->toc_emulation_flag & 4)
aquire_flag|= 128; aquire_flag|= 128;
if(xorriso->toc_emulation_flag & 8) if(xorriso->toc_emulation_flag & 8)
@ -1135,8 +1164,8 @@ int Xorriso_mount(struct XorrisO *xorriso, char *dev, int adr_mode,
adr_pt= adr_data; adr_pt= adr_data;
} }
} }
ret= isoburn_get_mount_params(drive, adr_mode, adr_pt, &lba, &track, ret= isoburn_get_mount_params_v2(drive, adr_mode, adr_pt, &lba, &track,
&session, volid, params_flag); &session, volid, params_flag);
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
@ -1556,6 +1585,7 @@ struct elto_img_par {
unsigned long int lba, extract_size; unsigned long int lba, extract_size;
char pltf[8], b[8], emul[8], boot_image_type[16]; char pltf[8], b[8], emul[8], boot_image_type[16];
char *path, *id_string, *sel_crit; char *path, *id_string, *sel_crit;
int path_allocated;
}; };
@ -1570,12 +1600,13 @@ static int Xorriso_register_eltorito_gpt(struct XorrisO *xorriso,
{ {
if(flag & 1) { if(flag & 1) {
if(ptype == 1 || ptype == 3) if(ptype == 1 || ptype == 3)
et_img->do_gpt_basdat= 1; et_img->do_gpt_basdat= ptype;
else if(ptype == 2) else if(ptype == 2)
et_img->do_gpt_hfsplus= 1; et_img->do_gpt_hfsplus= 1;
return(1); return(1);
} else if(*first_efi && et_img->platform_id == 0xef) { } else if(*first_efi && et_img->platform_id == 0xef) {
*efi_boot_part= 1; if(*efi_boot_part <= 0)
*efi_boot_part= 1;
return(1); return(1);
} }
if(et_img->platform_id == 0xef) if(et_img->platform_id == 0xef)
@ -1653,6 +1684,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 /* @param flag bit0= do not record but only count
bit1= as_mkisofs bit1= as_mkisofs
bit2= no sorry messages bit2= no sorry messages
@ -1670,25 +1792,27 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
int appended_as_gpt= 0, have_prep= 0, did_sysarea= 0, cared_for_apm= 0; int appended_as_gpt= 0, have_prep= 0, did_sysarea= 0, cared_for_apm= 0;
int cared_for_sparc= 0, have_hfsplus= 0; int cared_for_sparc= 0, have_hfsplus= 0;
int have_sysarea= 0, ptable_killer, imported_iso, have_alpha_ldr_path= 0; int have_sysarea= 0, ptable_killer, imported_iso, have_alpha_ldr_path= 0;
int have_protective_msdos= 0, part_like_isohybrid= 0; int have_protective_msdos= 0, part_like_isohybrid= 0, fresh_efi_boot_part;
#ifdef Not_any_more_because_padding_is_now_after_partitions #ifdef Not_any_more_because_padding_is_now_after_partitions
int appended_partition= 0; int appended_partition= 0;
#endif #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 int prev_pltf= 0;
unsigned long int sa_options= 0, partno, id_tag, perms, start_cyl; 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 part_status, part_type, mbr_start_block, mbr_num_blocks;
unsigned long int partition_offset= 0; 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 name[24], *textpt, *contentpt, *buf= NULL, part_type_text[37];
char **lines= NULL; char **lines= NULL;
double num[8]; double num[8];
char *cat_path= ""; char *cat_path= "";
struct elto_img_par *et_imgs= NULL; struct elto_img_par *et_imgs= NULL;
int elto_count= 0; 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 FindjoB *job= NULL;
struct stat dir_stbuf; struct stat dir_stbuf;
IsoImage *image; IsoImage *image;
@ -1698,6 +1822,11 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
int was_force_bootable= 0, have_mbr_force_bootable= 0; int was_force_bootable= 0, have_mbr_force_bootable= 0;
uint64_t gpt_bheader_block= 0, start_block, num_blocks; uint64_t gpt_bheader_block= 0, start_block, num_blocks;
uint64_t img_blocks= 0, iso_part_blocks; uint64_t img_blocks= 0, iso_part_blocks;
char *cpt, *npt, *ftext;
int ftext_l, l;
unsigned char bin_data[8];
uint64_t gpt_part_flags;
int was_gpt_iso_bootable= 0, was_gpt_iso_not_ro= 0, bin_count;
struct mbr_par { struct mbr_par {
uint8_t ptype; uint8_t ptype;
@ -1728,20 +1857,6 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
struct apm_par *apms= NULL; struct apm_par *apms= NULL;
int apm_count= 0; 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 */ /* 2 exp 19 blocks = 1 GiB */
#define Xorriso_max_endless_uefi_sizE (1 << 19) #define Xorriso_max_endless_uefi_sizE (1 << 19)
@ -1754,7 +1869,8 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
if(line_count <= 0) if(line_count <= 0)
{ret= 1; goto ex;} {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); Xorriso_alloc_meM(lines, char *, line_count);
for(i= 0; i < et_line_count; i++) for(i= 0; i < et_line_count; i++)
lines[i]= et_lines[i]; lines[i]= et_lines[i];
@ -1814,6 +1930,7 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
Xorriso_alloc_meM(et_imgs, struct elto_img_par, elto_count); Xorriso_alloc_meM(et_imgs, struct elto_img_par, elto_count);
for(et_idx= 0; et_idx < elto_count; et_idx++) { for(et_idx= 0; et_idx < elto_count; et_idx++) {
et_imgs[et_idx].path= NULL; et_imgs[et_idx].path= NULL;
et_imgs[et_idx].path_allocated= 0;
et_imgs[et_idx].ldsiz= -1; et_imgs[et_idx].ldsiz= -1;
} }
Xorriso_alloc_meM(app_pseudo_paths, char *, elto_count); Xorriso_alloc_meM(app_pseudo_paths, char *, elto_count);
@ -1936,8 +2053,17 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
et_imgs[idx].path= textpt; et_imgs[idx].path= textpt;
ret= Xorriso_iso_lstat(xorriso, et_imgs[idx].path, &dir_stbuf, 0); ret= Xorriso_iso_lstat(xorriso, et_imgs[idx].path, &dir_stbuf, 0);
if(ret == 0) { if(ret == 0) {
extract_size = (dir_stbuf.st_size + 2047) / 2048; extract_size = (dir_stbuf.st_size + (off_t) 2047) / (off_t) 2048;
if(extract_size > et_imgs[idx].extract_size) 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; et_imgs[idx].extract_size= extract_size;
} }
@ -2045,7 +2171,8 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
} }
if(appended_as_gpt && !have_protective_msdos) { if(appended_as_gpt && !have_protective_msdos) {
if(mbr_count != 1) { /* Check if really a pure GPT or a nearly pure mbr-force-bootable GPT */
if(mbr_count != 1 && !(mbr_count == 2 && have_mbr_force_bootable)) {
appended_as_gpt= 0; appended_as_gpt= 0;
} else if(mbrpts[0].ptype != 0xee || mbrpts[0].start_block != 1) { } else if(mbrpts[0].ptype != 0xee || mbrpts[0].start_block != 1) {
appended_as_gpt= 0; appended_as_gpt= 0;
@ -2076,6 +2203,61 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
sprintf(buf, "-chrp-boot-part "); sprintf(buf, "-chrp-boot-part ");
else else
sprintf(buf, "-boot_image any chrp_boot_part=on "); sprintf(buf, "-boot_image any chrp_boot_part=on ");
Xorriso_record_cmd_linE
buf[0]= 0;
ret= Xorriso_assess_written_features(xorriso,
mkisofs ? "as_mkisofs" : "cmd", 1);
if(ret > 0) {
ftext= xorriso->result_line;
ftext_l= strlen(ftext);
for(cpt= ftext ; cpt - ftext < ftext_l ; cpt+= l + 1) {
npt= strchr(cpt, '\n');
if(npt == NULL)
l= strlen(cpt);
else
l= npt - cpt;
cpt[l]= 0;
/* Only forward relaxations of ISO 9660 defaults, plus no RR */
if(mkisofs) {
if(strcmp(cpt, "-iso-level 2") != 0 &&
strcmp(cpt, "-iso-level 3") != 0 &&
strcmp(cpt, "--norock") != 0 &&
strncmp(cpt, "-untranslated_name_len", 22) != 0 &&
strcmp(cpt, "-N") != 0 &&
strcmp(cpt, "-D") != 0 &&
strcmp(cpt, "-U") != 0 &&
strcmp(cpt, "-max-iso9660-filenames") != 0 &&
strcmp(cpt, "-d") != 0 &&
strcmp(cpt, "-allow-lowercase") != 0)
continue;
} else {
/* (Do not forward iso_9660_level because 3 is default and the
user possibly had reasons to lower it) */
if(strcmp(cpt, "-rockridge off") != 0 &&
strncmp(cpt, "-compliance untranslated_name_len=", 34) != 0 &&
strcmp(cpt, "-compliance omit_version_off:only_iso_version")
!= 0 &&
strcmp(cpt, "-compliance omit_version:only_iso_version_off")
!= 0 &&
strcmp(cpt, "-compliance deep_paths") != 0 &&
strcmp(cpt, "-compliance long_paths") != 0 &&
strcmp(cpt, "-compliance full_ascii") != 0 &&
strcmp(cpt, "-compliance long_names") != 0 &&
strncmp(cpt, "-compliance no_force_dots:", 26) != 0 &&
strcmp(cpt, "-compliance lowercase") != 0)
continue;
if(strcmp(cpt, "-compliance untranslated_name_len=0") == 0)
continue;
}
if(strncmp(cpt, "-compliance untranslated_name_len=", 34) == 0) {
/* Better allow the maximum if it is reported as non-0 */
strcpy(buf, "-compliance untranslated_name_len=96");
} else {
strcpy(buf, cpt);
}
Xorriso_record_cmd_linE
}
}
} }
} else if(strcmp(name, "System area summary:") == 0) { } else if(strcmp(name, "System area summary:") == 0) {
@ -2261,7 +2443,43 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
} else if(strcmp(name, "GPT partition flags:") == 0) { } else if(strcmp(name, "GPT partition flags:") == 0) {
/* >>> check whether 0x1000000000000001 . Else: complain */; /* >>> check whether 0x100000000000000[15] . Else: complain */;
cpt= strstr(contentpt, "0x");
if(cpt != NULL) {
ret= Hex_to_bin(cpt + 2, 8, &bin_count, bin_data, 0);
if(ret > 0) {
/* convert big-endian bin_data to local endianness */
gpt_part_flags= 0;
for(gpt_idx= 0; gpt_idx < bin_count; gpt_idx++)
gpt_part_flags|= (((uint64_t) bin_data[gpt_idx]) <<
(8 * (bin_count - 1 - gpt_idx)));
if((gpt_part_flags & 4) && !was_gpt_iso_bootable) {
was_gpt_iso_bootable= 1;
if(buf[0]) {
Xorriso_record_cmd_linE
}
if(mkisofs)
sprintf(buf, "--gpt-iso-bootable");
else
sprintf(buf, "-boot_image any gpt_iso_bootable=on");
}
if(num_count > 0 && num[0] == 1 &&
(!(gpt_part_flags & (((uint64_t) 1) << 60))) &&
!was_gpt_iso_not_ro) {
was_gpt_iso_not_ro= 1;
if(buf[0]) {
Xorriso_record_cmd_linE
}
if(mkisofs)
sprintf(buf, "--gpt-iso-not-ro");
else
sprintf(buf, "-boot_image any gpt_iso_not_ro=on");
}
}
}
} else if(strcmp(name, "GPT partition path :") == 0) { } else if(strcmp(name, "GPT partition path :") == 0) {
idx= num[0] - 1; idx= num[0] - 1;
@ -2283,6 +2501,7 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
else else
part_type= 0xcd; part_type= 0xcd;
fresh_efi_boot_part= 0;
if(high_block * 4 < num[1] && num[2] > 0 && !gpts[idx].is_gap) { if(high_block * 4 < num[1] && num[2] > 0 && !gpts[idx].is_gap) {
for(mbr_idx = 0; mbr_idx < mbr_count; mbr_idx++) { for(mbr_idx = 0; mbr_idx < mbr_count; mbr_idx++) {
if(mbrpts[mbr_idx].start_block == num[1]) { if(mbrpts[mbr_idx].start_block == num[1]) {
@ -2316,6 +2535,21 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
} }
} else if(gpts[idx].ptype == 3 && gpts[idx].has_path == 0 &&
img_blocks >= num[1] + num[2] && !efi_boot_part) {
if(mkisofs)
sprintf(buf, "-efi-boot-part ");
else
sprintf(buf, "-boot_image any efi_boot_part=");
Xorriso_add_intvl_adr(xorriso, buf, (uint64_t) num[1],
(uint64_t) (num[1] + num[2] - 1.0), "d",
imported_iso);
efi_boot_part= 2;
fresh_efi_boot_part= 1;
Xorriso_record_cmd_linE
}
if(!fresh_efi_boot_part) {
/* Check for isohybri-ish MBR and GPT mix */ /* Check for isohybri-ish MBR and GPT mix */
if((mbr_count == 1 || (mbr_count == 2 && have_mbr_force_bootable)) && if((mbr_count == 1 || (mbr_count == 2 && have_mbr_force_bootable)) &&
mbrpts[0].ptype == 0xee && have_protective_msdos) { mbrpts[0].ptype == 0xee && have_protective_msdos) {
@ -2327,7 +2561,8 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
&et_idx, 0); &et_idx, 0);
} }
if(ret > 0) { if(ret > 0) {
if(!(et_imgs[et_idx].do_gpt_basdat || if(!(isohybrid ||
et_imgs[et_idx].do_gpt_basdat ||
et_imgs[et_idx].do_gpt_hfsplus || et_imgs[et_idx].do_gpt_hfsplus ||
part_like_isohybrid)) { part_like_isohybrid)) {
if(mkisofs) if(mkisofs)
@ -2342,19 +2577,11 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
Xorriso_register_eltorito_gpt(xorriso, et_imgs + et_idx, Xorriso_register_eltorito_gpt(xorriso, et_imgs + et_idx,
gpts[idx].ptype, &efi_boot_part, gpts[idx].ptype, &efi_boot_part,
&fe_dummy, 1); &fe_dummy, 1);
if(efi_boot_part == 1) {
/* -isohybrid-gpt- substitutes for -efi-boot-part --efi-boot-image */
efi_boot_part= 2;
}
} }
} else if(gpts[idx].ptype == 3 && gpts[idx].has_path == 0 &&
img_blocks >= num[1] + num[2] && !efi_boot_part) {
if(mkisofs)
sprintf(buf, "-efi-boot-part ");
else
sprintf(buf, "-boot_image any efi_boot_part=");
Xorriso_add_intvl_adr(xorriso, buf, (uint64_t) num[1],
(uint64_t) (num[1] + num[2] - 1.0), "d",
imported_iso);
efi_boot_part= 2;
Xorriso_record_cmd_linE
} }
if(gpts[idx].ptype == 2 && if(gpts[idx].ptype == 2 &&
@ -2636,7 +2863,7 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
et_imgs[idx].extract_size <= 0) { et_imgs[idx].extract_size <= 0) {
ret= Xorriso_obtain_indev_readsize(xorriso, &indev_blocks, 0); ret= Xorriso_obtain_indev_readsize(xorriso, &indev_blocks, 0);
if(ret > 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) indev_blocks - et_imgs[idx].lba <= Xorriso_max_endless_uefi_sizE)
et_imgs[idx].extract_size= indev_blocks - et_imgs[idx].lba; et_imgs[idx].extract_size= indev_blocks - et_imgs[idx].lba;
} }
@ -2706,7 +2933,7 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
} }
if (et_imgs[idx].path[0] == 0 && efi_boot_part != 2) { if (et_imgs[idx].path[0] == 0 && efi_boot_part != 2) {
for(i= 0; i < gpt_count; i++) { for(i= 0; i < gpt_count; i++) {
if(have_protective_msdos && ( if((have_protective_msdos || appended_as_gpt) && (
gpts[i].start_block == ((uint64_t) et_imgs[idx].lba) * 4 && gpts[i].start_block == ((uint64_t) et_imgs[idx].lba) * 4 &&
(gpts[i].block_count == (uint64_t) et_imgs[idx].ldsiz || (gpts[i].block_count == (uint64_t) et_imgs[idx].ldsiz ||
et_imgs[idx].ldsiz == 0 || et_imgs[idx].ldsiz == 1))) et_imgs[idx].ldsiz == 0 || et_imgs[idx].ldsiz == 1)))
@ -2722,10 +2949,23 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
} }
} }
if (et_imgs[idx].path[0] == 0) { if (et_imgs[idx].path[0] == 0 && et_imgs[idx].extract_size > 0) {
ret= Xorriso_make_boot_cut_out(xorriso, et_imgs[idx].lba,
/* >>> need way to exploit .extract_size by cutting out from ISO */; 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;
}
et_imgs[idx].path_allocated= 1;
} }
if (et_imgs[idx].path[0] == 0) { if (et_imgs[idx].path[0] == 0) {
@ -2818,7 +3058,10 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
Text_shellsafe(et_imgs[idx].sel_crit, buf, 1); Text_shellsafe(et_imgs[idx].sel_crit, buf, 1);
Xorriso_record_cmd_linE Xorriso_record_cmd_linE
} }
if(et_imgs[idx].do_gpt_basdat) { if(et_imgs[idx].do_gpt_basdat &&
!(et_imgs[idx].do_gpt_basdat == 3 &&
strstr(et_imgs[idx].path, "--interval:appended_partition_") ==
et_imgs[idx].path)) { /* (not with appended EFI partition) */
if(mkisofs) if(mkisofs)
sprintf(buf, "-isohybrid-gpt-basdat"); sprintf(buf, "-isohybrid-gpt-basdat");
else else
@ -2873,6 +3116,9 @@ ex:
Xorriso_free_meM(app_pseudo_paths[i]); Xorriso_free_meM(app_pseudo_paths[i]);
Xorriso_free_meM(app_pseudo_paths); Xorriso_free_meM(app_pseudo_paths);
} }
for(et_idx= 0; et_idx < elto_count; et_idx++)
if(et_imgs[et_idx].path_allocated)
Xorriso_free_meM(et_imgs[et_idx].path);
Xorriso_free_meM(et_imgs); Xorriso_free_meM(et_imgs);
Xorriso_free_meM(lines); Xorriso_free_meM(lines);
Xorriso_free_meM(buf); Xorriso_free_meM(buf);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. 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_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 Xorriso_is_isohybrid(struct XorrisO *xorriso, IsoFile *bootimg_node,
int flag); int flag);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2019 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
@ -36,7 +36,7 @@
#include "sort_cmp.h" #include "sort_cmp.h"
#include "parse_exec.h" #include "parse_exec.h"
#include "write_run.h" #include "write_run.h"
#include "disk_ops.h"
/* @param flag bit0= give directory x-permission where is r-permission /* @param flag bit0= give directory x-permission where is r-permission
@ -126,6 +126,7 @@ int Xorriso_graft_split(struct XorrisO *xorriso, IsoImage *volume,
int partno, total_parts; int partno, total_parts;
off_t offset; off_t offset;
char *part_name= NULL; char *part_name= NULL;
struct stat stbuf;
Xorriso_alloc_meM(part_name, char, SfileadrL); Xorriso_alloc_meM(part_name, char, SfileadrL);
@ -133,6 +134,8 @@ int Xorriso_graft_split(struct XorrisO *xorriso, IsoImage *volume,
if(ret < 0) if(ret < 0)
goto ex; goto ex;
*node= (IsoNode *) new_dir; *node= (IsoNode *) new_dir;
if(lstat(disk_path, &stbuf) != -1)
Xorriso_transfer_properties(xorriso, &stbuf, disk_path, *node, 1 | 8);
if(xorriso->update_flags & 1) { if(xorriso->update_flags & 1) {
ret= Xorriso_mark_update_merge(xorriso, img_name, node, 1); ret= Xorriso_mark_update_merge(xorriso, img_name, node, 1);
if(ret <= 0) if(ret <= 0)
@ -487,7 +490,7 @@ cannot_lstat:;
source_is_link= S_ISLNK(stbuf.st_mode); source_is_link= S_ISLNK(stbuf.st_mode);
if(xorriso->do_follow_links && source_is_link) { if(xorriso->do_follow_links && source_is_link) {
/* Xorriso_hop_link checks for wide link loops */ /* Xorriso_hop_link checks for wide link loops */
ret= Xorriso_hop_link(xorriso, srcpt, &own_link_stack, &hstbuf, 0); ret= Xorriso_hop_link(xorriso, srcpt, &own_link_stack, &hstbuf, 8);
if(ret<0) if(ret<0)
goto was_problem; goto was_problem;
if(ret==1) { if(ret==1) {
@ -499,6 +502,7 @@ cannot_lstat:;
if(lstat(srcpt, &stbuf)==-1) if(lstat(srcpt, &stbuf)==-1)
goto cannot_lstat; goto cannot_lstat;
} else { } else {
Xorriso_msgs_submit(xorriso, 0, srcpt, 0, "ERRFILE", 0);
if(Xorriso_eval_problem_status(xorriso, 0, 1|2)<0) if(Xorriso_eval_problem_status(xorriso, 0, 1|2)<0)
{ret= 0; goto was_problem;} {ret= 0; goto was_problem;}
ret= Xorriso_resolve_link(xorriso, srcpt, link_target, 1); ret= Xorriso_resolve_link(xorriso, srcpt, link_target, 1);
@ -1232,13 +1236,14 @@ int Xorriso_cut_out(struct XorrisO *xorriso, char *disk_path,
{ {
int ret; int ret;
char *eff_source= NULL, *eff_dest= NULL; char *eff_source= NULL, *eff_dest= NULL;
off_t src_size;
struct stat stbuf; struct stat stbuf;
Xorriso_alloc_meM(eff_source, char, SfileadrL); Xorriso_alloc_meM(eff_source, char, SfileadrL);
Xorriso_alloc_meM(eff_dest, char, SfileadrL); Xorriso_alloc_meM(eff_dest, char, SfileadrL);
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdx, disk_path, eff_source, ret= Xorriso_normalize_img_path(xorriso, xorriso->wdx, disk_path, eff_source,
2|4); 2 | 4);
if(ret<=0) if(ret<=0)
goto ex; goto ex;
ret= Xorriso_path_is_excluded(xorriso, disk_path, !(flag&1)); ret= Xorriso_path_is_excluded(xorriso, disk_path, !(flag&1));
@ -1265,22 +1270,45 @@ int Xorriso_cut_out(struct XorrisO *xorriso, char *disk_path,
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
} }
if(S_ISREG(stbuf.st_mode)) { if(S_ISREG(stbuf.st_mode)) {
if(stbuf.st_size<startbyte) { src_size= stbuf.st_size;
Xorriso_msgs_submit(xorriso, 0, eff_source, 0, "ERRFILE", 0); } else if(!(S_ISDIR(stbuf.st_mode) || S_ISLNK(stbuf.st_mode) ||
sprintf(xorriso->info_text, S_ISFIFO(stbuf.st_mode) || S_ISSOCK(stbuf.st_mode))) {
"-cut_out: Byte offset %.f larger than file size %.f", src_size= startbyte + bytecount;
(double) startbyte, (double) stbuf.st_size); ret= Xorriso_determine_capacity(xorriso, eff_source, &src_size, NULL, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "SORRY", 0); if(ret <= 0)
{ret= 0; goto ex;} goto unsupported_type;
if(src_size <= 0) {
Xorriso_msgs_submit(xorriso, 0,
"-cut_out: Special file with addressable size range of 0 encountered",
0, "FAILURE", 0);
goto unsupported_type;
} }
} else { } else {
unsupported_type:; unsupported_type:;
Xorriso_msgs_submit(xorriso, 0, eff_source, 0, "ERRFILE", 0); Xorriso_msgs_submit(xorriso, 0, eff_source, 0, "ERRFILE", 0);
sprintf(xorriso->info_text, "-cut_out: Unsupported file type (%s) with ", if(S_ISDIR(stbuf.st_mode) || S_ISLNK(stbuf.st_mode) ||
Ftypetxt(stbuf.st_mode, 0)); S_ISFIFO(stbuf.st_mode) || S_ISSOCK(stbuf.st_mode)) {
sprintf(xorriso->info_text,
"-cut_out: File type (%s) is not suitable for this command: ",
Ftypetxt(stbuf.st_mode, 0));
} else {
sprintf(xorriso->info_text,
"-cut_out: File (%s) does not support or permit random read access: ",
Ftypetxt(stbuf.st_mode, 0));
}
Text_shellsafe(eff_source, xorriso->info_text, 1); Text_shellsafe(eff_source, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
if(src_size < startbyte) {
Xorriso_msgs_submit(xorriso, 0, eff_source, 0, "ERRFILE", 0);
sprintf(xorriso->info_text,
"-cut_out: Byte offset %.f larger than addressable file size %.f : ",
(double) startbyte, (double) src_size);
Text_shellsafe(eff_source, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
@ -2518,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, /* 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. provides the memory of proper type.
@param flag bit0= initialize iteration @param flag bit0= initialize iteration
bit1= action needs full freedom of object manipulation bit1= action needs full freedom of object manipulation
@ -3027,12 +3055,13 @@ return:
3 = immediate decision : does match 3 = immediate decision : does match
*/ */
{ {
int value=0, ret, start_lba, end_lba, bless_idx; int value=0, ret, bless_idx, size_mode, lba_count, i, mask;
int lba_count, *file_end_lbas= NULL, *file_start_lbas= NULL, i, mask; off_t range_lba, end_lba, *file_end_lbas= NULL, *file_start_lbas= NULL;
off_t start_lba;
void *arg1, *arg2; void *arg1, *arg2;
char ft, *decision, md5[16], bless_code[17]; char ft, *decision, md5[16], bless_code[17];
regmatch_t name_match; regmatch_t name_match;
off_t damage_start, damage_end, size, *section_sizes= NULL; off_t damage_start, damage_end, size, *section_sizes= NULL, size_arg;
void *xinfo_dummy; void *xinfo_dummy;
IsoNode *node; IsoNode *node;
IsoStream *stream; IsoStream *stream;
@ -3118,10 +3147,10 @@ return:
break; case 4: /* -lba_range *arg1 *arg2 */ break; case 4: /* -lba_range *arg1 *arg2 */
value= 1; value= 1;
start_lba= *((int *) ftest->arg1); range_lba= *((off_t *) ftest->arg1);
end_lba= *((int *) ftest->arg2); end_lba= *((off_t *) ftest->arg2);
if(node == NULL) { if(node == NULL) {
value= !(start_lba >= 0); value= !(range_lba >= 0);
goto ex; goto ex;
} }
ret= Xorriso__start_end_lbas(node, &lba_count, &file_start_lbas, ret= Xorriso__start_end_lbas(node, &lba_count, &file_start_lbas,
@ -3129,15 +3158,15 @@ return:
if(ret <= 0) { if(ret <= 0) {
if(ret < 0) if(ret < 0)
Xorriso_process_msg_queues(xorriso, 0); Xorriso_process_msg_queues(xorriso, 0);
if(start_lba >= 0) if(range_lba >= 0)
value= 0; value= 0;
} else { } else {
for(i= 0; i < lba_count; i++) { for(i= 0; i < lba_count; i++) {
if(start_lba >= 0) { if(range_lba >= 0) {
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; value= 0;
} else { } 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; value= 0;
} }
} }
@ -3287,6 +3316,30 @@ return:
break; case 26: /* -mindepth */ break; case 26: /* -mindepth */
value= (ftest->boss->depth >= *((int *) arg1)); value= (ftest->boss->depth >= *((int *) arg1));
break; case 27: /* -size */
size_arg= *((off_t *) arg1);
size_mode= *((int *) arg2);
ret= Xorriso__get_file_size(node, &size, 0);
if(ret <= 0) {
if(ret < 0)
Xorriso_process_msg_queues(xorriso, 0);
value= 0;
goto ex;
}
if(size_mode == 0) {
value= (size == size_arg);
} else if(size_mode == 1) {
value= (size > size_arg);
} else if(size_mode == 2) {
value= (size >= size_arg);
} else if(size_mode == -1) {
value= (size < size_arg);
} else if(size_mode == -2) {
value= (size <= size_arg);
} else {
value= 0;
}
break; default: break; default:
/* >>> complain about unknown test type */; /* >>> complain about unknown test type */;

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. 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_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_xinfo(void *data, int flag);
int Xorriso__mark_update_cloner(void *old_data, void **new_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. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2019 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
@ -47,7 +47,7 @@
bit3= return root directory as "/" and not as "" bit3= return root directory as "/" and not as ""
bit4= (with bit2) determine type of disk file eff_path bit4= (with bit2) determine type of disk file eff_path
and return 0 if not existing and return 0 if not existing
bit5= (with bit3) this is not a parameter bit5= (with bit4) this is not a parameter
bit6= insist in having an ISO image, even with bits1+2 bit6= insist in having an ISO image, even with bits1+2
@return -1 = faulty path format, 0 = not found , @return -1 = faulty path format, 0 = not found ,
1 = found simple node , 2 = found directory 1 = found simple node , 2 = found directory
@ -196,6 +196,8 @@ ex:;
} }
/* @param flag bit0=do not complain about non existent node
*/
int Xorriso_get_node_by_path(struct XorrisO *xorriso, int Xorriso_get_node_by_path(struct XorrisO *xorriso,
char *in_path, char *eff_path, char *in_path, char *eff_path,
IsoNode **node, int flag) IsoNode **node, int flag)
@ -206,7 +208,8 @@ int Xorriso_get_node_by_path(struct XorrisO *xorriso,
Xorriso_alloc_meM(path, char, SfileadrL); 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) if(ret<=0)
goto ex; goto ex;
if(eff_path!=NULL) if(eff_path!=NULL)
@ -214,7 +217,7 @@ int Xorriso_get_node_by_path(struct XorrisO *xorriso,
ret= Xorriso_get_volume(xorriso, &volume, 0); ret= Xorriso_get_volume(xorriso, &volume, 0);
if(ret<=0) if(ret<=0)
goto ex; 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) if(ret<=0)
{ret= 0; goto ex;} {ret= 0; goto ex;}
ret= 1; ret= 1;
@ -456,7 +459,7 @@ ex:;
*/ */
/* @param flag bit0= use lba rather than node pointer /* @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) char path[SfileadrL], int flag)
{ {
int ret; int ret;
@ -474,7 +477,7 @@ int Xorriso_path_from_lba(struct XorrisO *xorriso, IsoNode *node, int lba,
return(ret); return(ret);
} }
if(flag & 1) if(flag & 1)
Findjob_set_lba_range(job, lba, 1, 0); Findjob_set_lba_range(job, lba, (off_t) 1, 0);
else else
Findjob_set_wanted_node(job, (void *) node, 0); Findjob_set_wanted_node(job, (void *) node, 0);
Findjob_set_action_found_path(job, 0); Findjob_set_action_found_path(job, 0);
@ -837,7 +840,17 @@ int Xorriso_getfattr(struct XorrisO *xorriso, void *in_node, char *path,
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
if(flag & 64) { if(flag & 64) {
ret= (num_attrs > 0); if(flag & 16) {
ret= 0;
for(i= 0; i < (int) num_attrs; i++) {
if(strncmp(names[i], "isofs.", 6) != 0) {
ret= 1;
break;
}
}
} else {
ret= (num_attrs > 0);
}
goto ex; goto ex;
} }
if(num_attrs == 0) if(num_attrs == 0)
@ -1296,7 +1309,8 @@ ex:
int Xorriso_stream_type(struct XorrisO *xorriso, IsoNode *node, int Xorriso_stream_type(struct XorrisO *xorriso, IsoNode *node,
IsoStream *stream, char type_text[], int flag) 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; uint8_t zisofs_algo[2], algo_num;
char text[5]; char text[5];
@ -2207,8 +2221,20 @@ ex:;
} }
int Xorriso__start_end_lbas(IsoNode *node, /* @return 1= size is valid , 0= not a regular file , -1 = error
int *lba_count, int **start_lbas, int **end_lbas, */
int Xorriso__get_file_size(IsoNode *node, off_t *size, int flag)
{
*size= 0;
if(!LIBISO_ISREG(node))
return(0);
*size= iso_file_get_size((IsoFile *) node);
return(1);
}
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) off_t **section_sizes, off_t *size, int flag)
{ {
int section_count= 0, ret, i; int section_count= 0, ret, i;
@ -2227,8 +2253,8 @@ int Xorriso__start_end_lbas(IsoNode *node,
{ret= -1; goto ex;} {ret= -1; goto ex;}
if(ret != 1 || section_count <= 0) if(ret != 1 || section_count <= 0)
{ret= 0; goto ex;} {ret= 0; goto ex;}
*start_lbas= calloc(section_count, sizeof(int)); *start_lbas= calloc(section_count, sizeof(off_t));
*end_lbas= calloc(section_count, sizeof(int)); *end_lbas= calloc(section_count, sizeof(off_t));
*section_sizes= calloc(section_count, sizeof(off_t)); *section_sizes= calloc(section_count, sizeof(off_t));
if(*start_lbas == NULL || *end_lbas == NULL || *section_sizes == NULL) if(*start_lbas == NULL || *end_lbas == NULL || *section_sizes == NULL)
{ret= -1; goto ex;} {ret= -1; goto ex;}
@ -2256,11 +2282,10 @@ ex:;
} }
int Xorriso__file_start_lba(IsoNode *node, int Xorriso__file_start_lba(IsoNode *node, off_t *lba, int flag)
int *lba, int flag)
{ {
int *start_lbas= NULL, *end_lbas= NULL, lba_count= 0, i, ret; int lba_count= 0, i, ret;
off_t size, *section_sizes= NULL; off_t size, *section_sizes= NULL, *start_lbas= NULL, *end_lbas= NULL;
*lba= -1; *lba= -1;
ret= Xorriso__start_end_lbas(node, &lba_count, &start_lbas, &end_lbas, ret= Xorriso__start_end_lbas(node, &lba_count, &start_lbas, &end_lbas,
@ -2478,8 +2503,8 @@ int Xorriso_file_eval_damage(struct XorrisO *xorriso, IsoNode *node,
off_t *damage_start, off_t *damage_end, off_t *damage_start, off_t *damage_end,
int flag) int flag)
{ {
int *start_lbas= NULL, *end_lbas= NULL, lba_count= 0, sect; int lba_count= 0, sect, ret;
int i, sectors, sector_size, ret; off_t i, sectors, sector_size, *start_lbas= NULL, *end_lbas= NULL;
off_t sect_base= 0, size= 0, byte, *section_sizes= NULL; off_t sect_base= 0, size= 0, byte, *section_sizes= NULL;
struct SectorbitmaP *map; struct SectorbitmaP *map;
@ -2506,8 +2531,7 @@ int Xorriso_file_eval_damage(struct XorrisO *xorriso, IsoNode *node,
*damage_end= byte + (off_t) 2048; *damage_end= byte + (off_t) 2048;
} }
} }
sect_base+= ((off_t) 2048) * sect_base+= ((off_t) 2048) * (end_lbas[sect] - start_lbas[sect] + 1);
((off_t) (end_lbas[sect] - start_lbas[sect] + 1));
} }
if(*damage_end > size) if(*damage_end > size)
*damage_end= size; *damage_end= size;
@ -2529,8 +2553,8 @@ int Xorriso_file_eval_damage(struct XorrisO *xorriso, IsoNode *node,
int Xorriso_report_lba(struct XorrisO *xorriso, char *show_path, int Xorriso_report_lba(struct XorrisO *xorriso, char *show_path,
IsoNode *node, uint32_t *last_block, int flag) IsoNode *node, uint32_t *last_block, int flag)
{ {
int ret, *start_lbas= NULL, *end_lbas= NULL, lba_count, i; int ret, lba_count, i;
off_t size, *section_sizes= NULL; off_t size, *section_sizes= NULL, *start_lbas= NULL, *end_lbas= NULL;
ret= Xorriso__start_end_lbas(node, &lba_count, &start_lbas, &end_lbas, ret= Xorriso__start_end_lbas(node, &lba_count, &start_lbas, &end_lbas,
&section_sizes, &size, 0); &section_sizes, &size, 0);
@ -2544,12 +2568,13 @@ int Xorriso_report_lba(struct XorrisO *xorriso, char *show_path,
if(flag & 1) if(flag & 1)
size= section_sizes[i]; size= section_sizes[i];
if(flag & 2) { 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]; *last_block= end_lbas[i];
} else { } else {
sprintf(xorriso->result_line, sprintf(xorriso->result_line,
"File data lba: %2d , %8d , %8d , %8.f , ", "File data lba: %2d , %8.f , %8.f , %8.f , ",
i, start_lbas[i], end_lbas[i] + 1 - start_lbas[i], (double) size); i, (double) start_lbas[i],
(double) (end_lbas[i] + 1 - start_lbas[i]), (double) size);
Text_shellsafe(show_path, xorriso->result_line, 1); Text_shellsafe(show_path, xorriso->result_line, 1);
strcat(xorriso->result_line, "\n"); strcat(xorriso->result_line, "\n");
Xorriso_result(xorriso, 0); Xorriso_result(xorriso, 0);
@ -2749,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, int Xorriso_is_plain_image_file(struct XorrisO *xorriso, void *in_node,
char *path, int flag) char *path, int flag)
{ {
int ret, lba; int ret;
off_t lba;
IsoStream *stream; IsoStream *stream;
IsoNode *node; IsoNode *node;
@ -2770,3 +2796,89 @@ int Xorriso_is_plain_image_file(struct XorrisO *xorriso, void *in_node,
return(0); return(0);
} }
/*
Check for existence of a data file at given path. Complain if it is missing.
@param prefix is printed directly before purpose, no blank inbetween
@param purpose is printed up to first '=' character
@param path ISO or disk file path
@param flag bit0= check on disk (else in ISO)
*/
int Xorriso_warn_if_not_exist(struct XorrisO *xorriso, char *prefix,
char *purpose, char *path, int flag)
{
int ret;
char *where, *ept;
struct stat stbuf;
if(flag & 1) {
where= "on disk";
ret= Sfile_type(path, 1 | 4 | 16);
if(ret == 1 || ret == 6)
return(1);
} else {
where= "in ISO image";
ret= Xorriso_iso_lstat(xorriso, path, &stbuf, 0);
if(ret == 0) {
if(S_ISREG(stbuf.st_mode) || S_ISBLK(stbuf.st_mode))
return(0);
}
}
/* Not found or not data file or block device */
sprintf(xorriso->info_text, "%s%s", prefix, purpose);
ept= strchr(xorriso->info_text + strlen(prefix), '=');
if(ept != NULL)
*(ept + 1)= 0;
if(ret == -1) {
/* This is a normal situation with -as mkisofs emulation */
if(xorriso->current_interpreter == 1)
return(2);
sprintf(xorriso->info_text + strlen(xorriso->info_text),
" : path does not yet exist %s : ", where);
} else {
sprintf(xorriso->info_text + strlen(xorriso->info_text),
" : path exists %s but is not a usable file type : ", where);
}
Text_shellsafe(path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
return(0);
}
/*
Check for existence of a file at given path. Complain if it exists but is
not a boot catalog file.
@param prefix is printed directly before purpose, no blank inbetween
@param purpose is printed up to first '=' character
@param path ISO file path
*/
int Xorriso_warn_if_not_bootcat(struct XorrisO *xorriso, char *prefix,
char *purpose, char *path, int flag)
{
int ret;
char *where, *ept;
IsoImage *volume;
IsoNode *node;
where= "in ISO image";
ret= Xorriso_get_volume(xorriso, &volume, 0);
if(ret <= 0)
return(-1);
ret= Xorriso_node_from_path(xorriso, volume, path, &node, 1);
if(ret <= 0)
return(1);
if(LIBISO_ISBOOT(node))
return(2);
sprintf(xorriso->info_text, "%s%s", prefix, purpose);
ept= strchr(xorriso->info_text + strlen(prefix), '=');
if(ept != NULL)
*(ept + 1)= 0;
sprintf(xorriso->info_text + strlen(xorriso->info_text),
" : path exists %s but is currently not a boot catalog file : ",
where);
Text_shellsafe(path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
return(0);
}

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. 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, int Xorriso_path_from_node(struct XorrisO *xorriso, IsoNode *in_node,
char path[SfileadrL], int flag); 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); char path[SfileadrL], int flag);
int Xorriso_get_attr_value(struct XorrisO *xorriso, void *in_node, char *path, int Xorriso_get_attr_value(struct XorrisO *xorriso, void *in_node, char *path,
@ -71,12 +71,13 @@ int Xorriso_obtain_pattern_files_i(
int *filec, char **filev, int count_limit, off_t *mem, int *filec, char **filev, int count_limit, off_t *mem,
int *dive_count, int flag); int *dive_count, int flag);
int Xorriso__start_end_lbas(IsoNode *node, int Xorriso__get_file_size(IsoNode *node, off_t *size, int flag);
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); off_t **section_sizes, off_t *size, int flag);
int Xorriso__file_start_lba(IsoNode *node, int Xorriso__file_start_lba(IsoNode *node, off_t *lba, int flag);
int *lba, int flag);
int Xorriso_file_eval_damage(struct XorrisO *xorriso, IsoNode *node, int Xorriso_file_eval_damage(struct XorrisO *xorriso, IsoNode *node,
off_t *damage_start, off_t *damage_end, off_t *damage_start, off_t *damage_end,

View File

@ -57,6 +57,7 @@
#include "lib_mgt.h" #include "lib_mgt.h"
#include "iso_manip.h" #include "iso_manip.h"
#include "write_run.h"
int Xorriso_abort(struct XorrisO *xorriso, int flag) int Xorriso_abort(struct XorrisO *xorriso, int flag)
@ -1006,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 Xorriso_format_guid(struct XorrisO *xorriso, uint8_t guid[16], char *line,
int flag) int flag)
{ {
Xorriso__format_guid(guid, line, !(flag & 1));
/* >>> Maybe let the user switch between hex string and structured text */;
Xorriso__format_guid(guid, line, 1);
return(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) int Xorriso_make_guid(struct XorrisO *xorriso, char *line, int flag)
{ {
uint8_t guid[16]; uint8_t guid[16];
int ret; int ret;
iso_generate_gpt_guid(guid); iso_generate_gpt_guid(guid);
ret= Xorriso_format_guid(xorriso, guid, line, 0); ret= Xorriso_format_guid(xorriso, guid, line, flag & 1);
return(ret); return(ret);
} }
@ -1042,3 +1044,45 @@ int Xorriso_set_libisofs_now(struct XorrisO *xorriso, int flag)
return(ret); return(ret);
} }
/* Frontend to isoburn_conv_name_chars()
@param flag bit0= File name.
Do not omit version number if it would appear.
*/
int Xorriso_conv_name_chars(struct XorrisO *xorriso, char *name,
char **result, size_t *result_len,
int name_space, int flag)
{
int ret, relax_mem;
struct isoburn_imgen_opts *sopts= NULL;
*result= NULL;
*result_len= 0;
relax_mem= xorriso->relax_compliance;
ret= isoburn_igopt_new(&sopts, 0);
if(ret<=0) {
Xorriso_process_msg_queues(xorriso, 0);
ret= -1; goto ex;
}
if(!(flag & 1))
xorriso->relax_compliance|= isoburn_igopt_omit_version_numbers;
ret= Xorriso_make_iso_write_opts(xorriso, NULL, sopts, 0);
if(ret <= 0) {
ret= -1; goto ex;
}
ret= isoburn_conv_name_chars(sopts, name, strlen(name), result, result_len,
name_space);
if(ret <= 0) {
Xorriso_process_msg_queues(xorriso, 0);
ret= 0; goto ex;
}
ret= 1;
ex:;
isoburn_igopt_destroy(&sopts, 0);
xorriso->relax_compliance= relax_mem;
return(ret);
}

View File

@ -9,11 +9,13 @@
( cd xorriso ; makeinfo --no-split ./xorrecord.texi ) ( cd xorriso ; makeinfo --no-split ./xorrecord.texi )
( cd xorriso ; makeinfo --no-split ./xorriso-tcltk.texi ) ( cd xorriso ; makeinfo --no-split ./xorriso-tcltk.texi )
( cd xorriso-dd-target ; makeinfo --no-split ./xorriso-dd-target.texi ) ( cd xorriso-dd-target ; makeinfo --no-split ./xorriso-dd-target.texi )
( cd test ; makeinfo --no-split ./merge_debian_isos.texi )
xorriso/make_xorriso_1 -auto xorriso/make_xorriso_1 -auto
xorriso/make_xorriso_1 -auto -xorrisofs xorriso/make_xorriso_1 -auto -xorrisofs
xorriso/make_xorriso_1 -auto -xorrecord xorriso/make_xorriso_1 -auto -xorrecord
xorriso/make_xorriso_1 -auto -xorriso-tcltk xorriso/make_xorriso_1 -auto -xorriso-tcltk
xorriso/make_xorriso_1 -auto -xorriso-dd-target xorriso/make_xorriso_1 -auto -xorriso-dd-target
xorriso/make_xorriso_1 -auto -merge_debian_isos

View File

@ -8,10 +8,11 @@
or from xorriso/xorrecord.texi to xorriso/xorrecord.1. or from xorriso/xorrecord.texi to xorriso/xorrecord.1.
or from xorriso/xorriso-tcltk.texi to xorriso/xorriso-tcltk.1. or from xorriso/xorriso-tcltk.texi to xorriso/xorriso-tcltk.1.
or from xorriso/xorriso-dd-target.texi to xorriso/xorriso-dd-target.1. or from xorriso/xorriso-dd-target.texi to xorriso/xorriso-dd-target.1.
of from test/merge_debian_iso.texi to test/merge_debian_iso.1
The conversion rules are described at the beginning of xorriso/xorriso.texi The conversion rules are described at the beginning of xorriso/xorriso.texi
Copyright 2010 - 2019 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2010 - 2022 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
*/ */
@ -498,6 +499,9 @@ usage:;
} else if(strcmp(argv[i], "-xorriso-dd-target") == 0) { } else if(strcmp(argv[i], "-xorriso-dd-target") == 0) {
strcpy(name_in, "xorriso-dd-target/xorriso-dd-target.texi"); strcpy(name_in, "xorriso-dd-target/xorriso-dd-target.texi");
strcpy(name_out, "xorriso-dd-target/xorriso-dd-target.1"); strcpy(name_out, "xorriso-dd-target/xorriso-dd-target.1");
} else if(strcmp(argv[i], "-merge_debian_isos") == 0) {
strcpy(name_in, "test/merge_debian_isos.texi");
strcpy(name_out, "test/merge_debian_isos.1");
} else { } else {
fprintf(stderr, "%s : unknown option %s\n", argv[0], argv[i]); fprintf(stderr, "%s : unknown option %s\n", argv[0], argv[i]);
goto usage; goto usage;

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# make_xorriso_standalone.sh # make_xorriso_standalone.sh
# Copyright 2008 - 2021 Thomas Schmitt, scdbackup@gmx.net, GPLv2+ # Copyright 2008 - 2023 Thomas Schmitt, scdbackup@gmx.net, GPLv2+
# #
# Not intended for general use in production installations ! # Not intended for general use in production installations !
# #
@ -50,7 +50,7 @@ create_gnu_xorriso="yes"
current_dir=$(pwd) current_dir=$(pwd)
lone_dir="$current_dir"/"xorriso-standalone" lone_dir="$current_dir"/"xorriso-standalone"
xorriso_rev=1.5.4 xorriso_rev=1.5.7
# For unstable uploads and patch level 0 of stable releases: # For unstable uploads and patch level 0 of stable releases:
xorriso_pl="" xorriso_pl=""
# For higher patch levels of stable releases: # For higher patch levels of stable releases:
@ -247,6 +247,10 @@ copy_files doc/partition_offset.wiki \
create_dir "$lone_dir"/test create_dir "$lone_dir"/test
copy_files \ copy_files \
test/compare_file.c \ test/compare_file.c \
test/merge_debian_isos \
test/merge_debian_isos.texi \
test/merge_debian_isos.info \
test/merge_debian_isos.1 \
"$lone_dir"/test "$lone_dir"/test
create_dir "$lone_dir"/frontend create_dir "$lone_dir"/frontend

View File

@ -679,7 +679,7 @@ completed:;
3= Mon Day hh:mm:ss Year 3= Mon Day hh:mm:ss Year
4= YYMMDD.hhmmss 4= YYMMDD.hhmmss
*/ */
char *Ftimetxt(time_t t, char timetext[40], int flag) char *Ftimetxt(time_t t, char *timetext, int flag)
{ {
char *rpt; char *rpt;
struct tm tms, *tmpt; 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 /* @param flag bit0=with year and seconds
bit1=timestamp format YYYY.MM.DD.hhmmss 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, int System_uname(char **sysname, char **release, char **version,
char **machine, int flag); char **machine, int flag);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2019 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2024 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
@ -295,65 +295,120 @@ ex:;
int Xorriso_option_append_partition(struct XorrisO *xorriso, char *partno_text, int Xorriso_option_append_partition(struct XorrisO *xorriso, char *partno_text,
char *type_text, char *image_path, int flag) 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; unsigned int unum;
char *tpt; char *tpt;
uint8_t guid[16]; uint8_t guid[16];
static char *part_type_names[] = {"FAT12", "FAT16", "Linux", "", NULL}; static char *part_type_names[] = {"FAT12", "FAT16", "Linux", "", NULL};
static int part_type_codes[] = { 0x01, 0x06, 0x83, 0x00}; static int part_type_codes[] = { 0x01, 0x06, 0x83, 0x00};
sscanf(partno_text, "%d", &partno); if(strcmp(partno_text, "all") == 0) {
if(partno < 1 || partno > Xorriso_max_appended_partitionS) { if(strcmp(type_text, "revoke") != 0 && image_path[0] != 0) {
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:;
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"-append_partition: Partition type '%s' is out of range (0x00...0xff or GUID)", "-append_partition: Pseudo partition number 'all' works only with type code 'revoke' or empty disk path");
type_text); 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); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(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]); 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); xorriso->appended_partitions[partno - 1]= strdup(image_path);
if(xorriso->appended_partitions[partno - 1] == NULL) { if(xorriso->appended_partitions[partno - 1] == NULL) {
Xorriso_no_malloc_memory(xorriso, NULL, 0); Xorriso_no_malloc_memory(xorriso, NULL, 0);
return(-1); return(-1);
} }
if(xorriso->appended_part_types[partno - 1] != type_code)
set_changed= 1;
xorriso->appended_part_types[partno - 1]= type_code; xorriso->appended_part_types[partno - 1]= type_code;
if(guid_valid) { 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); memcpy(xorriso->appended_part_type_guids[partno - 1], guid, 16);
xorriso->appended_part_gpt_flags[partno - 1]|= 1; xorriso->appended_part_gpt_flags[partno - 1]|= 1;
} else { } else {
if(xorriso->appended_part_gpt_flags[partno - 1] & 1)
set_changed= 1;
xorriso->appended_part_gpt_flags[partno - 1]&= ~1; xorriso->appended_part_gpt_flags[partno - 1]&= ~1;
} }
work_done:;
if(set_changed)
Xorriso_set_change_pending(xorriso, 1);
return(1); return(1);
} }
@ -487,6 +542,25 @@ int Xorriso_option_assert_volid(struct XorrisO *xorriso, char *pattern,
} }
/* Command -assess_indev_features */
int Xorriso_option_assess_indev_features(struct XorrisO *xorriso, char *mode,
int flag)
{
int ret;
if(strcmp(mode, "plain") != 0 && strcmp(mode, "cmd") != 0 &&
strcmp(mode, "as_mkisofs") != 0 && strcmp(mode, "replay") != 0 &&
mode[0] != 0) {
sprintf(xorriso->info_text, "-assess_indev_features: unknown mode '%s'",
mode);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
ret= Xorriso_assess_written_features(xorriso, mode, 0);
return(ret);
}
/* Option -auto_charset "on"|"off" */ /* Option -auto_charset "on"|"off" */
int Xorriso_option_auto_charset(struct XorrisO *xorriso, char *mode, int flag) int Xorriso_option_auto_charset(struct XorrisO *xorriso, char *mode, int flag)
{ {
@ -696,7 +770,7 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
char *treatment, int flag) char *treatment, int flag)
{ {
int was_ok= 1, ret, isolinux_grub= 0, count, bin_count, parm_len; 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; unsigned int u;
char *formpt, *treatpt, *eff_path= NULL, *eqpt, parm[20]; char *formpt, *treatpt, *eff_path= NULL, *eqpt, parm[20];
uint8_t sn[8]; uint8_t sn[8];
@ -726,6 +800,7 @@ cannot_keep_or_patch:;
xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 0; xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 0;
xorriso->boot_image_bin_path[0]= 0; xorriso->boot_image_bin_path[0]= 0;
xorriso->patch_system_area= 0; xorriso->patch_system_area= 0;
is_change= 1;
} else if(strcmp(treatpt, "patch")==0) { } else if(strcmp(treatpt, "patch")==0) {
treatment_patch:; treatment_patch:;
@ -741,6 +816,7 @@ treatment_patch:;
xorriso->patch_system_area= 2; xorriso->patch_system_area= 2;
else else
xorriso->patch_system_area= 0; xorriso->patch_system_area= 0;
is_change= 1;
} else if(strcmp(treatpt, "replay")==0) { } else if(strcmp(treatpt, "replay")==0) {
ret= Xorriso_report_system_area(xorriso, "cmd", 2); ret= Xorriso_report_system_area(xorriso, "cmd", 2);
@ -759,6 +835,7 @@ treatment_patch:;
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
} }
is_change= 1;
} else if(strcmp(treatpt, "next") == 0) { } else if(strcmp(treatpt, "next") == 0) {
ret= Xorriso_attach_boot_image(xorriso, 0); ret= Xorriso_attach_boot_image(xorriso, 0);
@ -780,23 +857,30 @@ treatment_patch:;
sprintf(xorriso->result_line, "------------------------------------\n"); sprintf(xorriso->result_line, "------------------------------------\n");
Xorriso_result(xorriso, 0); Xorriso_result(xorriso, 0);
Xorriso_status(xorriso, "-boot_image", NULL, 0); Xorriso_status(xorriso, "-boot_image", NULL, 0);
Xorriso_status(xorriso, "-append_partition", NULL, 0);
sprintf(xorriso->result_line, "------------------------------------\n"); sprintf(xorriso->result_line, "------------------------------------\n");
Xorriso_result(xorriso, 0); Xorriso_result(xorriso, 0);
} else if(strcmp(treatpt, "cat_path=") == 0) { } else if(strcmp(treatpt, "cat_path=") == 0) {
xorriso->boot_image_cat_path[0] = 0; xorriso->boot_image_cat_path[0] = 0;
is_change= 1;
} else if(strncmp(treatpt, "cat_path=", 9) == 0) { } else if(strncmp(treatpt, "cat_path=", 9) == 0) {
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9, ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9,
xorriso->boot_image_cat_path, 2); xorriso->boot_image_cat_path, 2);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
Xorriso_warn_if_not_bootcat(xorriso, "-boot_image ", treatment,
xorriso->boot_image_cat_path, 0);
is_change= 1;
} else if(strncmp(treatpt, "cat_hidden=", 11) == 0) { } else if(strncmp(treatpt, "cat_hidden=", 11) == 0) {
ret= Xorriso__hide_mode(treatpt + 11, 0); ret= Xorriso__hide_mode(treatpt + 11, 0);
if(ret >= 0) if(ret >= 0) {
is_change= 1;
xorriso->boot_image_cat_hidden= ret; xorriso->boot_image_cat_hidden= ret;
else } else {
was_ok= 0; was_ok= 0;
}
} else if(strncmp(treatpt, "dir=", 4) == 0) { } else if(strncmp(treatpt, "dir=", 4) == 0) {
if(strcmp(formpt, "isolinux")==0) { if(strcmp(formpt, "isolinux")==0) {
@ -830,6 +914,11 @@ treatment_patch:;
xorriso->keep_boot_image= 0; xorriso->keep_boot_image= 0;
xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 1; xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 1;
strcpy(xorriso->boot_image_bin_form, formpt); strcpy(xorriso->boot_image_bin_form, formpt);
Xorriso_warn_if_not_exist(xorriso, "Implicit boot image via -boot_image ",
treatment, xorriso->boot_image_bin_path, 0);
Xorriso_warn_if_not_bootcat(xorriso, "-boot_image ", treatment,
xorriso->boot_image_cat_path, 0);
is_change= 1;
{ret= 1; goto ex;} {ret= 1; goto ex;}
} else if(strcmp(formpt, "grub") == 0) { } else if(strcmp(formpt, "grub") == 0) {
@ -838,6 +927,7 @@ treatment_patch:;
was_ok= 0; was_ok= 0;
strcpy(xorriso->boot_image_bin_form, formpt); strcpy(xorriso->boot_image_bin_form, formpt);
is_change= 1;
} else } else
was_ok= 0; was_ok= 0;
@ -845,6 +935,7 @@ treatment_patch:;
} else if(strcmp(treatpt, "bin_path=") == 0) { } else if(strcmp(treatpt, "bin_path=") == 0) {
xorriso->boot_image_bin_path[0] = 0; xorriso->boot_image_bin_path[0] = 0;
xorriso->boot_efi_default= 0; xorriso->boot_efi_default= 0;
is_change= 1;
} else if(strncmp(treatpt, "bin_path=", 9) == 0) { } else if(strncmp(treatpt, "bin_path=", 9) == 0) {
if(strncmp(treatpt + 9, "--interval:appended_partition_", 30) == 0) { if(strncmp(treatpt + 9, "--interval:appended_partition_", 30) == 0) {
if(strlen(treatpt + 9) >= sizeof(xorriso->boot_image_bin_path)) { if(strlen(treatpt + 9) >= sizeof(xorriso->boot_image_bin_path)) {
@ -861,6 +952,8 @@ interval_text_long:;
xorriso->boot_image_bin_path, 2); xorriso->boot_image_bin_path, 2);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
Xorriso_warn_if_not_exist(xorriso, "-boot_image ",
treatment, xorriso->boot_image_bin_path, 0);
} }
xorriso->keep_boot_image= 0; xorriso->keep_boot_image= 0;
if(isolinux_grub) { if(isolinux_grub) {
@ -873,10 +966,12 @@ interval_text_long:;
} else } else
strcpy(xorriso->boot_image_bin_form, "any"); strcpy(xorriso->boot_image_bin_form, "any");
xorriso->boot_efi_default= 0; xorriso->boot_efi_default= 0;
is_change= 1;
} else if(strcmp(treatpt, "efi_path=") == 0) { } else if(strcmp(treatpt, "efi_path=") == 0) {
xorriso->boot_image_bin_path[0] = 0; xorriso->boot_image_bin_path[0] = 0;
xorriso->boot_efi_default= 0; xorriso->boot_efi_default= 0;
is_change= 1;
} else if(strncmp(treatpt, "efi_path=", 9) == 0) { } else if(strncmp(treatpt, "efi_path=", 9) == 0) {
if(strncmp(treatpt + 9, "--interval:appended_partition_", 30) == 0) { if(strncmp(treatpt + 9, "--interval:appended_partition_", 30) == 0) {
if(strlen(treatpt + 9) >= sizeof(xorriso->boot_image_bin_path)) if(strlen(treatpt + 9) >= sizeof(xorriso->boot_image_bin_path))
@ -887,9 +982,12 @@ interval_text_long:;
xorriso->boot_image_bin_path, 2); xorriso->boot_image_bin_path, 2);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
Xorriso_warn_if_not_exist(xorriso, "-boot_image ",
treatment, xorriso->boot_image_bin_path, 0);
} }
xorriso->keep_boot_image= 0; xorriso->keep_boot_image= 0;
xorriso->boot_efi_default= 1; xorriso->boot_efi_default= 1;
is_change= 1;
} else if(strncmp(treatpt, "mips_path=", 10) == 0) { } else if(strncmp(treatpt, "mips_path=", 10) == 0) {
sprintf(eff_path, "-boot_image %s mips_path=", formpt); sprintf(eff_path, "-boot_image %s mips_path=", formpt);
@ -903,6 +1001,8 @@ interval_text_long:;
ret= Xorriso_add_mips_boot_file(xorriso, eff_path, 0); ret= Xorriso_add_mips_boot_file(xorriso, eff_path, 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
Xorriso_warn_if_not_exist(xorriso, "-boot_image ", treatment, eff_path, 0);
is_change= 1;
} else if(strncmp(treatpt, "mipsel_path=", 12) == 0) { } else if(strncmp(treatpt, "mipsel_path=", 12) == 0) {
sprintf(eff_path, "-boot_image %s mipsel_path=", formpt); sprintf(eff_path, "-boot_image %s mipsel_path=", formpt);
@ -916,6 +1016,8 @@ interval_text_long:;
ret= Xorriso_add_mips_boot_file(xorriso, eff_path, 2); ret= Xorriso_add_mips_boot_file(xorriso, eff_path, 2);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
Xorriso_warn_if_not_exist(xorriso, "-boot_image ", treatment, eff_path, 0);
is_change= 1;
} else if(strcmp(treatpt, "mips_discard") == 0 || } else if(strcmp(treatpt, "mips_discard") == 0 ||
strcmp(treatpt, "mipsel_discard") == 0 || strcmp(treatpt, "mipsel_discard") == 0 ||
@ -926,6 +1028,7 @@ interval_text_long:;
Xorriso_add_mips_boot_file(xorriso, "", 1); /* give up MIPS boot files */ 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_hppa_boot_parm(xorriso, "", "", 1); /* give up HP-PA files */
Xorriso_set_alpha_boot(xorriso, "", 1); /* give up DEC Alpha loader */ Xorriso_set_alpha_boot(xorriso, "", 1); /* give up DEC Alpha loader */
is_change= 1;
} else if(strncmp(treatpt, "sparc_label=", 12) == 0) { } else if(strncmp(treatpt, "sparc_label=", 12) == 0) {
sprintf(eff_path, "-boot_image %s sparc_label=", formpt); sprintf(eff_path, "-boot_image %s sparc_label=", formpt);
@ -935,12 +1038,16 @@ interval_text_long:;
strncpy(xorriso->ascii_disc_label, treatpt + 12, strncpy(xorriso->ascii_disc_label, treatpt + 12,
Xorriso_disc_label_sizE - 1); Xorriso_disc_label_sizE - 1);
xorriso->ascii_disc_label[Xorriso_disc_label_sizE - 1] = 0; xorriso->ascii_disc_label[Xorriso_disc_label_sizE - 1] = 0;
is_change= 1;
} else if(strncmp(treatpt, "grub2_sparc_core=", 17) == 0) { } else if(strncmp(treatpt, "grub2_sparc_core=", 17) == 0) {
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 17, ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 17,
xorriso->grub2_sparc_core, 2); xorriso->grub2_sparc_core, 2);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
Xorriso_warn_if_not_exist(xorriso, "-boot_image ", treatment,
xorriso->grub2_sparc_core, 0);
is_change= 1;
} else if(strncmp(treatpt, "hppa_", 5) == 0) { } else if(strncmp(treatpt, "hppa_", 5) == 0) {
sprintf(eff_path, "-boot_image %s %s", formpt, treatpt); sprintf(eff_path, "-boot_image %s %s", formpt, treatpt);
@ -966,6 +1073,8 @@ interval_text_long:;
ret= Xorriso_set_hppa_boot_parm(xorriso, eqpt + 1, parm, 0); ret= Xorriso_set_hppa_boot_parm(xorriso, eqpt + 1, parm, 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
/* (needs no file existence check because already done in libisofs) */
is_change= 1;
} else if(strncmp(treatpt, "alpha_boot=", 11) == 0) { } else if(strncmp(treatpt, "alpha_boot=", 11) == 0) {
sprintf(eff_path, "-boot_image %s %s", formpt, treatpt); sprintf(eff_path, "-boot_image %s %s", formpt, treatpt);
@ -975,6 +1084,9 @@ interval_text_long:;
ret = Xorriso_set_alpha_boot(xorriso, treatpt + 11, 0); ret = Xorriso_set_alpha_boot(xorriso, treatpt + 11, 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
Xorriso_warn_if_not_exist(xorriso, "-boot_image ", treatment,
treatpt + 11, 0);
is_change= 1;
} else if(strncmp(treatpt, "boot_info_table=", 16)==0) { } else if(strncmp(treatpt, "boot_info_table=", 16)==0) {
if(strcmp(treatpt + 16, "off") == 0) if(strcmp(treatpt + 16, "off") == 0)
@ -984,6 +1096,8 @@ interval_text_long:;
1 | (2 * (strcmp(treatpt, "grub") == 0)); 1 | (2 * (strcmp(treatpt, "grub") == 0));
else else
was_ok= 0; was_ok= 0;
if(was_ok)
is_change= 1;
} else if(strncmp(treatpt, "grub2_boot_info=", 16)==0) { } else if(strncmp(treatpt, "grub2_boot_info=", 16)==0) {
if(strcmp(treatpt + 16, "off") == 0) if(strcmp(treatpt + 16, "off") == 0)
@ -992,6 +1106,8 @@ interval_text_long:;
xorriso->patch_isolinux_image= xorriso->patch_isolinux_image | 512; xorriso->patch_isolinux_image= xorriso->patch_isolinux_image | 512;
else else
was_ok= 0; was_ok= 0;
if(was_ok)
is_change= 1;
} else if(strncmp(treatpt, "load_size=", 10) == 0) { } else if(strncmp(treatpt, "load_size=", 10) == 0) {
if(strcmp(treatpt + 10, "full") == 0) { if(strcmp(treatpt + 10, "full") == 0) {
@ -1008,6 +1124,7 @@ interval_text_long:;
xorriso->boot_image_load_size= num; xorriso->boot_image_load_size= num;
} }
xorriso->boot_img_size_default= 0; xorriso->boot_img_size_default= 0;
is_change= 1;
} else if(strncmp(treatpt, "id_string=", 10) == 0) { } else if(strncmp(treatpt, "id_string=", 10) == 0) {
memset(xorriso->boot_id_string, 0, 29); memset(xorriso->boot_id_string, 0, 29);
@ -1017,6 +1134,7 @@ interval_text_long:;
ret= 0; ret= 0;
if(ret <= 0) if(ret <= 0)
strncpy((char *) xorriso->boot_id_string, treatpt + 10, 28); strncpy((char *) xorriso->boot_id_string, treatpt + 10, 28);
is_change= 1;
} else if(strncmp(treatpt, "sel_crit=", 9) == 0) { } else if(strncmp(treatpt, "sel_crit=", 9) == 0) {
memset(xorriso->boot_selection_crit, 0, 21); memset(xorriso->boot_selection_crit, 0, 21);
@ -1029,6 +1147,7 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
is_change= 1;
} else if(strncmp(treatpt, "system_area=", 12) == 0) { } else if(strncmp(treatpt, "system_area=", 12) == 0) {
if(strcmp(formpt, "isolinux")==0) { if(strcmp(formpt, "isolinux")==0) {
@ -1040,6 +1159,7 @@ interval_text_long:;
if(strcmp(treatpt + 12, ".") == 0) { if(strcmp(treatpt + 12, ".") == 0) {
ret= Xorriso_set_system_area_path(xorriso, "", 0); ret= Xorriso_set_system_area_path(xorriso, "", 0);
} else { } else {
/* (checks also for existence of the disk file) */
ret= Xorriso_set_system_area_path(xorriso, treatpt + 12, 0); ret= Xorriso_set_system_area_path(xorriso, treatpt + 12, 0);
} }
if(ret <= 0) if(ret <= 0)
@ -1047,6 +1167,7 @@ interval_text_long:;
xorriso->system_area_options&= ~0x4000; xorriso->system_area_options&= ~0x4000;
if(strcmp(treatpt + 12, "/dev/zero") == 0) if(strcmp(treatpt + 12, "/dev/zero") == 0)
xorriso->system_area_clear_loaded= 1; xorriso->system_area_clear_loaded= 1;
is_change= 1;
} else if(strncmp(treatpt, "partition_table=", 16)==0) { } else if(strncmp(treatpt, "partition_table=", 16)==0) {
if(strcmp(treatpt + 16, "off") == 0) { if(strcmp(treatpt + 16, "off") == 0) {
@ -1061,6 +1182,9 @@ interval_text_long:;
goto ex; goto ex;
} else } else
was_ok= 0; was_ok= 0;
if(was_ok)
is_change= 1;
} else if(strncmp(treatpt, "partition_entry=", 16)==0) { } else if(strncmp(treatpt, "partition_entry=", 16)==0) {
if(strcmp(formpt, "isolinux") != 0) { if(strcmp(formpt, "isolinux") != 0) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
@ -1081,6 +1205,8 @@ interval_text_long:;
xorriso->patch_isolinux_image = (xorriso->patch_isolinux_image & ~0x1fc); xorriso->patch_isolinux_image = (xorriso->patch_isolinux_image & ~0x1fc);
} else } else
was_ok= 0; was_ok= 0;
if(was_ok)
is_change= 1;
} else if(strncmp(treatpt, "partition_offset=", 17)==0) { } else if(strncmp(treatpt, "partition_offset=", 17)==0) {
u= 0; u= 0;
@ -1093,6 +1219,7 @@ interval_text_long:;
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
xorriso->partition_offset= u; xorriso->partition_offset= u;
is_change= 1;
} else if(strncmp(treatpt, "appended_part_as=", 17) == 0) { } else if(strncmp(treatpt, "appended_part_as=", 17) == 0) {
if(strcmp(treatpt + 17, "gpt") == 0) { if(strcmp(treatpt + 17, "gpt") == 0) {
@ -1104,11 +1231,14 @@ interval_text_long:;
xorriso->appended_as_apm = 1; xorriso->appended_as_apm = 1;
} else } else
was_ok= 0; was_ok= 0;
if(was_ok)
is_change= 1;
} else if(strncmp(treatpt, "gpt_disk_guid=", 14) == 0) { } else if(strncmp(treatpt, "gpt_disk_guid=", 14) == 0) {
ret= Xorriso_parse_gpt_guid(xorriso, treatpt + 14, 0); ret= Xorriso_parse_gpt_guid(xorriso, treatpt + 14, 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
is_change= 1;
} else if(strncmp(treatpt, "part_like_isohybrid=", 20) == 0) { } else if(strncmp(treatpt, "part_like_isohybrid=", 20) == 0) {
if(strcmp(treatpt + 20, "on") == 0) if(strcmp(treatpt + 20, "on") == 0)
@ -1117,6 +1247,8 @@ interval_text_long:;
xorriso->part_like_isohybrid= 0; xorriso->part_like_isohybrid= 0;
else else
was_ok= 0; was_ok= 0;
if(was_ok)
is_change= 1;
} else if(strncmp(treatpt, "iso_mbr_part_type=", 18) == 0) { } else if(strncmp(treatpt, "iso_mbr_part_type=", 18) == 0) {
ret= 256; ret= 256;
@ -1146,6 +1278,7 @@ interval_text_long:;
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
xorriso->iso_mbr_part_type= ret; xorriso->iso_mbr_part_type= ret;
is_change= 1;
} else if(strncmp(treatpt, "partition_hd_cyl=", 17)==0) { } else if(strncmp(treatpt, "partition_hd_cyl=", 17)==0) {
u= 0; u= 0;
@ -1157,6 +1290,7 @@ interval_text_long:;
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
xorriso->partition_heads_per_cyl= u; xorriso->partition_heads_per_cyl= u;
is_change= 1;
} else if(strncmp(treatpt, "partition_sec_hd=", 17)==0) { } else if(strncmp(treatpt, "partition_sec_hd=", 17)==0) {
u= 0; u= 0;
@ -1168,6 +1302,7 @@ interval_text_long:;
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
xorriso->partition_secs_per_head= u; xorriso->partition_secs_per_head= u;
is_change= 1;
} else if(strncmp(treatpt, "partition_cyl_align=", 20)==0) { } else if(strncmp(treatpt, "partition_cyl_align=", 20)==0) {
if(strcmp(treatpt + 20, "auto") == 0) if(strcmp(treatpt + 20, "auto") == 0)
@ -1188,6 +1323,7 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
is_change= 1;
} else if(strncmp(treatpt, "platform_id=", 12)==0) { } else if(strncmp(treatpt, "platform_id=", 12)==0) {
u= 256; /* intentionally too large */ u= 256; /* intentionally too large */
@ -1203,6 +1339,7 @@ interval_text_long:;
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
xorriso->boot_platform_id= u; xorriso->boot_platform_id= u;
is_change= 1;
} else if(strncmp(treatpt, "emul_type=", 10)==0) { } else if(strncmp(treatpt, "emul_type=", 10)==0) {
if(strcmp(treatpt + 10, "none") == 0 || if(strcmp(treatpt + 10, "none") == 0 ||
@ -1223,6 +1360,7 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
is_change= 1;
} else if(strncmp(treatpt, "hfsplus_serial=", 15) == 0) { } else if(strncmp(treatpt, "hfsplus_serial=", 15) == 0) {
ret= Hex_to_bin(treatpt + 15, 8, &bin_count, (unsigned char *) sn, 0); ret= Hex_to_bin(treatpt + 15, 8, &bin_count, (unsigned char *) sn, 0);
@ -1238,6 +1376,7 @@ interval_text_long:;
} else { } else {
memcpy(xorriso->hfsp_serial_number, sn, 8); memcpy(xorriso->hfsp_serial_number, sn, 8);
} }
is_change= 1;
} else if(strncmp(treatpt, "hfsplus_block_size=", 19) == 0) { } else if(strncmp(treatpt, "hfsplus_block_size=", 19) == 0) {
u= 0; u= 0;
@ -1252,6 +1391,7 @@ interval_text_long:;
ret= 0; goto ex; ret= 0; goto ex;
} }
xorriso->hfsp_block_size= u; xorriso->hfsp_block_size= u;
is_change= 1;
} else if(strncmp(treatpt, "apm_block_size=", 15) == 0) { } else if(strncmp(treatpt, "apm_block_size=", 15) == 0) {
u= 0; u= 0;
@ -1266,14 +1406,21 @@ interval_text_long:;
ret= 0; goto ex; ret= 0; goto ex;
} }
xorriso->apm_block_size= u; xorriso->apm_block_size= u;
is_change= 1;
} else if(strncmp(treatpt, "efi_boot_part=", 14) == 0) { } else if(strncmp(treatpt, "efi_boot_part=", 14) == 0) {
if(Sfile_str(xorriso->efi_boot_partition, treatpt + 14, 0) <= 0) if(Sfile_str(xorriso->efi_boot_partition, treatpt + 14, 0) <= 0)
{ret= -1; goto ex;} {ret= -1; goto ex;}
Xorriso_warn_if_not_exist(xorriso, "-boot_image ", treatment,
treatpt + 14, 1);
is_change= 1;
} else if(strncmp(treatpt, "prep_boot_part=", 15) == 0) { } else if(strncmp(treatpt, "prep_boot_part=", 15) == 0) {
if(Sfile_str(xorriso->prep_partition, treatpt + 15, 0) <= 0) if(Sfile_str(xorriso->prep_partition, treatpt + 15, 0) <= 0)
{ret= -1; goto ex;} {ret= -1; goto ex;}
Xorriso_warn_if_not_exist(xorriso, "-boot_image ", treatment,
treatpt + 15, 1);
is_change= 1;
} else if(strncmp(treatpt, "chrp_boot_part=", 15) == 0) { } else if(strncmp(treatpt, "chrp_boot_part=", 15) == 0) {
if(strcmp(treatpt + 15, "on") == 0) { if(strcmp(treatpt + 15, "on") == 0) {
@ -1288,6 +1435,7 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
is_change= 1;
} else if(strncmp(treatpt, "isohybrid=", 10) == 0 && } else if(strncmp(treatpt, "isohybrid=", 10) == 0 &&
strcmp(formpt, "isolinux")==0) { strcmp(formpt, "isolinux")==0) {
@ -1312,6 +1460,7 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
is_change= 1;
#else #else
@ -1335,6 +1484,7 @@ interval_text_long:;
if(strcmp(treatpt + 10, ".") == 0) { if(strcmp(treatpt + 10, ".") == 0) {
ret= Xorriso_set_system_area_path(xorriso, "", 0); ret= Xorriso_set_system_area_path(xorriso, "", 0);
} else { } else {
/* (checks also for existence of the disk file) */
ret= Xorriso_set_system_area_path(xorriso, treatpt + 10, 0); ret= Xorriso_set_system_area_path(xorriso, treatpt + 10, 0);
} }
if(ret <= 0) if(ret <= 0)
@ -1356,10 +1506,42 @@ interval_text_long:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
is_change= 1;
} else } else if(strncmp(treatpt, "gpt_iso_bootable=", 17) == 0) {
if(strcmp(treatpt + 17, "off") == 0) {
xorriso->system_area_options&= ~(1 << 16);
} else if(strcmp(treatpt + 17, "on") == 0) {
xorriso->system_area_options|= (1 << 16);
} else {
sprintf(xorriso->info_text,
"-boot_image %s gpt_iso_bootable=: unknown mode : %s",
formpt, treatpt + 17);
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) {
xorriso->system_area_options&= ~(1 << 17);
} else if(strcmp(treatpt + 15, "on") == 0) {
xorriso->system_area_options|= (1 << 17);
} else {
sprintf(xorriso->info_text,
"-boot_image %s gpt_iso_not_ro=: unknown mode : %s",
formpt, treatpt + 15);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
{ret= 0; goto ex;}
}
is_change= 1;
} else {
was_ok= 0; was_ok= 0;
}
if(is_change)
Xorriso_set_change_pending(xorriso, 1);
if(!was_ok) { if(!was_ok) {
sprintf(xorriso->info_text, "Unrecognized options with -boot_image: %s %s", sprintf(xorriso->info_text, "Unrecognized options with -boot_image: %s %s",
form, treatment); form, treatment);
@ -1760,7 +1942,8 @@ ex:;
int Xorriso_option_check_media(struct XorrisO *xorriso, int Xorriso_option_check_media(struct XorrisO *xorriso,
int argc, char **argv, int *idx, int flag) 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; int end_idx, old_idx, os_errno, to_info= 0;
char quality_name[80], *head_buffer= NULL; char quality_name[80], *head_buffer= NULL;
struct SpotlisT *spotlist= NULL; struct SpotlisT *spotlist= NULL;
@ -1834,7 +2017,7 @@ int Xorriso_option_check_media(struct XorrisO *xorriso,
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
if(ret == 1) { 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, head_buffer, job,
(8 * (job->patch_lba0 == 1)) | (8 * (job->patch_lba0 == 1)) |
4 | (job->patch_lba0_msc1 < 0)); 4 | (job->patch_lba0_msc1 < 0));
@ -1879,9 +2062,10 @@ int Xorriso_option_check_media(struct XorrisO *xorriso,
else if(pass == 1 && !(quality == Xorriso_read_quality_md5_matcH || else if(pass == 1 && !(quality == Xorriso_read_quality_md5_matcH ||
quality == Xorriso_read_quality_md5_mismatcH)) quality == Xorriso_read_quality_md5_mismatcH))
continue; 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", 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)); xorriso->check_media_bad_limit, 0));
if(to_info) { if(to_info) {
strcpy(xorriso->info_text, xorriso->result_line); strcpy(xorriso->info_text, xorriso->result_line);
@ -2184,6 +2368,7 @@ int Xorriso_option_commit(struct XorrisO *xorriso, int flag)
int ret; int ret;
char eternal_problem_status_text_mem[80]; char eternal_problem_status_text_mem[80];
xorriso->commit_attempts++;
if(!Xorriso_change_is_pending(xorriso, 0)) { if(!Xorriso_change_is_pending(xorriso, 0)) {
sprintf(xorriso->info_text, "-commit: No image modifications pending"); sprintf(xorriso->info_text, "-commit: No image modifications pending");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); 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. /* 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. Provided under GPL version 2 or later.
@ -349,10 +349,27 @@ int Xorriso_option_dvd_obs(struct XorrisO *xorriso, char *obs, int flag)
{ {
double num; double num;
if(strcmp(obs, "default") == 0) if(strcmp(obs, "obs_pad") == 0) {
xorriso->do_obs_pad= 1;
return(1);
} else if(strcmp(obs, "no_obs_pad") == 0) {
xorriso->do_obs_pad= 0;
return(1);
} else if(strcmp(obs, "bdr_obs_exempt")== 0) {
xorriso->bdr_obs_exempt= 1;
return(1);
} else if(strcmp(obs, "no_bdr_obs_exempt")== 0) {
xorriso->bdr_obs_exempt= 0;
return(1);
} else if(strcmp(obs, "default") == 0) {
num= 0; num= 0;
else } else if(obs[0] >= '0' && obs[0] <= '9') {
num = Scanf_io_size(obs,0); num = Scanf_io_size(obs,0);
} else {
sprintf(xorriso->info_text, "-dvd_obs : Unrecognized parameter.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
return(0);
}
if(num != 0 && num != 32768 && num != 65536) { if(num != 0 && num != 32768 && num != 65536) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"-dvd_obs : Bad size. Acceptable are 0, 32k, 64k"); "-dvd_obs : Bad size. Acceptable are 0, 32k, 64k");
@ -818,12 +835,14 @@ static int Xorriso_truncate_const_find_name(struct XorrisO *xorriso,
int Xorriso_option_find(struct XorrisO *xorriso, int argc, char **argv, int Xorriso_option_find(struct XorrisO *xorriso, int argc, char **argv,
int *idx, int flag) 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;
int list_extattr_head= 0, bsl_mem, disk_path, name_space; 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; struct FindjoB *job, *first_job= NULL, *new_job;
char *start_path, *path= NULL, *cpt, *other_path_start= NULL, *cd_pt; char *start_path, *path= NULL, *cpt, *other_path_start= NULL, *cd_pt;
char *access_acl_text= NULL, *default_acl_text= NULL, *list_extattr_mode; char *access_acl_text= NULL, *default_acl_text= NULL, *list_extattr_mode;
char *arg1_pt, *namept; char *arg1_pt, *namept, *suffix_pt, *value_pt, size_text[40];
off_t size_value, suffix_factor= 1;
struct stat dir_stbuf; struct stat dir_stbuf;
uid_t user= 0; uid_t user= 0;
@ -901,9 +920,16 @@ not_enough_arguments:;
i+= 2; i+= 2;
/* >>> if letter suffix: use Scanf_io_size */ /* >>> if letter suffix: use Scanf_io_size */
sscanf(argv[i-1], "%d", &start_lba); ret= Sfile_text_to_off_t(argv[i - 1], &start_lba, 0);
sscanf(argv[i], "%d", &count); if(ret <= 0) {
Findjob_set_lba_range(job, start_lba, count, 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) { } else if(strcmp(argv[i], "-pending_data")==0) {
Findjob_set_commit_filter_2(job, 0); Findjob_set_commit_filter_2(job, 0);
} else if(strcmp(argv[i], "-has_acl")==0) { } else if(strcmp(argv[i], "-has_acl")==0) {
@ -1104,6 +1130,59 @@ not_enough_arguments:;
count, 0, 0); count, 0, 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
} else if(strcmp(argv[i], "-size") == 0) {
if(i + 1 >= end_idx)
goto not_enough_arguments;
i++;
if(strlen(argv[i]) >= sizeof(size_text) - 1) {
sprintf(xorriso->info_text,
"-findi: Number text after -size is much too long");
goto sorry_ex;
}
strcpy(size_text, argv[i]);
value_pt= size_text;
prefix_code= 0;
if(*value_pt == 0)
goto size_value_bad;
if(*value_pt == '-') {
prefix_code= -1;
value_pt++;
} else if(*value_pt == '+') {
prefix_code= 1;
value_pt++;
}
if(*value_pt == 0)
goto size_value_bad;
if(*value_pt == '=') {
prefix_code*= 2;
value_pt++;
}
if(*value_pt == 0) {
size_value_bad:;
sprintf(xorriso->info_text,
"-findi: Number text after -size is not suitable");
}
/* Convert "find -size" suffix to Scanf_io_size suffix */
suffix_pt= value_pt + strlen(value_pt) - 1;
if(*suffix_pt == 'b' || *suffix_pt == 'B') {
*suffix_pt= 'd'; /* 512 bytes */
} else if(*suffix_pt == 'c' || *suffix_pt == 'C') {
*suffix_pt= 0; /* 1 byte */
} else if(*suffix_pt == 'w'|| *suffix_pt == 'W') {
*suffix_pt= 0; /* 2 byte */
suffix_factor= 2;
} else if(*suffix_pt >= '0' && *suffix_pt <= '9') {
suffix_pt++;
*suffix_pt= 'd'; /* 512 bytes */
*(suffix_pt + 1)= 0;
}
size_value= (off_t) Scanf_io_size(value_pt, 1) * (off_t) suffix_factor;
if(size_value < 0)
goto size_value_bad;
ret= Findjob_set_size_filter(job, 27, size_value, prefix_code, 0);
if(ret <= 0)
goto ex;
} else if(strcmp(argv[i], "-exec")==0) { } else if(strcmp(argv[i], "-exec")==0) {
if(i+1>=end_idx) { if(i+1>=end_idx) {
not_enough_exec_arguments:; not_enough_exec_arguments:;
@ -1928,7 +2007,7 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" |\"system_area=\"|\"partition_table=on|off\"", " |\"system_area=\"|\"partition_table=on|off\"",
" |\"partition_entry=\"|\"appended_part_as=\"", " |\"partition_entry=\"|\"appended_part_as=\"",
" |\"part_like_isohybrid=\"|\"iso_mbr_part_type=\"", " |\"part_like_isohybrid=\"|\"iso_mbr_part_type=\"",
" |\"gpt_disk_guid=\"", " |\"gpt_disk_guid=\"|\"gpt_iso_bootable\"|\"gpt_iso_not_ro=\"",
" |\"chrp_boot_part=on|off=\"|\"prep_boot_part=\"", " |\"chrp_boot_part=on|off=\"|\"prep_boot_part=\"",
" |\"efi_boot_part=\"|\"efi_boot_part=--efi-boot-image\"", " |\"efi_boot_part=\"|\"efi_boot_part=--efi-boot-image\"",
" |\"mips_path=\"|\"mipsel_path=\"|\"mips_discard\"", " |\"mips_path=\"|\"mipsel_path=\"|\"mips_discard\"",
@ -1971,6 +2050,10 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" -toc_of \"in\"|\"out\"|\"all\"[\":short\"]", " -toc_of \"in\"|\"out\"|\"all\"[\":short\"]",
" Show -toc of either input drive or output drive or both.", " Show -toc of either input drive or output drive or both.",
"", "",
" -assess_indev_features \"plain\"|\"cmd\"|\"as_mkisofs\"|\"replay\"",
" Inspect the filesystem on -indev for features like ISO level,",
" Rock Ridge, or file name relaxations.",
"",
" -mount_cmd drive entity id path", " -mount_cmd drive entity id path",
" Print to result channel a command suitable to mount the", " Print to result channel a command suitable to mount the",
" depicted entity (see -load) at the given directory path.", " depicted entity (see -load) at the given directory path.",
@ -2123,7 +2206,7 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" -lba_range start count, -damaged, -has_acl, -has_xattr,", " -lba_range start count, -damaged, -has_acl, -has_xattr,",
" -has_aaip, -has_filter, -has_md5, -has_any_xattr,", " -has_aaip, -has_filter, -has_md5, -has_any_xattr,",
" -has_hfs_crtp, -has_hfs_bless, -bad_outname,", " -has_hfs_crtp, -has_hfs_bless, -bad_outname,",
" -name_limit_blocker, -maxdepth, -mindepth,", " -name_limit_blocker, -maxdepth, -mindepth, -size,",
" -prune, -decision yes|no, -true, -false", " -prune, -decision yes|no, -true, -false",
" Operators: -not, -or, -and, -sub, (, -subend, ),", " Operators: -not, -or, -and, -sub, (, -subend, ),",
" -if, -then, -elseif, -else, -endif", " -if, -then, -elseif, -else, -endif",
@ -2241,8 +2324,9 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" [:\"min_usec=\"number][:\"max_usec\"=number]", " [:\"min_usec=\"number][:\"max_usec\"=number]",
" [:\"timeout_sec=\"number]", " [:\"timeout_sec=\"number]",
" Keep drive buffer hungry to ease concurrent burn run.", " Keep drive buffer hungry to ease concurrent burn run.",
" -dvd_obs \"default\"|\"32k\"|\"64k\"", " -dvd_obs \"default\"|\"32k\"|\"64k\"|\"obs_pad\"|\"bdr_obs_exempt\"",
" Set number of bytes per DVD/BD write operation.", " Set number of bytes per DVD/BD write operation or control",
" end alignment padding with DAO DVD-R[W] or BD-R.",
" -use_immed_bit \"on\"|\"off\"|\"default\"", " -use_immed_bit \"on\"|\"off\"|\"default\"",
" Control whether long running SCSI commands shall run", " Control whether long running SCSI commands shall run",
" asynchronously with progress messages.", " asynchronously with progress messages.",

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. Provided under GPL version 2 or later.
@ -143,7 +143,7 @@ int Xorriso_option_paste_in(struct XorrisO *xorriso, char *iso_rr_path,
} }
bytecount= num; bytecount= num;
sprintf(xorriso->info_text, "-paste_in from %s to %s, byte %.f to %.f", sprintf(xorriso->info_text, "-paste_in from %s to %s, byte %.f to %.f",
disk_path, iso_rr_path, iso_rr_path, disk_path,
(double) startbyte, (double) (startbyte+bytecount)); (double) startbyte, (double) (startbyte+bytecount));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
@ -305,9 +305,9 @@ int Xorriso_option_print(struct XorrisO *xorriso, char *text, int flag)
maxl= sizeof(xorriso->mark_text); maxl= sizeof(xorriso->mark_text);
else else
maxl= sizeof(xorriso->result_line); maxl= sizeof(xorriso->result_line);
if(l >= maxl) { if(l > maxl - 2) {
sprintf(xorriso->info_text, "Output text too long for -print%s(%d > %d)", sprintf(xorriso->info_text, "Output text too long for -print%s(%d > %d)",
mode == 1 ? "_info" : mode == 2 ? "_mark" : "", l, maxl); mode == 1 ? "_info" : mode == 2 ? "_mark" : "", l, maxl - 2);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
return(0); return(0);
} }
@ -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 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)) { if(!Xorriso_change_is_pending(xorriso, 0)) {
sprintf(xorriso->info_text,"-print_size: No image modifications pending"); sprintf(xorriso->info_text,"-print_size: No image modifications pending");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); 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); return(0);
} }
if(flag&1) { if(flag&1) {
sprintf(xorriso->result_line,"%d\n", ret); sprintf(xorriso->result_line,"%.f\n", (double) ret);
if(xorriso->packet_output) { if(xorriso->packet_output) {
Xorriso_result(xorriso,0); Xorriso_result(xorriso,0);
} else { } else {
@ -363,7 +365,7 @@ int Xorriso_option_print_size(struct XorrisO *xorriso, int flag)
fsync(fd); fsync(fd);
} }
} else { } else {
sprintf(xorriso->result_line,"Image size : %ds\n", ret); sprintf(xorriso->result_line,"Image size : %.fs\n", (double) ret);
Xorriso_result(xorriso,0); Xorriso_result(xorriso,0);
} }
return(1); return(1);
@ -1622,7 +1624,8 @@ int Xorriso_option_system_id(struct XorrisO *xorriso, char *name, int flag)
/* Option -tell_media_space */ /* Option -tell_media_space */
int Xorriso_option_tell_media_space(struct XorrisO *xorriso, int flag) 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); ret= Xorriso_tell_media_space(xorriso, &media_space, &free_space, 0);
if(ret<=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"); "Pending image size larger than free space on medium");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); 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); 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); Xorriso_result(xorriso, 0);
return(1); return(1);
} }
@ -2029,7 +2032,7 @@ int Xorriso_option_version(struct XorrisO *xorriso, int flag)
sprintf(xorriso->result_line, sprintf(xorriso->result_line,
"ISO 9660 Rock Ridge filesystem manipulator and CD/DVD/BD burn program\n"); "ISO 9660 Rock Ridge filesystem manipulator and CD/DVD/BD burn program\n");
sprintf(xorriso->result_line+strlen(xorriso->result_line), sprintf(xorriso->result_line+strlen(xorriso->result_line),
"Copyright (C) 2019, Thomas Schmitt <scdbackup@gmx.net>, libburnia project.\n"); "Copyright (C) 2023, Thomas Schmitt <scdbackup@gmx.net>, libburnia project.\n");
Xorriso_result(xorriso, 0); Xorriso_result(xorriso, 0);
sprintf(xorriso->result_line, sprintf(xorriso->result_line,
"xorriso version : %d.%d.%d%s\n", "xorriso version : %d.%d.%d%s\n",
@ -2083,6 +2086,8 @@ int Xorriso_option_version(struct XorrisO *xorriso, int flag)
int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag) int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag)
{ {
int warn_shell= 0, warn_ecma= 0, i, ret; int warn_shell= 0, warn_ecma= 0, i, ret;
char *result= NULL;
size_t result_len= 0;
static char shell_chars[]= { static char shell_chars[]= {
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-+=:.,~@"}; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-+=:.,~@"};
static char ecma_chars[]= {"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"}; static char ecma_chars[]= {"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"};
@ -2104,9 +2109,20 @@ int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag)
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
} }
if(xorriso->do_joliet && strlen(volid)>16 && !(flag & 1)) { if(xorriso->do_joliet && strlen(volid)>16 && !(flag & 1)) {
sprintf(xorriso->info_text, ret= Xorriso_conv_name_chars(xorriso, volid, &result, &result_len, 2, 0);
"-volid text is too long for Joliet (%d > 16)",(int) strlen(volid)); if(result != NULL)
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); free(result); /* just want the result_len */
xorriso->info_text[0]= 0;
if(ret <= 0) {
sprintf(xorriso->info_text,
"Cannot determine length of -volid text in Joliet character set");
} else if(result_len > 32) {
sprintf(xorriso->info_text,
"-volid text is too long for Joliet (%d > 16)",
(int) (result_len + 1) / 2);
}
if(xorriso->info_text[0])
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
} }
if(warn_ecma && !(flag & 1)) { if(warn_ecma && !(flag & 1)) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2020 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2022 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
@ -535,7 +535,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
}; };
static char arg1_commands[][40]= { static char arg1_commands[][40]= {
"abort_on","acl","add_plainly","application_id","application_use", "abort_on","acl","add_plainly","application_id","application_use",
"auto_charset","abstract_file", "auto_charset","abstract_file","assess_indev_features",
"backslash_codes","blank","biblio_file", "backslash_codes","blank","biblio_file",
"calm_drive","cd","cdi","cdx","changes_pending","charset", "calm_drive","cd","cdi","cdx","changes_pending","charset",
"close","close_damaged", "close","close_damaged",
@ -556,7 +556,8 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
"read_fs","read_speed","reassure","report_about", "read_fs","read_speed","reassure","report_about",
"report_el_torito","report_system_area","rockridge", "report_el_torito","report_system_area","rockridge",
"rom_toc_scan","rr_reloc_dir","scsi_dev_family","scsi_log", "rom_toc_scan","rr_reloc_dir","scsi_dev_family","scsi_log",
"session_log","sh_style_result","signal_handling","sleep", "session_log","setfattr_list","setfattr_listi",
"sh_style_result","signal_handling","sleep",
"speed","split_size","status","status_history_max", "speed","split_size","status","status_history_max",
"stdio_sync","stream_recording","system_id","temp_mem_limit","toc_of", "stdio_sync","stream_recording","system_id","temp_mem_limit","toc_of",
"uid","unregister_filter","use_immed_bit","use_readline", "uid","unregister_filter","use_immed_bit","use_readline",
@ -598,7 +599,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
"update_l","update_li","update_lx","update_lxi", "update_l","update_li","update_lx","update_lxi",
"setfacl","setfacli","setfacl_list","setfacl_listi", "setfacl","setfacli","setfacl_list","setfacl_listi",
"setfacl_r","setfacl_ri","setfattr","setfattri", "setfacl_r","setfacl_ri","setfattr","setfattri",
"setfattr_list","setfattr_listi","setfattr_r","setfattr_ri", "setfattr_r","setfattr_ri",
"set_filter","set_filter_r","show_stream","show_stream_r", "set_filter","set_filter_r","show_stream","show_stream_r",
"" ""
}; };
@ -710,6 +711,7 @@ int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso,
"* Drive and media related inquiry actions (2):", "* Drive and media related inquiry actions (2):",
"list_profiles", "list_formats", "list_speeds", "list_profiles", "list_formats", "list_speeds",
"toc", "toc_of", "pvd_info", "report_system_area", "report_el_torito", "toc", "toc_of", "pvd_info", "report_system_area", "report_el_torito",
"assess_indev_features",
"* Settings for file insertion:", "* Settings for file insertion:",
"file_name_limit", "file_size_limit", "file_name_limit", "file_size_limit",
@ -981,12 +983,14 @@ next_command:;
if((*idx)>=argc) if((*idx)>=argc)
{ret= 1; goto ex;} {ret= 1; goto ex;}
} }
xorriso->current_interpreter= 0;
if((xorriso->arrange_args || (flag & 8)) && !(flag & (4 | 16))) { if((xorriso->arrange_args || (flag & 8)) && !(flag & (4 | 16))) {
ret= Xorriso_exec_args_sorted(xorriso, argc, argv, idx, 0); ret= Xorriso_exec_args_sorted(xorriso, argc, argv, idx, 0);
goto ex; goto ex;
} }
} }
xorriso->current_interpreter= 0;
ret= Xorriso_count_args(xorriso, argc - *idx, argv + *idx, &arg_count, 1); ret= Xorriso_count_args(xorriso, argc - *idx, argv + *idx, &arg_count, 1);
if((ret == 1 || ret == 2) && if((ret == 1 || ret == 2) &&
strcmp(argv[*idx], xorriso->list_delimiter) != 0) { strcmp(argv[*idx], xorriso->list_delimiter) != 0) {
@ -1082,6 +1086,10 @@ next_command:;
(*idx)+= 2; (*idx)+= 2;
ret= Xorriso_option_assert_volid(xorriso, arg1, arg2, 0); ret= Xorriso_option_assert_volid(xorriso, arg1, arg2, 0);
} else if(strcmp(cmd,"assess_indev_features")==0) {
(*idx)++;
ret= Xorriso_option_assess_indev_features(xorriso, arg1, 0);
} else if(strcmp(cmd,"auto_charset")==0) { } else if(strcmp(cmd,"auto_charset")==0) {
(*idx)++; (*idx)++;
ret= Xorriso_option_auto_charset(xorriso, arg1, 0); ret= Xorriso_option_auto_charset(xorriso, arg1, 0);
@ -2321,7 +2329,7 @@ int Xorriso_prescan_args(struct XorrisO *xorriso, int argc, char **argv,
ret= Xorriso_option_no_rc(xorriso, 0); ret= Xorriso_option_no_rc(xorriso, 0);
if(ret<=0) if(ret<=0)
error_seen= 1; error_seen= 1;
{ret= 1; goto ex;}
} else if(xorriso->argument_emulation == 1) { /* mkisofs emulation */ } else if(xorriso->argument_emulation == 1) { /* mkisofs emulation */
if(xorriso->dev_fd_1 < 0) if(xorriso->dev_fd_1 < 0)
goto protect_stdout; goto protect_stdout;
@ -3126,28 +3134,43 @@ int Xorriso_pipe_open(struct XorrisO *xorriso, char *purpose, char *cmd,
/* @param flag bit0= path is a command parameter /* @param flag bit0= path is a command parameter
bit1= prepend xorriso->wdx if path is relative
bit2= do not issue note about excluded parameter
*/ */
int Xorriso_path_is_excluded(struct XorrisO *xorriso, char *path, int flag) int Xorriso_path_is_excluded(struct XorrisO *xorriso, char *path, int flag)
{ {
int ret; int ret;
char *path_pt, *local_path_mem= NULL;
if(!(xorriso->disk_excl_mode&1)) /* exclusion is off */ if(!(xorriso->disk_excl_mode&1)) /* exclusion is off */
return(0); {ret= 0; goto ex;}
if((flag&1) && !(xorriso->disk_excl_mode&2)) /* params are exempted */ if((flag&1) && !(xorriso->disk_excl_mode&2)) /* params are exempted */
return(0); {ret= 0; goto ex;}
ret= Exclusions_match(xorriso->disk_exclusions, path,
path_pt= path;
if((flag & 2) && path[0] != '/' && path[0] != 0) {
Xorriso_alloc_meM(local_path_mem, char,
strlen(xorriso->wdx) + 1 + strlen(path) + 1);
strcpy(local_path_mem, xorriso->wdx);
strcat(local_path_mem, "/");
strcat(local_path_mem, path);
path_pt= local_path_mem;
}
ret= Exclusions_match(xorriso->disk_exclusions, path_pt,
!!(xorriso->disk_excl_mode&4)); !!(xorriso->disk_excl_mode&4));
if(ret<0) { if(ret<0) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"Error during disk file exclusion decision"); "Error during disk file exclusion decision");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
} }
if(ret>0 && (flag&1)) { if(ret > 0 && (flag & 1) && !(flag & 4)) {
sprintf(xorriso->info_text, "Disk path parameter excluded by %s : ", sprintf(xorriso->info_text, "Disk path parameter excluded by %s : ",
(ret==1 ? "-not_paths" : "-not_leaf")); (ret==1 ? "-not_paths" : "-not_leaf"));
Text_shellsafe(path, xorriso->info_text, 1); Text_shellsafe(path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
} }
ex:;
Xorriso_free_meM(local_path_mem);
return(ret); return(ret);
} }

View File

@ -2,7 +2,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. Provided under GPL version 2 or later.
@ -41,6 +41,7 @@
#include "iso_manip.h" #include "iso_manip.h"
#include "read_run.h" #include "read_run.h"
#include "sort_cmp.h" #include "sort_cmp.h"
#include "disk_ops.h"
int Xorriso__read_pacifier(IsoImage *image, IsoFileSource *filesource) int Xorriso__read_pacifier(IsoImage *image, IsoFileSource *filesource)
@ -199,7 +200,7 @@ int Xorriso_restore_is_identical(struct XorrisO *xorriso, void *in_node,
IsoImage *volume; IsoImage *volume;
IsoNode *node; IsoNode *node;
struct stat stbuf; struct stat stbuf;
int dummy; off_t dummy;
memset(type_text, 0, 5); memset(type_text, 0, 5);
if(!Xorriso_change_is_pending(xorriso, 0)) if(!Xorriso_change_is_pending(xorriso, 0))
@ -824,7 +825,7 @@ int Xorriso_tree_restore_node(struct XorrisO *xorriso, IsoNode *node,
int ret= 0, write_fd= -1, wanted, wret, open_flags, l_errno= 0; int ret= 0, write_fd= -1, wanted, wret, open_flags, l_errno= 0;
int target_deleted= 0, buf_size= 32 * 1024; int target_deleted= 0, buf_size= 32 * 1024;
char *what= "[unknown filetype]"; char *what= "[unknown filetype]";
char *buf= NULL, type_text[5], *temp_path= NULL, *buf_pt; char *buf= NULL, type_text[5], *temp_path= NULL, *buf_pt, *reason;
char *link_target, *open_path_pt= NULL; char *link_target, *open_path_pt= NULL;
off_t todo= 0, size, seek_ret, last_p_count= 0, already_done, read_count= 0; off_t todo= 0, size, seek_ret, last_p_count= 0, already_done, read_count= 0;
void *data_stream= NULL; void *data_stream= NULL;
@ -836,7 +837,7 @@ int Xorriso_tree_restore_node(struct XorrisO *xorriso, IsoNode *node,
IsoBoot *bootcat; IsoBoot *bootcat;
uint32_t lba; uint32_t lba;
char *catcontent = NULL; char *catcontent = NULL;
off_t catsize; off_t catsize, iso_node_size, wanted_size, cap;
char disk_md5[16], iso_md5[16]; char disk_md5[16], iso_md5[16];
void *ctx= NULL; void *ctx= NULL;
int use_md5= 0, i, sparse_ret= 3; int use_md5= 0, i, sparse_ret= 3;
@ -886,13 +887,30 @@ int Xorriso_tree_restore_node(struct XorrisO *xorriso, IsoNode *node,
if(ret == -1 && errno == EACCES && (flag & 128)) if(ret == -1 && errno == EACCES && (flag & 128))
{ret= 4; goto ex;} {ret= 4; goto ex;}
if(flag&2) { if(flag&2) {
if(ret!=-1 && !S_ISREG(stbuf.st_mode)) { if(ret != -1) {
sprintf(xorriso->info_text, wanted_size= disk_offset + bytes;
"Restore offset demanded. But filesystem path leads to non-data file "); iso_node_size= iso_file_get_size((IsoFile *) node);
Text_shellsafe(disk_path, xorriso->info_text, 1); if(wanted_size > disk_offset + iso_node_size)
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE",0); wanted_size= disk_offset + iso_node_size;
l_errno= 0; cap= wanted_size;
goto cannot_restore; ret= Xorriso_determine_capacity(xorriso, open_path_pt, &cap, &reason,
3);
if(ret <= 0 || (cap <= 0 && !S_ISREG(stbuf.st_mode))) {
if(ret > 0)
reason= "has addressable range 0";
sprintf(xorriso->info_text,
"Restore offset demanded. But target file (%s) ",
Ftypetxt(stbuf.st_mode, 0));
Text_shellsafe(disk_path, xorriso->info_text, 1);
strcat(xorriso->info_text, reason);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE",0); l_errno= 0;
goto cannot_restore;
}
if(cap < wanted_size && !S_ISREG(stbuf.st_mode)) {
/* >>> non-regular file might be too small to take the interval */;
}
} }
} else { } else {
/* If source and target are the same disk file then do not copy content */ /* If source and target are the same disk file then do not copy content */
@ -1378,6 +1396,7 @@ int Xorriso_register_node_target(struct XorrisO *xorriso, int node_idx,
bit6= this is a copy action: do not fake times and ownership bit6= this is a copy action: do not fake times and ownership
bit7= return 4 if restore fails from denied permission bit7= return 4 if restore fails from denied permission
do not issue error message do not issue error message
bit10= do not restore properties
@return <=0 = error , 1 = added leaf file object , 2 = added directory , @return <=0 = error , 1 = added leaf file object , 2 = added directory ,
3= regularly not installed (disallowed device, UNIX domain socket) 3= regularly not installed (disallowed device, UNIX domain socket)
4 = with bit7: permission to restore was denied 4 = with bit7: permission to restore was denied
@ -1388,7 +1407,7 @@ int Xorriso_restore_disk_object(struct XorrisO *xorriso,
off_t offset, off_t bytes, int flag) off_t offset, off_t bytes, int flag)
{ {
int ret, i, split_count= 0, partno, total_parts, leaf_is_split= 0; int ret, i, split_count= 0, partno, total_parts, leaf_is_split= 0;
int record_hl_path= 0, node_idx, cannot_register= 0; int record_hl_path= 0, node_idx, cannot_register= 0, no_props;
off_t total_bytes; off_t total_bytes;
char *part_name, *part_path= NULL, *img_path_pt= NULL; char *part_name, *part_path= NULL, *img_path_pt= NULL;
IsoImage *volume; IsoImage *volume;
@ -1398,6 +1417,8 @@ int Xorriso_restore_disk_object(struct XorrisO *xorriso,
Xorriso_alloc_meM(part_path, char, SfileadrL); Xorriso_alloc_meM(part_path, char, SfileadrL);
no_props= !!(flag & 1024);
ret= Xorriso_get_volume(xorriso, &volume, 0); ret= Xorriso_get_volume(xorriso, &volume, 0);
if(ret<=0) if(ret<=0)
goto ex; goto ex;
@ -1432,7 +1453,7 @@ int Xorriso_restore_disk_object(struct XorrisO *xorriso,
if(ret == 4) if(ret == 4)
goto ex; goto ex;
} }
if(first_part_node!=NULL) if(first_part_node != NULL && !no_props)
Xorriso_restore_properties(xorriso, disk_path, first_part_node, Xorriso_restore_properties(xorriso, disk_path, first_part_node,
!!(flag&64)); !!(flag&64));
goto went_well; goto went_well;
@ -1474,10 +1495,11 @@ int Xorriso_restore_disk_object(struct XorrisO *xorriso,
ret= Xorriso_tree_restore_node(xorriso, node, img_path_pt, (off_t) 0, ret= Xorriso_tree_restore_node(xorriso, node, img_path_pt, (off_t) 0,
disk_path, offset, bytes, disk_path, offset, bytes,
(flag&(4 | 8 | 128)) | (!!(flag&64)) | ((flag&1)<<1) | ( 16 * !(flag&2))); (flag&(4 | 8 | 128)) | (!!(flag&64)) | ((flag&1)<<1) | ( 16 * !(flag&2))
| (no_props << 3));
if(ret == 4) if(ret == 4)
goto ex; goto ex;
if(ret>0 && (flag&8)) if(ret > 0 && (flag & 8) && !no_props)
ret= Xorriso_restore_properties(xorriso, disk_path, node, 2 | !!(flag&64)); ret= Xorriso_restore_properties(xorriso, disk_path, node, 2 | !!(flag&64));
if(ret<=0) { if(ret<=0) {
restoring_failed:; restoring_failed:;
@ -1591,7 +1613,6 @@ ex:;
/* @param flag bit0= recursion is active /* @param flag bit0= recursion is active
bit1= do not report restored files bit1= do not report restored files
bit6= this is a copy action: do not fake times and ownership bit6= this is a copy action: do not fake times and ownership
bit8= only register non-directory nodes in xorriso->node_array
bit7+8= bit7+8=
0= direct operation 0= direct operation
1= create only directories, 1= create only directories,
@ -1731,9 +1752,14 @@ much_too_long:;
{ret= 0; goto was_problem;} {ret= 0; goto was_problem;}
if(Xorriso_much_too_long(xorriso, len_ip + strlen(leaf_name)+1, 0)<=0) if(Xorriso_much_too_long(xorriso, len_ip + strlen(leaf_name)+1, 0)<=0)
{ret= 0; goto was_problem;} {ret= 0; goto was_problem;}
/* name is a pointer into img_path */ /* name and disk_name are pointers into img_path and disk_path */
strcpy(name, leaf_name); strcpy(name, leaf_name);
strcpy(disk_name, leaf_name); strcpy(disk_name, leaf_name);
ret= Xorriso_path_is_excluded(xorriso, disk_path, 2);
if(ret < 0)
goto was_problem;
if(ret > 0)
continue;
stbuf_src= srcpt; stbuf_src= srcpt;
ret= Xorriso_fake_stbuf(xorriso, img_path, &stbuf, &node, 1); ret= Xorriso_fake_stbuf(xorriso, img_path, &stbuf, &node, 1);
@ -1811,6 +1837,8 @@ much_too_long:;
} else { } else {
ret= Xorriso_restore_disk_object(xorriso, img_path, node, disk_path, ret= Xorriso_restore_disk_object(xorriso, img_path, node, disk_path,
(off_t) 0, (off_t) 0, hflag); (off_t) 0, (off_t) 0, hflag);
if(ret == 3) /* intentionally not restored */
do_not_dive= 1;
} }
if(ret<=0) if(ret<=0)
goto was_problem; goto was_problem;
@ -1885,6 +1913,7 @@ ex:
3= count nodes in xorriso->node_counter, 3= count nodes in xorriso->node_counter,
create no directory create no directory
bit9= with operation mode 1 do net register prefixes bit9= with operation mode 1 do net register prefixes
bit10= with bit3: do not restore properties to leaf file
@return <=0 = error , 1 = added leaf file object , 2 = added directory , @return <=0 = error , 1 = added leaf file object , 2 = added directory ,
3 = rejected 3 = rejected
*/ */
@ -1897,7 +1926,7 @@ int Xorriso_restore(struct XorrisO *xorriso,
IsoNode *node= NULL; IsoNode *node= NULL;
int done= 0, is_dir= 0, ret, source_is_dir, stbuf_ret, hret; int done= 0, is_dir= 0, ret, source_is_dir, stbuf_ret, hret;
int dir_create= 0, node_count= 0, node_register= 0, path_size; int dir_create= 0, node_count= 0, node_register= 0, path_size;
int leaf_is_split= 0, source_is_split= 0, new_dir_made= 0; int leaf_is_split= 0, source_is_split= 0, new_dir_made= 0, no_props;
struct stat stbuf; struct stat stbuf;
struct PermiteM *perm_stack_mem; struct PermiteM *perm_stack_mem;
@ -1911,6 +1940,7 @@ int Xorriso_restore(struct XorrisO *xorriso,
break; case 2: node_register= 1; break; case 2: node_register= 1;
break; case 3: node_count= 1; break; case 3: node_count= 1;
} }
no_props= (!!(flag & 8)) * (flag & 1024);
if(dir_create && !(flag & (1 << 9))) { if(dir_create && !(flag & (1 << 9))) {
ret= Xorriso_lst_append_binary(&(xorriso->node_disk_prefixes), ret= Xorriso_lst_append_binary(&(xorriso->node_disk_prefixes),
@ -1923,11 +1953,18 @@ int Xorriso_restore(struct XorrisO *xorriso,
goto ex; goto ex;
} }
ret= Xorriso_path_is_excluded(xorriso, disk_path, !(flag&4)); ret= Xorriso_path_is_excluded(xorriso, disk_path, 4 | 2 | !(flag & 4));
if(ret<0) if(ret < 0)
goto ex; {ret= 0; goto ex;}
if(ret>0) if(ret > 0) {
if(!(flag & 4)) {
strcpy(xorriso->info_text,
"Excluded from restoring by -not_path or -not_leaf :");
Text_shellsafe(disk_path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
}
{ret= 3*!!(flag&16); goto ex;} {ret= 3*!!(flag&16); goto ex;}
}
ret= Xorriso_get_volume(xorriso, &volume, 0); ret= Xorriso_get_volume(xorriso, &volume, 0);
if(ret<=0) if(ret<=0)
@ -1992,7 +2029,7 @@ int Xorriso_restore(struct XorrisO *xorriso,
if((flag&8) && done) { if((flag&8) && done) {
/* ??? move down from Xorriso_paste_in() : /* ??? move down from Xorriso_paste_in() :
check whether target does not exist or both are regular */; check whether target does not exist or both are suitable */;
} else if(source_is_dir || !(dir_create || node_count || node_register)) { } else if(source_is_dir || !(dir_create || node_count || node_register)) {
ret= Xorriso_handle_collision(xorriso, node, img_path, path, disk_path, ret= Xorriso_handle_collision(xorriso, node, img_path, path, disk_path,
@ -2065,7 +2102,7 @@ attach_source:;
} }
} else { } else {
ret= Xorriso_restore_disk_object(xorriso, img_path, node, path, ret= Xorriso_restore_disk_object(xorriso, img_path, node, path,
offset, bytes, (flag & (2|4|64)) | !!(flag&8)); offset, bytes, (flag & (2|4|64)) | no_props | !!(flag&8));
if(ret <= 0) { if(ret <= 0) {
hret= Xorriso_eval_problem_status(xorriso, ret, 1 | 2); hret= Xorriso_eval_problem_status(xorriso, ret, 1 | 2);
if(hret < 0) if(hret < 0)
@ -2126,7 +2163,11 @@ int Xorriso_restore_node_array(struct XorrisO *xorriso, int flag)
img_path, disk_path, hflag); img_path, disk_path, hflag);
if(ret<=0) if(ret<=0)
goto was_problem; goto was_problem;
/* (Exclusion must already be handled when the node array gets filled,
because of no distinction between parameter and tree passenger here.)
*/
ret= Xorriso_handle_collision(xorriso, node, img_path, disk_path, disk_path, ret= Xorriso_handle_collision(xorriso, node, img_path, disk_path, disk_path,
&stbuf_ret, 64); &stbuf_ret, 64);
if(ret<=0 || ret==3) if(ret<=0 || ret==3)
@ -2201,9 +2242,10 @@ ex:;
int Xorriso_paste_in(struct XorrisO *xorriso, char *disk_path, int Xorriso_paste_in(struct XorrisO *xorriso, char *disk_path,
off_t startbyte, off_t bytecount, char *iso_rr_path, int flag) off_t startbyte, off_t bytecount, char *iso_rr_path, int flag)
{ {
int ret; int ret, no_props= 0;
char *eff_source= NULL, *eff_dest= NULL; off_t wanted_size, cap;
struct stat stbuf; char *eff_source= NULL, *eff_dest= NULL, *reason;
struct stat stbuf, disk_stbuf;
IsoNode *node; IsoNode *node;
Xorriso_alloc_meM(eff_source, char, SfileadrL); Xorriso_alloc_meM(eff_source, char, SfileadrL);
@ -2213,18 +2255,15 @@ int Xorriso_paste_in(struct XorrisO *xorriso, char *disk_path,
2|4); 2|4);
if(ret<=0) if(ret<=0)
goto ex; goto ex;
ret= Xorriso_path_is_excluded(xorriso, disk_path, !(flag&1)); ret= Xorriso_path_is_excluded(xorriso, disk_path, 4 | 2 | !(flag & 1));
if(ret > 0 && !(flag & 1)) {
strcpy(xorriso->info_text,
"Excluded from restoring by -not_path or -not_leaf :");
Text_shellsafe(disk_path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
}
if(ret!=0) if(ret!=0)
{ret= 0; goto ex;} {ret= 0; goto ex;}
ret= stat(eff_dest, &stbuf);
if(ret!=-1 && !S_ISREG(stbuf.st_mode)) {
Xorriso_msgs_submit(xorriso, 0, eff_dest, 0, "ERRFILE", 0);
sprintf(xorriso->info_text, "-paste_in: DISK file ");
Text_shellsafe(eff_source, xorriso->info_text, 1);
strcat(xorriso->info_text, " exists and is not a data file");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE", 0);
{ret= 0; goto ex;}
}
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, iso_rr_path, ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, iso_rr_path,
eff_source, 2); eff_source, 2);
@ -2242,9 +2281,37 @@ int Xorriso_paste_in(struct XorrisO *xorriso, char *disk_path,
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
/* >>> eventually obtain parameters from file name */; /* >>> ??? flag bit to obtain startbyte and bytecount from file name */;
ret= Xorriso_restore(xorriso, eff_source, eff_dest, startbyte, bytecount, 8); ret= lstat(eff_dest, &disk_stbuf);
if(ret != -1) {
no_props= 1 << 10;
wanted_size= startbyte + bytecount;
if(wanted_size > stbuf.st_size)
wanted_size= stbuf.st_size;
cap= wanted_size;
ret= Xorriso_determine_capacity(xorriso, eff_dest, &cap, &reason, 3);
if(ret <= 0 || (cap <= 0 && !S_ISREG(disk_stbuf.st_mode))) {
Xorriso_msgs_submit(xorriso, 0, eff_dest, 0, "ERRFILE", 0);
if(ret > 0)
reason= "has addressable range 0";
sprintf(xorriso->info_text, "-paste_in: DISK file (%s) ",
Ftypetxt(disk_stbuf.st_mode, 0));
Text_shellsafe(eff_dest, xorriso->info_text, 1);
sprintf(xorriso->info_text + strlen(xorriso->info_text),
" exists but %s", reason);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
if(cap < wanted_size && !S_ISREG(disk_stbuf.st_mode)) {
/* >>> non-regular file might be too small to take the interval */;
}
}
ret= Xorriso_restore(xorriso, eff_source, eff_dest, startbyte, bytecount,
8 | no_props);
ex:; ex:;
Xorriso_free_meM(eff_source); Xorriso_free_meM(eff_source);
Xorriso_free_meM(eff_dest); Xorriso_free_meM(eff_dest);
@ -2279,13 +2346,16 @@ int Xorriso_extract_cut(struct XorrisO *xorriso,
disk_path, eff_disk_path, 2 | 4); disk_path, eff_disk_path, 2 | 4);
if(ret<=0) if(ret<=0)
goto ex; goto ex;
Xorriso_pacifier_reset(xorriso, 0); ret= Xorriso_path_is_excluded(xorriso, eff_disk_path, 1 | 2 | 4);
mem_lut= xorriso->last_update_time; if(ret < 0)
goto ex;
ret= Xorriso_handle_collision(xorriso, node, img_path, eff_disk_path, if(ret > 0) {
disk_path, &stbuf_ret, 0); strcpy(xorriso->info_text,
if(ret<=0 || ret==3) "Excluded from restoring by -not_path or -not_leaf :");
Text_shellsafe(eff_disk_path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
{ret= 0; goto ex;} {ret= 0; goto ex;}
}
/* If it is a non-filtered stream from the ISO image /* If it is a non-filtered stream from the ISO image
and img_offset is a multiple of 2048 and img_offset is a multiple of 2048
@ -2299,6 +2369,13 @@ int Xorriso_extract_cut(struct XorrisO *xorriso,
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
ret= Xorriso_handle_collision(xorriso, node, img_path, eff_disk_path,
disk_path, &stbuf_ret, 0);
if(ret<=0 || ret==3)
{ret= 0; goto ex;}
Xorriso_pacifier_reset(xorriso, 0);
mem_lut= xorriso->last_update_time;
read_raw= 0; read_raw= 0;
if((img_offset % 2048) == 0) { if((img_offset % 2048) == 0) {
ret= Xorriso_is_plain_image_file(xorriso, node, "", 0); ret= Xorriso_is_plain_image_file(xorriso, node, "", 0);
@ -2340,10 +2417,11 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
off_t img_offset, off_t disk_offset, off_t img_offset, off_t disk_offset,
off_t bytes, int flag) off_t bytes, int flag)
{ {
int ret, i, lba_count= 0, *start_lbas= NULL, *end_lbas= NULL, read_chunk= 16; int ret, i, lba_count= 0, read_chunk= 16;
int lba, count, blocks, quality, spot, bad_extract= 0; int quality, bad_extract= 0;
off_t lba, count, blocks, spot, *start_lbas= NULL, *end_lbas= NULL;
int data_to_skip= 0; 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 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 new_file_base_bytes, upto_file_bytes, start_byte= 0;
off_t *section_sizes = NULL; off_t *section_sizes = NULL;
@ -2355,16 +2433,16 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
if(flag & 1) { if(flag & 1) {
lba_count= 1; lba_count= 1;
Xorriso_alloc_meM(start_lbas, int, 1); Xorriso_alloc_meM(start_lbas, off_t, 1);
Xorriso_alloc_meM(end_lbas, int, 1); Xorriso_alloc_meM(end_lbas, off_t, 1);
Xorriso_alloc_meM(section_sizes, off_t, 1); Xorriso_alloc_meM(section_sizes, off_t, 1);
start_lbas[0]= 0; start_lbas[0]= 0;
ret= Xorriso_obtain_indev_readsize(xorriso, &indev_blocks, 0); ret= Xorriso_obtain_indev_readsize(xorriso, &indev_blocks, 0);
if(ret > 0) if(ret > 0)
end_lbas[0]= indev_blocks - 1; end_lbas[0]= indev_blocks - 1;
else else
end_lbas[0]= 0x7ffffffe; end_lbas[0]= 0x7ffffffffffffffe;
size= ((off_t) end_lbas[0]) * 2048; size= end_lbas[0] * (off_t) 2048;
section_sizes[0]= size; section_sizes[0]= size;
} else { } else {
ret= Xorriso__start_end_lbas(node, &lba_count, &start_lbas, &end_lbas, ret= Xorriso__start_end_lbas(node, &lba_count, &start_lbas, &end_lbas,
@ -2404,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++) { for(i= 0; i < lba_count && file_base_bytes < upto_file_bytes; i++) {
lba= start_lbas[i]; lba= start_lbas[i];
count= end_lbas[i] + 1 - 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 */ /* skip intervals before img_offset */
if(new_file_base_bytes <= img_offset) { if(new_file_base_bytes <= img_offset) {
@ -2412,7 +2490,7 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
continue; continue;
} }
/* Eventually adjust first interval start */ /* 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) { if(file_base_bytes < img_offset) {
img_adr+= img_offset - file_base_bytes; img_adr+= img_offset - file_base_bytes;
lba= img_adr / (off_t) 2048; lba= img_adr / (off_t) 2048;
@ -2428,7 +2506,7 @@ int Xorriso_read_file_data(struct XorrisO *xorriso, IsoNode *node,
job->data_to_limit= size - file_base_bytes; job->data_to_limit= size - file_base_bytes;
job->data_to_skip= data_to_skip; job->data_to_skip= data_to_skip;
data_to_skip= 0; 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, ret= Xorriso_check_interval(xorriso, spotlist, job, lba, count, read_chunk,
0, (flag & 2)); 0, (flag & 2));
if(ret <= 0) 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 */ /* @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; int l;

View File

@ -27,13 +27,14 @@
#define Xorriso_free_meM(pt) { \ #define Xorriso_free_meM(pt) { \
if(pt != NULL) \ if(pt != NULL) \
free((char *) pt); \ free((char *) pt); \
pt= NULL; \
} }
#define SfileadrL 4096 #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); double Sfile_microtime(int flag);

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. 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 Xorriso__node_lba_cmp(const void *node1, const void *node2)
{ {
int ret; int ret;
int lba1= 0, lba2= 0; off_t lba1= 0, lba2= 0;
ret= Xorriso__file_start_lba(*((IsoNode **) node1), &lba1, 0); ret= Xorriso__file_start_lba(*((IsoNode **) node1), &lba1, 0);
if(ret!=1) 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); ret= Xorriso__file_start_lba(*((IsoNode **) node2), &lba2, 0);
if(ret!=1) if(ret!=1)
lba2= 0; 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. /* 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. Provided under GPL version 2 or later.
@ -2084,6 +2084,8 @@ int Xorriso_sieve_big(struct XorrisO *xorriso, int flag)
10000, 1}, 10000, 1},
{"Image size :", 3, "Image size :", "", 1, { 0, -1, -1, -1, -1, -1}, {"Image size :", 3, "Image size :", "", 1, { 0, -1, -1, -1, -1, -1},
1, 0}, 1, 0},
{"Indev feature:", 3, "Indev feature:", "= ", 2, { 0, 1, -1, -1, -1, -1},
10000, 1},
{"Jigdo files :", 3, "Jigdo files :", "", 1, { 0, -1, -1, -1, -1, -1}, {"Jigdo files :", 3, "Jigdo files :", "", 1, { 0, -1, -1, -1, -1, -1},
1, 0}, 1, 0},
{"Local ACL :", 3, "Local ACL :", "", 1, { 0, -1, -1, -1, -1, -1}, {"Local ACL :", 3, "Local ACL :", "", 1, { 0, -1, -1, -1, -1, -1},
@ -2114,6 +2116,8 @@ int Xorriso_sieve_big(struct XorrisO *xorriso, int flag)
2, 0}, 2, 0},
{"Modif. Time :", 3, "Modif. Time : ", "", 1, { 0, -1, -1, -1, -1, -1}, {"Modif. Time :", 3, "Modif. Time : ", "", 1, { 0, -1, -1, -1, -1, -1},
1, 1}, 1, 1},
{"Overburnt by :", 3, "Overburnt by :", "", 1, { 0, -1, -1, -1, -1, -1},
2, 0},
{"PVD address :", 3, "PVD address :", "", 1, { 0, -1, -1, -1, -1, -1}, {"PVD address :", 3, "PVD address :", "", 1, { 0, -1, -1, -1, -1, -1},
1, 0}, 1, 0},
{"Preparer Id :", 3, "Preparer Id : ", "", 1, { 0, -1, -1, -1, -1, -1}, {"Preparer Id :", 3, "Preparer Id : ", "", 1, { 0, -1, -1, -1, -1, -1},
@ -2662,9 +2666,9 @@ int Xorriso_write_session_log(struct XorrisO *xorriso, int flag)
*(wpt++)= *rpt; *(wpt++)= *rpt;
} }
*wpt= 0; *wpt= 0;
fprintf(fp, "%s %d %d %s\n", fprintf(fp, "%s %.f %.f %s\n",
Ftimetxt(time(0), timetext, 2), xorriso->session_lba, Ftimetxt(time(0), timetext, 2), (double) xorriso->session_lba,
xorriso->session_blocks, sfe); (double) xorriso->session_blocks, sfe);
fclose(fp); fclose(fp);
ret= 1; ret= 1;
ex:; ex:;
@ -2915,7 +2919,7 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
if(!(is_default && no_defaults)) if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2); Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->img_read_error_mode==2); is_default= (xorriso->img_read_error_mode == 1);
treatment= "best_effort"; treatment= "best_effort";
if(xorriso->img_read_error_mode==1) if(xorriso->img_read_error_mode==1)
treatment= "failure"; treatment= "failure";
@ -2999,7 +3003,7 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
Xorriso_status_result(xorriso,filter,fp,flag&2); Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default = ((xorriso->do_strict_acl & 1) == 0 && is_default = ((xorriso->do_strict_acl & 1) == 0 &&
(xorriso->do_md5 & (64 | 128)) == 0 && (xorriso->do_md5 & (64 | 128)) == 64 &&
xorriso->sparse_min_gap == 0); xorriso->sparse_min_gap == 0);
sprintf(line,"-osirrox %s:%s:sparse=", sprintf(line,"-osirrox %s:%s:sparse=",
(xorriso->do_strict_acl & 1) ? "strict_acl_on" : "strict_acl_off", (xorriso->do_strict_acl & 1) ? "strict_acl_on" : "strict_acl_off",
@ -3063,6 +3067,18 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
if(!(is_default && no_defaults)) if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2); Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= ((xorriso->system_area_options & (1 << 16)) == 0);
sprintf(line, "-boot_image any gpt_iso_bootable=%s\n",
(xorriso->system_area_options & (1 << 16)) ? "on" : "off");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= ((xorriso->system_area_options & (1 << 17)) == 0);
sprintf(line, "-boot_image any gpt_iso_not_ro=%s\n",
(xorriso->system_area_options & (1 << 17)) ? "on" : "off");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->appended_as_gpt == 0 && xorriso->appended_as_apm == 0); is_default= (xorriso->appended_as_gpt == 0 && xorriso->appended_as_apm == 0);
if(is_default) { if(is_default) {
sprintf(line, "-boot_image any appended_part_as=mbr\n"); sprintf(line, "-boot_image any appended_part_as=mbr\n");
@ -3525,6 +3541,20 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
sprintf(line,"-dvd_obs %s\n", mode); sprintf(line,"-dvd_obs %s\n", mode);
if(!(is_default && no_defaults)) if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2); Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->do_obs_pad == 0);
strcpy(mode, "no_obs_pad");
if(xorriso->do_obs_pad)
strcpy(mode, "obs_pad");
sprintf(line,"-dvd_obs %s\n", mode);
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso, filter, fp, flag & 2);
is_default= (xorriso->bdr_obs_exempt == 0);
strcpy(mode, "no_bdr_obs_exempt");
if(xorriso->bdr_obs_exempt)
strcpy(mode, "bdr_obs_exempt");
sprintf(line,"-dvd_obs %s\n", mode);
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso, filter, fp, flag & 2);
is_default= (xorriso->use_immed_bit == 0); is_default= (xorriso->use_immed_bit == 0);
strcpy(line, "-use_immed_bit "); strcpy(line, "-use_immed_bit ");
@ -3676,7 +3706,7 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
Xorriso_status_result(xorriso,filter,fp,flag&2); Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->grow_blindly_msc2<0); 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", sprintf(line,"-grow_blindly %s\n",
xorriso->grow_blindly_msc2 < 0 ? "off" : sfe); xorriso->grow_blindly_msc2 < 0 ? "off" : sfe);
if(!(is_default && no_defaults)) if(!(is_default && no_defaults))

View File

@ -2,7 +2,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. Provided under GPL version 2 or later.
@ -185,7 +185,9 @@ int Xorriso_make_write_options(
else else
#endif #endif
burn_write_opts_set_dvd_obs(*burn_options, xorriso->dvd_obs); burn_write_opts_set_dvd_obs(*burn_options, xorriso->dvd_obs);
burn_write_opts_set_obs_pad(*burn_options, !!xorriso->do_obs_pad);
burn_write_opts_set_bdr_obs_exempt(*burn_options,
!!xorriso->bdr_obs_exempt);
burn_write_opts_set_stdio_fsync(*burn_options, xorriso->stdio_sync); burn_write_opts_set_stdio_fsync(*burn_options, xorriso->stdio_sync);
burn_write_opts_set_underrun_proof(*burn_options, 1); burn_write_opts_set_underrun_proof(*burn_options, 1);
return(1); return(1);
@ -194,20 +196,20 @@ int Xorriso_make_write_options(
/* @param flag bit0= do not write but only prepare and return size in sectors /* @param flag bit0= do not write but only prepare and return size in sectors
bit1= do not use isoburn wrappers, do not assume libisofs 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_drive *drive, struct burn_disc *disc,
struct burn_write_opts *burn_options, int flag) struct burn_write_opts *burn_options, int flag)
{ {
int ret, img_sectors, num_sessions= 0, num_tracks= 0, padding= 0, profile; int num_sessions= 0, num_tracks= 0, padding= 0, profile;
off_t media_space; off_t media_space, ret, img_sectors, lba, nwa, multi_emul_blocks= 0;
int lba, nwa, multi_emul_blocks= 0;
char profile_name[80]; char profile_name[80];
struct burn_session **sessions; struct burn_session **sessions;
struct burn_track **tracks; struct burn_track **tracks;
enum burn_disc_status s; 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); sessions= burn_disc_get_sessions(disc, &num_sessions);
if(sessions==NULL || num_sessions < 1) { if(sessions==NULL || num_sessions < 1) {
@ -236,7 +238,7 @@ no_track:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
} }
} }
if(xorriso->alignment == 0 && ! (xorriso->no_emul_toc & 1)) { if(xorriso->alignment == 0 && !((xorriso->no_emul_toc & 1) || flag & 4)) {
ret= isoburn_needs_emulation(drive); ret= isoburn_needs_emulation(drive);
if(ret > 0) { if(ret > 0) {
/* Take care that the session is padded up to the future NWA. /* Take care that the session is padded up to the future NWA.
@ -247,7 +249,7 @@ no_track:;
s= isoburn_disc_get_status(drive); s= isoburn_disc_get_status(drive);
if(s == BURN_DISC_BLANK) { if(s == BURN_DISC_BLANK) {
/* Count blocks before nwa as part of the image */; /* 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) if(ret <= 0)
nwa= 0; nwa= 0;
multi_emul_blocks= nwa; multi_emul_blocks= nwa;
@ -269,7 +271,7 @@ no_track:;
if(xorriso->alignment > 0) { if(xorriso->alignment > 0) {
if(img_sectors > 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) if(ret <= 0)
nwa= 0; nwa= 0;
lba= (nwa + img_sectors + padding) % xorriso->alignment; lba= (nwa + img_sectors + padding) % xorriso->alignment;
@ -290,8 +292,8 @@ no_track:;
if(media_space < img_sectors + padding) { if(media_space < img_sectors + padding) {
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"Image size %ds exceeds free space on media %.fs", "Image size %.fs exceeds free space on media %.fs",
img_sectors + padding, (double) media_space); (double) (img_sectors + padding), (double) media_space);
if(flag & 1) { if(flag & 1) {
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
} else { } else {
@ -392,12 +394,16 @@ failure:;
} }
int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive, int Xorriso_set_system_area(struct XorrisO *xorriso,
IsoImage *img, struct isoburn_imgen_opts *sopts, struct burn_drive *in_drive,
struct burn_drive *out_drive,
IsoImage *img,
struct isoburn_imgen_opts *sopts,
int flag) 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; int sa_loaded, read_count, i, read_sum= 0;
off_t iso_lba= -1, start_lba, image_blocks;
char volid[33]; char volid[33];
FILE *fp= NULL; FILE *fp= NULL;
char *buf= NULL, *bufpt= NULL, *intvl; char *buf= NULL, *bufpt= NULL, *intvl;
@ -441,7 +447,8 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
Xorriso_alloc_meM(buf, char, 32768); Xorriso_alloc_meM(buf, char, 32768);
memset(buf, 0, 32768); memset(buf, 0, 32768);
system_area_options= xorriso->system_area_options; system_area_options= xorriso->system_area_options;
if(xorriso->system_area_clear_loaded) if(xorriso->system_area_clear_loaded ||
(in_drive != out_drive && in_drive != NULL))
sa_loaded= 0; sa_loaded= 0;
else else
sa_loaded= iso_image_get_system_area(img, buf, &options, 0); sa_loaded= iso_image_get_system_area(img, buf, &options, 0);
@ -451,8 +458,8 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
"Error when inquiring System Area data of ISO 9660 image", "Error when inquiring System Area data of ISO 9660 image",
0, "FAILURE", 1); 0, "FAILURE", 1);
{ret= 0; goto ex;} {ret= 0; goto ex;}
} if(sa_loaded > 0) }
bufpt= buf; bufpt= buf;
if(xorriso->system_area_disk_path[0] == 0) { if(xorriso->system_area_disk_path[0] == 0) {
if(xorriso->patch_system_area && xorriso->system_area_options == 0 && if(xorriso->patch_system_area && xorriso->system_area_options == 0 &&
sa_loaded > 0) { sa_loaded > 0) {
@ -465,20 +472,20 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
(((unsigned int) ub[461]) << 24)); (((unsigned int) ub[461]) << 24));
iso_lba= -1; iso_lba= -1;
ret= isoburn_disc_get_msc1(drive, &start_lba); ret= isoburn_disc_get_msc1_v2(in_drive, &start_lba);
if(ret > 0) { if(ret > 0) {
ret= isoburn_read_iso_head(drive, start_lba, &image_blocks, ret= isoburn_read_iso_head_v2(in_drive, start_lba, &image_blocks,
volid, 1); volid, 1);
if(ret > 0) if(ret > 0)
iso_lba= start_lba + image_blocks; 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; system_area_options= 0;
} else if((xorriso->patch_system_area & 1) && } 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; system_area_options= 0;
} else if((xorriso->patch_system_area & 2) && } 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; system_area_options= 0;
} else if(xorriso->patch_system_area & 2) { /* isohybrid patching */ } else if(xorriso->patch_system_area & 2) { /* isohybrid patching */
/* Check whether bytes 432-345 point to ElTorito LBA */ /* Check whether bytes 432-345 point to ElTorito LBA */
@ -489,7 +496,7 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
system_area_options= 0; system_area_options= 0;
} else if(bootimg_node != NULL) { } else if(bootimg_node != NULL) {
Xorriso__file_start_lba((IsoNode *) bootimg_node, &(iso_lba), 0); 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; system_area_options= 0;
} }
} }
@ -567,9 +574,9 @@ do_set:;
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
offst= xorriso->partition_offset; offst= xorriso->partition_offset;
state= isoburn_disc_get_status(drive); state= isoburn_disc_get_status(out_drive);
if(state == BURN_DISC_APPENDABLE) { if(state == BURN_DISC_APPENDABLE) {
ret= isoburn_get_img_partition_offset(drive, &offst); ret= isoburn_get_img_partition_offset(out_drive, &offst);
if(ret == 1) { if(ret == 1) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"Preserving in ISO image: -boot_image any partition_offset=%lu", "Preserving in ISO image: -boot_image any partition_offset=%lu",
@ -615,7 +622,7 @@ int Xorriso_attach_boot_image(struct XorrisO *xorriso, int flag)
int emul, platform_id; int emul, platform_id;
off_t load_size; off_t load_size;
struct stat stbuf; struct stat stbuf;
int hflag= 0, is_interval= 0; int hflag= 0, is_interval= 0, cat_tries;
if(xorriso->boot_image_bin_path[0] == 0 && !(flag & 2)) { if(xorriso->boot_image_bin_path[0] == 0 && !(flag & 2)) {
@ -699,9 +706,19 @@ int Xorriso_attach_boot_image(struct XorrisO *xorriso, int flag)
cpt++; cpt++;
} }
strcpy(cpt, "boot.cat"); strcpy(cpt, "boot.cat");
if(xorriso->boot_image_cat_hidden & 1) {
/* Find a name which does not yet exist */
ret= 1;
for(cat_tries= 1; ret > 0 && cat_tries < 1000000; cat_tries++) {
ret= Xorriso_node_from_path(xorriso, image,
xorriso->boot_image_cat_path, &node, 1);
if(ret > 0)
sprintf(cpt, "real%d_boot.cat", cat_tries);
}
}
} }
ret= Xorriso_node_from_path(xorriso, image, xorriso->boot_image_cat_path, ret= Xorriso_node_from_path(xorriso, image, xorriso->boot_image_cat_path,
&node, 1); &node, 1);
if(ret > 0) { if(ret > 0) {
if(!xorriso->do_overwrite) { if(!xorriso->do_overwrite) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
@ -972,6 +989,10 @@ int Xorriso_make_iso_write_opts(struct XorrisO *xorriso, IsoImage *image,
isoburn_igopt_set_iso_type_guid(sopts, xorriso->iso_gpt_type_guid, isoburn_igopt_set_iso_type_guid(sopts, xorriso->iso_gpt_type_guid,
xorriso->iso_mbr_part_flag & 1); xorriso->iso_mbr_part_flag & 1);
isoburn_igopt_set_gpt_guid(sopts, xorriso->gpt_guid, xorriso->gpt_guid_mode); isoburn_igopt_set_gpt_guid(sopts, xorriso->gpt_guid, xorriso->gpt_guid_mode);
ret= isoburn_igopt_set_max_ce_entries(sopts, xorriso->max_ce_entries,
xorriso->max_ce_entries_flag);
if(ret <= 0)
{ret= 0; goto ex;}
isoburn_igopt_set_disc_label(sopts, xorriso->ascii_disc_label); isoburn_igopt_set_disc_label(sopts, xorriso->ascii_disc_label);
isoburn_igopt_set_hfsp_serial_number(sopts, xorriso->hfsp_serial_number); isoburn_igopt_set_hfsp_serial_number(sopts, xorriso->hfsp_serial_number);
isoburn_igopt_set_hfsp_block_size(sopts, xorriso->hfsp_block_size, isoburn_igopt_set_hfsp_block_size(sopts, xorriso->hfsp_block_size,
@ -1043,6 +1064,7 @@ fprintf(stderr, "XORRISO_DEBUG: isoburn_igopt_set_tail_blocks(%d)\n",
ret= 1; ret= 1;
ex:; ex:;
Xorriso_process_msg_queues(xorriso, 0);
return(ret); return(ret);
} }
@ -1081,13 +1103,86 @@ int Xorriso_set_all_file_dates(struct XorrisO *xorriso, int flag)
} }
/* @return 0= no EFI , 1= EFI but no warning needed , 2= warning was issued
*/
int Xorriso_warn_efi_boot_dir(struct XorrisO *xorriso, IsoImage *image,
int flag)
{
int ret, num_boots, i, filec= 0;
off_t mem= 0;
char *patterns[1], **filev= NULL;
ElToritoBootImage **boots = NULL;
IsoFile **bootnodes = NULL;
IsoNode *node;
/* Check El Torito images for EFI */
ret= iso_image_get_all_boot_imgs(image, &num_boots, &boots, &bootnodes, 0);
Xorriso_process_msg_queues(xorriso,0);
if(ret == 1) {
for(i= 0; i <num_boots; i++) {
if(el_torito_get_boot_platform_id(boots[i]) == 0xef)
goto has_efi;
}
}
/* Check appended partitions for EFI */
for(i= 0; i < Xorriso_max_appended_partitionS; i++) {
if(xorriso->appended_partitions[i] == NULL)
continue;
if(xorriso->appended_partitions[i][0] == 0)
continue;
if(xorriso->appended_part_types[i] == 0xef)
goto has_efi;
}
/* No EFI found */
ret= 0; goto ex;
has_efi:;
/* Check for /[Ee][Ff][Ii]/[Bb][Oo][Oo][Tt]/ in ISO tree */
patterns[0]= "/[Ee][Ff][Ii]/[Bb][Oo][Oo][Tt]";
ret= Xorriso_expand_pattern(xorriso, 1, patterns, 0, &filec, &filev, &mem, 0);
if(ret > 0 && filec > 0) {
ret= Xorriso_node_from_path(xorriso, image, filev[0], &node, 1);
if(ret > 0) {
if(LIBISO_ISDIR(node)) {
ret= 1; goto ex;
}
}
}
Xorriso_msgs_submit(xorriso, 0,
"EFI boot equipment is provided but no directory /EFI/BOOT",
0, "WARNING", 0);
Xorriso_msgs_submit(xorriso, 0,
"will emerge in the ISO filesystem. A popular method to",
0, "WARNING", 0);
Xorriso_msgs_submit(xorriso, 0,
"prepare a USB stick on MS-Windows relies on having in the",
0, "WARNING", 0);
Xorriso_msgs_submit(xorriso, 0,
"ISO filesystem a copy of the EFI System Partition tree.",
0, "WARNING", 0);
ret= 2;
ex:;
Sfile_destroy_argv(&filec, &filev, 0);
if(boots != NULL)
free(boots);
if(bootnodes != NULL)
free(bootnodes);
return(ret);
}
/* @param flag bit0= do not write but only prepare and return size in sectors /* @param flag bit0= do not write but only prepare and return size in sectors
@return <=0 error , 1= success @return <=0 error , 1= success
2= failure with DVD-RW, please call Xorriso_retry_write_session() 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; int freshly_bootable= 0, hide_attr, signal_mode, role, is_bdr_pow= 0;
char *xorriso_id= NULL, *img_id, *sfe= NULL, *out_cs; char *xorriso_id= NULL, *img_id, *sfe= NULL, *out_cs;
struct isoburn_imgen_opts *sopts= NULL; struct isoburn_imgen_opts *sopts= NULL;
@ -1241,7 +1336,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
} }
iso_image_set_data_preparer_id(image, xorriso_id); iso_image_set_data_preparer_id(image, xorriso_id);
} }
ret= Xorriso_set_system_area(xorriso, source_drive, image, sopts, 0); ret= Xorriso_set_system_area(xorriso, source_drive, drive, image, sopts, 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
@ -1283,8 +1378,8 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
sprintf(xorriso->info_text, "Patching boot info table"); sprintf(xorriso->info_text, "Patching boot info table");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
ret= Xorriso_path_from_lba(xorriso, NULL, xorriso->loaded_boot_bin_lba, ret= Xorriso_path_from_lba(xorriso, NULL,
sfe, 1); (off_t) xorriso->loaded_boot_bin_lba, sfe, 1);
if(ret < 0) if(ret < 0)
goto ex; goto ex;
if(ret == 0) { if(ret == 0) {
@ -1332,6 +1427,8 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
&value_length, &value, 2 | 8); &value_length, &value, 2 | 8);
} }
Xorriso_warn_efi_boot_dir(xorriso, image, 0);
ret= Xorriso_make_iso_write_opts(xorriso, image, sopts, flag & 1); ret= Xorriso_make_iso_write_opts(xorriso, image, sopts, flag & 1);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
@ -1354,8 +1451,8 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
Xorriso_set_abort_severity(xorriso, 1); Xorriso_set_abort_severity(xorriso, 1);
if (xorriso->grow_blindly_msc2 >= 0 && if (xorriso->grow_blindly_msc2 >= 0 &&
xorriso->out_drive_handle != xorriso->in_drive_handle) { xorriso->out_drive_handle != xorriso->in_drive_handle) {
ret= isoburn_prepare_blind_grow(source_drive, &disc, sopts, drive, ret= isoburn_prepare_blind_grow_v2(source_drive, &disc, sopts, drive,
xorriso->grow_blindly_msc2); xorriso->grow_blindly_msc2);
if(ret>0) { if(ret>0) {
/* Allow the consumer of output to access the input drive */ /* Allow the consumer of output to access the input drive */
source_drive= NULL; source_drive= NULL;
@ -1379,11 +1476,11 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
ret= Xorriso_make_write_options(xorriso, drive, &burn_options, 0); ret= Xorriso_make_write_options(xorriso, drive, &burn_options, 0);
if(ret<=0) if(ret<=0)
goto cancel_iso; 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) { if(xorriso->do_stream_recording == 2) {
ret= isoburn_igopt_get_data_start(sopts, &data_lba); ret= isoburn_igopt_get_data_start_v2(sopts, &data_lba);
if(ret > 0 && data_lba >= 16) if(ret > 0 && data_lba >= 16 && data_lba < (int) 0x7fffffff)
burn_write_opts_set_stream_recording(burn_options, data_lba); burn_write_opts_set_stream_recording(burn_options, (int) data_lba);
} }
ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, flag&1); ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, flag&1);
@ -1393,6 +1490,8 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
Xorriso_set_image_severities(xorriso, 2); Xorriso_set_image_severities(xorriso, 2);
if(flag&1) /* reset queue severity */ if(flag&1) /* reset queue severity */
Xorriso_set_image_severities(xorriso, 0); Xorriso_set_image_severities(xorriso, 0);
if(flag & 1)
xorriso->print_size_counter++;
goto cancel_iso; goto cancel_iso;
} }
@ -1449,11 +1548,11 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
tracks= burn_session_get_tracks(sessions[0], &num_tracks); tracks= burn_session_get_tracks(sessions[0], &num_tracks);
if(tracks!=NULL && num_tracks>0) { if(tracks!=NULL && num_tracks>0) {
burn_track_get_counters(tracks[0],&readcounter,&writecounter); burn_track_get_counters(tracks[0],&readcounter,&writecounter);
xorriso->session_blocks= (int) (writecounter/ (off_t) 2048); xorriso->session_blocks= writecounter / 2048.0;
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"ISO image produced: %d sectors\nWritten to medium : %d sectors at LBA %d\n", "ISO image produced: %.f sectors\nWritten to medium : %.f sectors at LBA %.f\n",
(int) (readcounter/ (off_t) 2048), ((double) readcounter) / 2048.0,
xorriso->session_blocks, xorriso->session_lba); (double) xorriso->session_blocks, (double) xorriso->session_lba);
Xorriso_info(xorriso, 0); Xorriso_info(xorriso, 0);
} }
} }
@ -1476,6 +1575,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
sprintf(xorriso->info_text, "Writing to %s completed successfully.\n\n", sprintf(xorriso->info_text, "Writing to %s completed successfully.\n\n",
Text_shellsafe(xorriso->outdev,sfe,0)); Text_shellsafe(xorriso->outdev,sfe,0));
Xorriso_info(xorriso, 0); Xorriso_info(xorriso, 0);
xorriso->write_session_counter++;
ret= 1; ret= 1;
ex:; ex:;
xorriso->run_state= 0; /* Indicate that burning has ended */ xorriso->run_state= 0; /* Indicate that burning has ended */
@ -1553,9 +1653,10 @@ int Xorriso_check_burn_abort(struct XorrisO *xorriso, int flag)
int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive, int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
int flag) 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; 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]; char *status_text, date_text[80], *speed_unit, mem_text[8];
enum burn_drive_status drive_status; enum burn_drive_status drive_status;
double start_time, current_time, last_time, base_time= 0.0, base_count= 0.0; double start_time, current_time, last_time, base_time= 0.0, base_count= 0.0;
@ -1591,7 +1692,7 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
while(1) { while(1) {
last_time= current_time; last_time= current_time;
last_sector= progress.sector; 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) { if(drive_status == BURN_DRIVE_IDLE) {
/* To avoid a race condition between burn_source and libisofs /* To avoid a race condition between burn_source and libisofs
@ -1621,11 +1722,12 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
/ (double) progress.buffer_capacity; / (double) progress.buffer_capacity;
if(emul==2) { if(emul==2) {
if(progress.sector<=progress.sectors) if(progress.sector<=progress.sectors)
sprintf(xorriso->info_text, "%4d of %4d MB written", sprintf(xorriso->info_text, "%4.f of %4.f MB written",
progress.sector / 512, progress.sectors / 512); (double) (progress.sector / 512),
(double) ( progress.sectors / 512));
else else
sprintf(xorriso->info_text, "%4d MB written", sprintf(xorriso->info_text, "%4.f MB written",
progress.sector / 512); (double) (progress.sector / 512));
if(xorriso->pacifier_fifo!=NULL) if(xorriso->pacifier_fifo!=NULL)
ret= burn_fifo_inquire_status(xorriso->pacifier_fifo, ret= burn_fifo_inquire_status(xorriso->pacifier_fifo,
@ -1699,12 +1801,12 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
sprintf(mem_text, "%5.1f", sprintf(mem_text, "%5.1f",
100.0 * ((double) progress.sector) / ((double) progress.sectors)); 100.0 * ((double) progress.sector) / ((double) progress.sectors));
mem_text[5]= 0; mem_text[5]= 0;
sprintf(xorriso->info_text, "Writing: %10ds %s%% ", sprintf(xorriso->info_text, "Writing: %10.fs %s%% ",
progress.sector, mem_text); (double) progress.sector, mem_text);
} else { } else {
Sfile_scale(2048.0 * (double) progress.sector, mem_text, 5, 1e4, 1); Sfile_scale(2048.0 * (double) progress.sector, mem_text, 5, 1e4, 1);
sprintf(xorriso->info_text, "Writing: %10ds %s ", sprintf(xorriso->info_text, "Writing: %10.fs %s ",
progress.sector, mem_text); (double) progress.sector, mem_text);
} }
ret= isoburn_get_fifo_status(drive, &size, &free_bytes, &status_text); ret= isoburn_get_fifo_status(drive, &size, &free_bytes, &status_text);
if(ret>0 ) if(ret>0 )
@ -1766,7 +1868,7 @@ int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
struct burn_drive_info *dinfo; struct burn_drive_info *dinfo;
struct burn_drive *drive; struct burn_drive *drive;
enum burn_disc_status disc_state; enum burn_disc_status disc_state;
struct burn_progress p; struct burn_progress_v2 p;
double percent = 1.0; double percent = 1.0;
int current_profile; int current_profile;
char current_profile_name[80]; char current_profile_name[80];
@ -1851,7 +1953,7 @@ int Xorriso_blank_media(struct XorrisO *xorriso, int flag)
usleep(1000000); usleep(1000000);
if(!using_immed) if(!using_immed)
sprintf(progress_text, "synchronously since"); 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); Xorriso_process_msg_queues(xorriso,0);
if(p.sectors>0 && p.sector>=0) /* display 1 to 99 percent */ if(p.sectors>0 && p.sector>=0) /* display 1 to 99 percent */
percent = 1.0 + ((double) p.sector+1.0) / ((double) p.sectors) * 98.0; percent = 1.0 + ((double) p.sector+1.0) / ((double) p.sectors) * 98.0;
@ -1898,7 +2000,7 @@ int Xorriso_format_media(struct XorrisO *xorriso, off_t in_size, int flag)
unsigned dummy; unsigned dummy;
struct burn_drive_info *dinfo; struct burn_drive_info *dinfo;
struct burn_drive *drive; struct burn_drive *drive;
struct burn_progress p; struct burn_progress_v2 p;
double percent = 1.0; double percent = 1.0;
int current_profile; int current_profile;
char current_profile_name[80], progress_text[40]; char current_profile_name[80], progress_text[40];
@ -2021,7 +2123,7 @@ int Xorriso_format_media(struct XorrisO *xorriso, off_t in_size, int flag)
usleep(1000000); usleep(1000000);
if(!using_immed) if(!using_immed)
sprintf(progress_text, "synchronously since"); 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); Xorriso_process_msg_queues(xorriso,0);
if(p.sectors>0 && p.sector>=0) /* display 1 to 99 percent */ if(p.sectors>0 && p.sector>=0) /* display 1 to 99 percent */
percent = 1.0 + ((double) p.sector+1.0) / ((double) p.sectors) * 98.0; percent = 1.0 + ((double) p.sector+1.0) / ((double) p.sectors) * 98.0;
@ -2174,8 +2276,8 @@ int Xorriso_retry_burn_track(struct XorrisO *xorriso,
int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address, int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
char *track_source, off_t tsize, int flag) char *track_source, off_t tsize, int flag)
{ {
int ret, fd, profile_number, is_cd= 0, dummy, nwa= -1; int ret, fd, profile_number, is_cd= 0, do_isosize, is_bd= 0, signal_mode;
int isosize= -1, do_isosize, is_bd= 0, signal_mode; off_t dummy, nwa= -1, isosize= -1;
struct burn_drive_info *dinfo; struct burn_drive_info *dinfo;
struct burn_drive *drive; struct burn_drive *drive;
struct burn_write_opts *burn_options= NULL; struct burn_write_opts *burn_options= NULL;
@ -2312,7 +2414,7 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
ret= 0; goto ex; ret= 0; goto ex;
} }
/* read isosize from head_buffer, not from medium */ /* 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) { if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
@ -2320,9 +2422,10 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex; ret= 0; goto ex;
} }
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); 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); burn_track_set_size(track, fixed_size);
} }
@ -2332,7 +2435,7 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
if(isoburn_needs_emulation(drive)) { if(isoburn_needs_emulation(drive)) {
if(flag&1) { 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); Xorriso_process_msg_queues(xorriso,0);
if(ret<=0) { if(ret<=0) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
@ -2345,7 +2448,8 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
} else { } else {
nwa= 0; nwa= 0;
if (disc_state == BURN_DISC_APPENDABLE) { 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); Xorriso_process_msg_queues(xorriso,0);
if(ret<=0) { if(ret<=0) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
@ -2355,14 +2459,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) { if(write_start_address>=0) {
nwa= write_start_address / (off_t) 2048; 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++; 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) { if(xorriso->do_tao) {
@ -2398,7 +2502,7 @@ int Xorriso_burn_track(struct XorrisO *xorriso, off_t write_start_address,
} }
} }
ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, 2); ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, 2 | 4);
if(ret<=0) if(ret<=0)
goto ex; goto ex;
@ -2474,9 +2578,10 @@ int Xorriso_relax_compliance(struct XorrisO *xorriso, char *mode,
int flag) int flag)
{ {
char *npt, *cpt; char *npt, *cpt;
int l, was, value, ret; int l, was, value, ret, endl;
struct isoburn_imgen_opts *opts= NULL; struct isoburn_imgen_opts *opts= NULL;
char *msg= NULL; char *msg= NULL;
char submode[41], *endpt;
off_t limit; off_t limit;
was= xorriso->relax_compliance; was= xorriso->relax_compliance;
@ -2693,6 +2798,41 @@ int Xorriso_relax_compliance(struct XorrisO *xorriso, char *mode,
} else if(l == 13 && strncmp(cpt, "old_empty_off", l) == 0) { } else if(l == 13 && strncmp(cpt, "old_empty_off", l) == 0) {
xorriso->do_old_empty= 0; xorriso->do_old_empty= 0;
} else if(l >= 15 && strncmp(cpt, "max_ce_entries=", 15) == 0) {
value= 0;
sscanf(cpt + 15, "%d", &value);
if(value < 1 || value > 100000) {
if(msg == NULL)
Xorriso_alloc_meM(msg, char, 160);
sprintf(msg,
"-compliance max_ce_entries=%d : Permissible is 1 to 100000",
value);
Xorriso_msgs_submit(xorriso, 0, msg, 0, "FAILURE", 0);
xorriso->relax_compliance= was;
ret= 0; goto ex;
} else {
xorriso->max_ce_entries= value;
}
} else if(l >= 12 && strncmp(cpt, "max_ce_drop=", 12) == 0) {
endl= sizeof(submode) - 1;
endpt= strchr(cpt + 12, ':');
if(endpt != NULL)
if(endl > endpt - (cpt + 12))
endl= endpt - (cpt + 12);
strncpy(submode, cpt + 12, endl);
submode[endl]= 0;
if(strcmp(submode, "off") == 0) {
xorriso->max_ce_entries_flag&= ~15;
} else if(strcmp(submode, "xattr") == 0) {
xorriso->max_ce_entries_flag= (xorriso->max_ce_entries_flag & ~15) | 1;
} else if(strcmp(submode, "xattr_acl") == 0) {
xorriso->max_ce_entries_flag= (xorriso->max_ce_entries_flag & ~15) | 2;
} else {
sprintf(xorriso->info_text,
"-compliance: unknown mode in max_ce_drop='%s'", submode);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
} else { } else {
if(l<SfileadrL) if(l<SfileadrL)
sprintf(xorriso->info_text, "-compliance: unknown rule '%s'", sprintf(xorriso->info_text, "-compliance: unknown rule '%s'",
@ -2716,7 +2856,7 @@ ex:;
int Xorriso_get_relax_text(struct XorrisO *xorriso, char mode[1024], int Xorriso_get_relax_text(struct XorrisO *xorriso, char mode[1024],
int flag) int flag)
{ {
int r; int r, drop;
r= xorriso->relax_compliance; r= xorriso->relax_compliance;
if(r == 0) { if(r == 0) {
@ -2775,10 +2915,15 @@ int Xorriso_get_relax_text(struct XorrisO *xorriso, char mode[1024],
sprintf(mode + strlen(mode), ":iso_9660_1999"); sprintf(mode + strlen(mode), ":iso_9660_1999");
if(xorriso->do_old_empty) if(xorriso->do_old_empty)
sprintf(mode + strlen(mode), ":old_empty"); sprintf(mode + strlen(mode), ":old_empty");
sprintf(mode + strlen(mode), ":max_ce_entries=%u", xorriso->max_ce_entries);
drop= xorriso->max_ce_entries_flag & 15;
sprintf(mode + strlen(mode), ":max_ce_drop=%s",
drop == 0 ? "off" : drop == 1 ? "xattr" : "xattr_acl");
return(1 + return(1 +
(r == Xorriso_relax_compliance_defaulT && !(xorriso->no_emul_toc & 1) (r == Xorriso_relax_compliance_defaulT && !(xorriso->no_emul_toc & 1)
&& xorriso->untranslated_name_len == 0 && !xorriso->do_iso1999 && && xorriso->untranslated_name_len == 0 && !xorriso->do_iso1999 &&
xorriso->iso_level == 3)); xorriso->iso_level == 3 && xorriso->max_ce_entries == 31 &&
drop == 2));
} }
@ -2871,19 +3016,19 @@ ex:
int Xorriso_overwrite_iso_head(struct XorrisO *xorriso, int Xorriso_overwrite_iso_head(struct XorrisO *xorriso,
struct burn_drive *drive, char *head_buffer, struct burn_drive *drive, char *head_buffer,
int lba, int flag) off_t lba, int flag)
{ {
int ret; int ret;
off_t to_write; off_t to_write;
to_write= 64 * 1024; to_write= 64 * 1024;
burn_drive_reset_simulate(drive, xorriso->do_dummy); 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); head_buffer, to_write, 1);
if(ret <= 0) { if(ret <= 0) {
Xorriso_process_msg_queues(xorriso, 0); Xorriso_process_msg_queues(xorriso, 0);
sprintf(xorriso->info_text, 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); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0); return(0);
} }
@ -2892,6 +3037,7 @@ int Xorriso_overwrite_iso_head(struct XorrisO *xorriso,
/* @param flag bit0= insist on tag_type 4 (relocated superblock tag) /* @param flag bit0= insist on tag_type 4 (relocated superblock tag)
bit1= accept tag with ISO_MD5_AREA_CORRUPTED
*/ */
int Xorriso_find_sb_checksum(struct XorrisO *xorriso, int Xorriso_find_sb_checksum(struct XorrisO *xorriso,
char *head_buffer, int *vd_end, int flag) char *head_buffer, int *vd_end, int flag)
@ -2913,8 +3059,9 @@ int Xorriso_find_sb_checksum(struct XorrisO *xorriso,
i++; i++;
ret= iso_util_decode_md5_tag(head_buffer + i * 2048, &tag_type, &pos, ret= iso_util_decode_md5_tag(head_buffer + i * 2048, &tag_type, &pos,
&range_start, &range_size, &next_tag, md5, 0); &range_start, &range_size, &next_tag, md5, 0);
if(ret <= 0) if(((unsigned int) ret) != ISO_MD5_AREA_CORRUPTED || !(flag & 2))
return(ret); if(ret <= 0)
return(ret);
if((flag & 1) && tag_type != 4) if((flag & 1) && tag_type != 4)
return(0); /* No other tag type is supposed to occur before type 4 */ return(0); /* No other tag type is supposed to occur before type 4 */
} }
@ -3022,12 +3169,16 @@ md5_comp_failed:;
bit2= issue message about success bit2= issue message about success
bit3= check whether source blocks are banned by in_sector_map bit3= check whether source blocks are banned by in_sector_map
bit4= refresh relocated sb checksum tag bit4= refresh relocated sb checksum tag
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, char *head_buffer, struct CheckmediajoB *job,
int flag) 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; char *headpt;
struct burn_drive_info *dinfo; struct burn_drive_info *dinfo;
struct burn_drive *drive = NULL; struct burn_drive *drive = NULL;
@ -3041,7 +3192,7 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
"on attempt to learn current session lba", 0); "on attempt to learn current session lba", 0);
if(ret<=0) if(ret<=0)
return(0); return(0);
ret= isoburn_disc_get_msc1(drive, &iso_lba); ret= isoburn_disc_get_msc1_v2(drive, &iso_lba);
if(ret<=0) if(ret<=0)
return(0); return(0);
drive= NULL; /* indev will not be used furtherly */ drive= NULL; /* indev will not be used furtherly */
@ -3063,19 +3214,18 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
if(job != NULL && job->data_to_fd >= 0) { if(job != NULL && job->data_to_fd >= 0) {
if((flag & 8) && job->sector_map != NULL) { if((flag & 8) && job->sector_map != NULL) {
ret= Sectorbitmap_bytes_are_set(job->sector_map, ret= Sectorbitmap_bytes_are_set(job->sector_map,
((off_t) iso_lba) * (off_t) 2048, iso_lba * (off_t) 2048,
((off_t) (iso_lba + 32)) * ((off_t) 2048) - (off_t) 1, 0); (iso_lba + 32) * ((off_t) 2048) - (off_t) 1, 0);
if(ret <= 0) { if(ret <= 0) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"ISO image head at lba %d is marked as invalid blocks in file copy", "ISO image head at lba %.f is marked as invalid blocks in file copy",
iso_lba); (double) iso_lba);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE", Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE",
0); 0);
return(0); return(0);
} }
} }
seek_ret= lseek(job->data_to_fd, ((off_t) 2048) * (off_t) iso_lba, seek_ret= lseek(job->data_to_fd, ((off_t) 2048) * iso_lba, SEEK_SET);
SEEK_SET);
if(seek_ret == -1) if(seek_ret == -1)
ret= 0; ret= 0;
else else
@ -3087,7 +3237,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); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE",0);
return(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) { if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
@ -3098,7 +3249,7 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
} else { } else {
ret= 0; ret= 0;
if(drive != NULL) 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) { if(ret<=0) {
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
@ -3110,6 +3261,12 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
} }
/* patch ISO header */ /* 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; full_size= iso_lba + isosize;
headpt= head_buffer + 32*1024; headpt= head_buffer + 32*1024;
for(i=0;i<4;i++) for(i=0;i<4;i++)
@ -3119,7 +3276,8 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
if(flag & 16) { if(flag & 16) {
/* Find relocated sb checksum tag */ /* Find relocated sb checksum tag */
ret= Xorriso_find_sb_checksum(xorriso, head_buffer, &vd_end, 1); ret= Xorriso_find_sb_checksum(xorriso, head_buffer, &vd_end,
1 | ((flag >> 4) & 2));
if(ret > 0) { if(ret > 0) {
/* If it is recognizable then it matched in Xorriso_adjust_relocated_sb */ /* If it is recognizable then it matched in Xorriso_adjust_relocated_sb */
checksum_block= ret - 1; checksum_block= ret - 1;
@ -3135,7 +3293,7 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
Write only up to PVD end plus eventual invalidated tag. Write only up to PVD end plus eventual invalidated tag.
*/ */
to_write= 2048 * 32; to_write= 2048 * 32;
ret= Xorriso_find_sb_checksum(xorriso, head_buffer, &i, 0); ret= Xorriso_find_sb_checksum(xorriso, head_buffer, &i, ((flag >> 4) & 2));
if(ret > 0) { if(ret > 0) {
if(!(flag & 16)) /* invalidate */ if(!(flag & 16)) /* invalidate */
memset(head_buffer + (ret - 1) * 2048, 0, 8); memset(head_buffer + (ret - 1) * 2048, 0, 8);
@ -3157,13 +3315,13 @@ int Xorriso_update_iso_lba0(struct XorrisO *xorriso, int iso_lba, int isosize,
} }
} else { } else {
/* This is a regular superblock relocation. Write full 64 kB. */ /* 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) if(ret <= 0)
return(ret); return(ret);
} }
if(flag & 4) { if(flag & 4) {
sprintf(xorriso->info_text, 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); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
} }
return(1); return(1);
@ -3236,7 +3394,7 @@ ex:;
int Xorriso_refresh_ts_tags(struct XorrisO *xorriso, int Xorriso_refresh_ts_tags(struct XorrisO *xorriso,
struct burn_drive *drive, struct burn_drive *drive,
void *ctx_unch, void *ctx_chng, 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 checksum_block, int flag)
{ {
int i, ret, tag_type, look_for_tag, check_start, look_from_block, was_change; int i, ret, tag_type, look_for_tag, check_start, look_from_block, was_change;
@ -3338,8 +3496,9 @@ ex:;
int Xorriso_adjust_session_size(struct XorrisO *xorriso, int Xorriso_adjust_session_size(struct XorrisO *xorriso,
struct burn_drive *drive, struct burn_drive *drive,
char *head_buffer, char *head_buffer,
int iso_lba, int iso_size, off_t iso_lba, off_t iso_size,
int checksum_block, int session_size, int flag) int checksum_block, off_t session_size,
int flag)
{ {
int i, ret, tag_type; int i, ret, tag_type;
uint32_t pos, range_start, range_size, next_tag; uint32_t pos, range_start, range_size, next_tag;
@ -3383,6 +3542,11 @@ no_ctx:;
/* Update session PVD at iso_lba+16 to iso_size */ /* Update session PVD at iso_lba+16 to iso_size */
headpt= head_buffer + 32 * 1024; 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++) for(i= 0; i < 4; i++)
headpt[87 - i]= headpt[80 + i]= (iso_size >> (8 * i)) & 0xff; headpt[87 - i]= headpt[80 + i]= (iso_size >> (8 * i)) & 0xff;
@ -3391,7 +3555,7 @@ no_ctx:;
ret= iso_md5_compute(ctx_chng, head_buffer + 32768, 2048); ret= iso_md5_compute(ctx_chng, head_buffer + 32768, 2048);
if(ret <= 0) if(ret <= 0)
goto ex; 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, checksum_block, md5_rec,
ctx_unch, ctx_chng, 0); ctx_unch, ctx_chng, 0);
if(ret == -2) if(ret == -2)
@ -3440,7 +3604,8 @@ int Xorriso_adjust_relocated_sb(struct XorrisO *xorriso,
char **sb_buffer, char **sb_buffer,
int flag) 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; char *buffer, *checksum= NULL;
*sb_buffer= NULL; *sb_buffer= NULL;
@ -3448,11 +3613,11 @@ int Xorriso_adjust_relocated_sb(struct XorrisO *xorriso,
buffer= *sb_buffer; buffer= *sb_buffer;
Xorriso_alloc_meM(checksum, char, 2048); 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) if(ret <= 0)
goto ex; goto ex;
ret= Xorriso_find_sb_checksum(xorriso, buffer, &vd_end, 0); ret= Xorriso_find_sb_checksum(xorriso, buffer, &vd_end, 0);
if(ret <= 0) if(ret < 0)
goto ex; goto ex;
if(ret > 0) { if(ret > 0) {
checksum_block= ret - 1; checksum_block= ret - 1;
@ -3487,11 +3652,11 @@ ex:
int Xorriso_truncate_overwritable(struct XorrisO *xorriso, char *adr_mode, int Xorriso_truncate_overwritable(struct XorrisO *xorriso, char *adr_mode,
char *adr_value, char *adjust, int flag) char *adr_value, char *adjust, int flag)
{ {
int ret, iso_lba= 0, iso_session, iso_track, iso_size= 0, image_start_mode= 0; int ret, iso_session, iso_track, image_start_mode= 0;
int old_size, new_size, blocks, was_indev= 0, checksum_block= 0, vd_end; int was_indev= 0, checksum_block= 0, vd_end, headless_mode= 0, i;
int readable_blocks; 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 image_start_value[81], *head_buffer= NULL, iso_volid[33];
char *sb_buffer= NULL; char *sb_buffer= NULL, *checksum_pt;
struct burn_drive_info *dinfo; struct burn_drive_info *dinfo;
struct burn_drive *drive = NULL, *in_drive = NULL; struct burn_drive *drive = NULL, *in_drive = NULL;
struct burn_multi_caps *caps= NULL; struct burn_multi_caps *caps= NULL;
@ -3531,40 +3696,58 @@ int Xorriso_truncate_overwritable(struct XorrisO *xorriso, char *adr_mode,
{ret= 2; goto ex;} {ret= 2; goto ex;}
/* Learn old size */ /* 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) { if(ret <= 0) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"-truncate_overwritable: Cannot read ISO 9660 Volume Descriptor from LBA 0"); "-truncate_overwritable: Cannot read ISO 9660 Volume Descriptor from LBA 0");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); if((strcmp(adr_mode, "lba") == 0 || strcmp(adr_mode, "sbsector") == 0)
goto ex; && strcmp(adjust, "new") == 0) {
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
ret= burn_get_read_capacity_v2(drive, &old_size, 0);
if(ret <= 0)
goto ex;
headless_mode= 1;
} else {
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
goto ex;
}
} }
/* Check for PVD at image_start_value and learn new size */ if(headless_mode) {
ret= Xorriso_decode_load_adr(xorriso, "-truncate_overwritable", iso_lba= Scanf_io_size(adr_value, 0);
adr_mode, adr_value, &image_start_mode, ret= isoburn_read_iso_head_v2(drive, iso_lba, &new_size, head_buffer,
image_start_value, 0); 2 | (1 << 12));
if(ret <= 0) if(ret <= 0)
goto ex; goto not_iso_9660;
ret= isoburn_get_mount_params(drive, image_start_mode, image_start_value, } else {
&iso_lba, &iso_track, &iso_session, iso_volid, /* Check for PVD at image_start_value and learn new size */
0); ret= Xorriso_decode_load_adr(xorriso, "-truncate_overwritable",
if(ret <= 0) adr_mode, adr_value, &image_start_mode,
goto ex; image_start_value, 0);
if(ret != 1) { if(ret <= 0)
sprintf(xorriso->info_text, goto ex;
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) {
not_iso_9660:;
sprintf(xorriso->info_text,
"-truncate_overwritable: Given address does not lead to ISO 9660 Volume Descriptor"); "-truncate_overwritable: Given address does not lead to ISO 9660 Volume Descriptor");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex; ret= 0; goto ex;
} }
if(iso_lba >= old_size) { if(iso_lba >= old_size) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"-truncate_overwritable: Given address is larger than current ISO size"); "-truncate_overwritable: Given address is larger than current ISO size");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex; ret= 0; goto ex;
}
ret= isoburn_read_iso_head_v2(drive, iso_lba, &new_size, head_buffer, 2);
if(ret <= 0)
goto ex;
} }
ret= isoburn_read_iso_head(drive, iso_lba, &new_size, head_buffer, 2);
if(ret <= 0)
goto ex;
ret= Xorriso_find_sb_checksum(xorriso, head_buffer, &vd_end, 0); ret= Xorriso_find_sb_checksum(xorriso, head_buffer, &vd_end, 0);
if(ret > 0) if(ret > 0)
@ -3594,7 +3777,7 @@ wrong_adjust:;
iso_size= blocks - iso_lba; 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); Xorriso_process_msg_queues(xorriso, 0);
if(ret > 0) { if(ret > 0) {
if(iso_lba + iso_size > readable_blocks) { if(iso_lba + iso_size > readable_blocks) {
@ -3617,20 +3800,40 @@ wrong_adjust:;
if(iso_size != new_size) { if(iso_size != new_size) {
ret=Xorriso_adjust_session_size(xorriso, drive, head_buffer, ret=Xorriso_adjust_session_size(xorriso, drive, head_buffer,
iso_lba, iso_size, checksum_block, iso_lba, iso_size,
new_size, 0); checksum_block, new_size, 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
} }
/* Load first 64 kB and transfer VDs from head_buffer */ /* Load first 64 kB and transfer VDs from head_buffer */
ret= Xorriso_adjust_relocated_sb(xorriso, drive, head_buffer, &sb_buffer, 0); if(headless_mode) {
if(ret <= 0) Xorriso_alloc_meM(sb_buffer, char, 32 * 2048);
goto ex; memcpy(sb_buffer, head_buffer, 32 * 2048);
for(i= 17; i < 32; i++)
if(strncmp(sb_buffer + i * 2048, "libisofs_sb_checksum_tag_v1", 27) == 0)
break;
if(i < 32) {
/* Convert superblock tag to provisory relocated superblock tag */
checksum_pt= sb_buffer + i * 2048;
memset(checksum_pt, 0, 2048);
sprintf(checksum_pt,
"libisofs_rlsb32_checksum_tag_v1 pos=%d range_start=0 range_size=%d",
i, i);
sprintf(checksum_pt + strlen(checksum_pt),
" session_start=%.f md5=0123456789abcdef0123456789abcdef self=0123456789abcdef0123456789abcdef\n",
(double) iso_lba);
}
} else {
ret= Xorriso_adjust_relocated_sb(xorriso, drive, head_buffer, &sb_buffer,
0);
if(ret <= 0)
goto ex;
}
/* Patch the size and write back */ /* Patch the size and write back */
ret= Xorriso_update_iso_lba0(xorriso, iso_lba, iso_size, sb_buffer, ret= Xorriso_update_iso_lba0(xorriso, iso_lba, iso_size, sb_buffer,
NULL, 2 | 16); NULL, 2 | 16 | ((!!headless_mode) << 5));
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* 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. Provided under GPL version 2 or later.
@ -31,14 +31,17 @@ int Xorriso_make_write_options(
struct XorrisO *xorriso, struct burn_drive *drive, struct XorrisO *xorriso, struct burn_drive *drive,
struct burn_write_opts **burn_options, int flag); 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_drive *drive, struct burn_disc *disc,
struct burn_write_opts *burn_options, int flag); struct burn_write_opts *burn_options, int flag);
int Xorriso_auto_format(struct XorrisO *xorriso, int flag); int Xorriso_auto_format(struct XorrisO *xorriso, int flag);
int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive, int Xorriso_set_system_area(struct XorrisO *xorriso,
IsoImage *img, struct isoburn_imgen_opts *sopts, struct burn_drive *in_drive,
struct burn_drive *out_drive,
IsoImage *img,
struct isoburn_imgen_opts *sopts,
int flag); int flag);
int Xorriso_check_burn_abort(struct XorrisO *xorriso, int flag); int Xorriso_check_burn_abort(struct XorrisO *xorriso, int flag);

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH XORRECORD 1 "Version 1.5.4, Jan 30, 2021" .TH XORRECORD 1 "Version 1.5.7, Apr 19, 2024"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -605,12 +605,34 @@ If a number is given, then error management stays enabled for all byte
addresses below that number. Any number below 16s is the same as "off". addresses below that number. Any number below 16s is the same as "off".
.TP .TP
\fBdvd_obs="default"|"32k"|"64k"\fR \fBdvd_obs="default"|"32k"|"64k"\fR
Linux specific:
Set the number of bytes to be transmitted with each write operation to DVD Set the number of bytes to be transmitted with each write operation to DVD
or BD media. Tracks get padded up to the next multiple of this write or BD media. With most write types, tracks get padded up to the next
size. A number of 64 KB may improve throughput with bus systems which multiple of this write size (see option \-\-obs_pad). A number of 64 KB may
show latency problems. The default depends on media type, option improve throughput with bus systems which show latency problems.
stream_recording=, and on compile time options. The default depends on media type, option stream_recording=, and on compile
time options.
.TP
\fB\--obs_pad\fR
Pad the data of the last write operation of a DVD\-R[W] DAO session, or BD\-R
session, or stdio: pseudo\-drive session up to the full size of an output chunk.
This padding has to be applied automatically to the other DVD and BD media
types, where it causes e.g. ISO images to have trailing unclaimed blocks.
Whether it is applied automatically to BD\-R depends on option
\-\-bdr_obs_exempt.
.br
Use this option if there is the suspicion that DVD\-R[W] DAO or BD\-R sessions
abort with your kernel and/or DVD drive, if their size is not a multiple of
16 blocks.
.br
This option may also get enabled at compile time of libburn.
.TP
\fB\--bdr_obs_exempt\fR
Exempt BD\-R media from automatic unconditional transaction end padding,
provided that this padding is not requested by \-\-obs_pad and that
no stream_recording is requested.
.br
This is a new feature introduced with version 1.5.6. It might become default
in later versions.
.TP .TP
\fBmodesty_on_drive=parameter[:parameters]\fR \fBmodesty_on_drive=parameter[:parameters]\fR
Control whether the drive buffer shall be kept from getting completely filled. Control whether the drive buffer shall be kept from getting completely filled.
@ -667,8 +689,8 @@ formatting will show no progress indication.
It may depend on the operating system whether \-use_immed_bit is set to "off" It may depend on the operating system whether \-use_immed_bit is set to "off"
by default. by default.
.TP .TP
\fBwrite_start_address=value\fR \fBwrite_start_address=byte_offset\fR
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, 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. but better is 32 kiB on DVD and 64 kiB on BD.
With formatted DVD\-RW 32 kiB alignment is mandatory. With formatted DVD\-RW 32 kiB alignment is mandatory.
@ -880,7 +902,7 @@ Thomas Schmitt <scdbackup@gmx.net>
.br .br
for libburnia\-project.org for libburnia\-project.org
.SH COPYRIGHT .SH COPYRIGHT
Copyright (c) 2011 \- 2021 Thomas Schmitt Copyright (c) 2011 \- 2024 Thomas Schmitt
.br .br
Permission is granted to distribute this text freely. It shall only be 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 modified in sync with the technical properties of xorriso. If you make use

View File

@ -3,7 +3,7 @@ xorrecord.texi.
xorrecord - Emulation of CD/DVD/BD program cdrecord by program xorriso xorrecord - Emulation of CD/DVD/BD program cdrecord by program xorriso
Copyright (C) 2011 - 2021 Thomas Schmitt Copyright (C) 2011 - 2023 Thomas Schmitt
Permission is granted to distribute this text freely. Permission is granted to distribute this text freely.
INFO-DIR-SECTION Archiving INFO-DIR-SECTION Archiving
@ -14,7 +14,7 @@ END-INFO-DIR-ENTRY
 
File: xorrecord.info, Node: Top, Next: Overview, Up: (dir) File: xorrecord.info, Node: Top, Next: Overview, Up: (dir)
xorrecord 1.5.4 xorrecord 1.5.7
*************** ***************
xorrecord - Emulation of CD/DVD/BD program cdrecord by program xorriso xorrecord - Emulation of CD/DVD/BD program cdrecord by program xorriso
@ -564,12 +564,29 @@ stream_recording="on"|"off"|number
byte addresses below that number. Any number below 16s is the same byte addresses below that number. Any number below 16s is the same
as "off". as "off".
dvd_obs="default"|"32k"|"64k" dvd_obs="default"|"32k"|"64k"
Linux specific: Set the number of bytes to be transmitted with each Set the number of bytes to be transmitted with each write operation
write operation to DVD or BD media. Tracks get padded up to the to DVD or BD media. With most write types, tracks get padded up to
next multiple of this write size. A number of 64 KB may improve the next multiple of this write size (see option -obs_pad). A
throughput with bus systems which show latency problems. The number of 64 KB may improve throughput with bus systems which show
default depends on media type, option stream_recording=, and on latency problems. The default depends on media type, option
compile time options. stream_recording=, and on compile time options.
-obs_pad
Pad the data of the last write operation of a DVD-R[W] DAO session,
or BD-R session, or stdio: pseudo-drive session up to the full size
of an output chunk. This padding has to be applied automatically
to the other DVD and BD media types, where it causes e.g. ISO
images to have trailing unclaimed blocks. Whether it is applied
automatically to BD-R depends on option --bdr_obs_exempt. .br Use
this option if there is the suspicion that DVD-R[W] DAO or BD-R
sessions abort with your kernel and/or DVD drive, if their size is
not a multiple of 16 blocks. .br This option may also get enabled
at compile time of libburn.
-bdr_obs_exempt
Exempt BD-R media from automatic unconditional transaction end
padding, provided that this padding is not requested by -obs_pad
and that no stream_recording is requested.
This is a new feature introduced with version 1.5.6. It might
become default in later versions.
modesty_on_drive=parameter[:parameters] modesty_on_drive=parameter[:parameters]
Control whether the drive buffer shall be kept from getting Control whether the drive buffer shall be kept from getting
completely filled. Parameter "on" (or "1") keeps the program from completely filled. Parameter "on" (or "1") keeps the program from
@ -616,8 +633,8 @@ use_immed_bit="on"|"off"|"default"
no progress indication. no progress indication.
It may depend on the operating system whether -use_immed_bit is set It may depend on the operating system whether -use_immed_bit is set
to "off" by default. to "off" by default.
write_start_address=value write_start_address=byte_offset
Set the block address on overwritable media where to start writing 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 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 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. BD. With formatted DVD-RW 32 kiB alignment is mandatory.
@ -876,7 +893,7 @@ for libburnia-project.org
10.2 Copyright 10.2 Copyright
============== ==============
Copyright (c) 2011 - 2021 Thomas Schmitt Copyright (c) 2011 - 2024 Thomas Schmitt
Permission is granted to distribute this text freely. It shall only be Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of xorriso. If you make 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 use of the license to derive modified versions of xorriso then you are
@ -901,6 +918,8 @@ File: xorrecord.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
[index] [index]
* Menu: * Menu:
* --bdr_obs_exempt write transaction end padding: NonCdrecord.
(line 92)
* --devices get list of drives: DriveAddr. (line 8) * --devices get list of drives: DriveAddr. (line 8)
* --drive_not_exclusive use drive even if busy: NonCdrecord. (line 12) * --drive_not_exclusive use drive even if busy: NonCdrecord. (line 12)
* --grow_overwriteable_iso emulate ISO 9660 multi-session: NonCdrecord. * --grow_overwriteable_iso emulate ISO 9660 multi-session: NonCdrecord.
@ -908,6 +927,7 @@ File: xorrecord.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* --multi_if_possible apply -multi if medium is suitable: NonCdrecord. * --multi_if_possible apply -multi if medium is suitable: NonCdrecord.
(line 57) (line 57)
* --no_rc do not execute xorriso startup files: NonCdrecord. (line 8) * --no_rc do not execute xorriso startup files: NonCdrecord. (line 8)
* --obs_pad write transaction end padding: NonCdrecord. (line 81)
* -atip inquire medium state: Inquire. (line 14) * -atip inquire medium state: Inquire. (line 14)
* -checkdrive inquire drive CD capabilities: Inquire. (line 11) * -checkdrive inquire drive CD capabilities: Inquire. (line 11)
* -dao explicitly set write type SAO/DAO: SetBurn. (line 172) * -dao explicitly set write type SAO/DAO: SetBurn. (line 172)
@ -919,7 +939,7 @@ File: xorrecord.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -inq inquire drive identifiers: Inquire. (line 8) * -inq inquire drive identifiers: Inquire. (line 8)
* -isosize obtain track size from ISO 9660 superblock: SetBurn. * -isosize obtain track size from ISO 9660 superblock: SetBurn.
(line 137) (line 137)
* -modesty_on_drive keep drive buffer hungry: NonCdrecord. (line 81) * -modesty_on_drive keep drive buffer hungry: NonCdrecord. (line 98)
* -msinfo retrieve multi-session info: Inquire. (line 43) * -msinfo retrieve multi-session info: Inquire. (line 43)
* -multi keep media appendable after burn run: SetBurn. (line 89) * -multi keep media appendable after burn run: SetBurn. (line 89)
* -nopad disable adding of bytes to end of track: SetBurn. (line 151) * -nopad disable adding of bytes to end of track: SetBurn. (line 151)
@ -941,13 +961,13 @@ File: xorrecord.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* minbuf= keep drive buffer hungry: SetBurn. (line 205) * minbuf= keep drive buffer hungry: SetBurn. (line 205)
* padsize= add bytes to end of track: SetBurn. (line 144) * padsize= add bytes to end of track: SetBurn. (line 144)
* speed= set write speed: SetBurn. (line 189) * speed= set write speed: SetBurn. (line 189)
* stdio_sync= control stdio buffer: NonCdrecord. (line 133) * stdio_sync= control stdio buffer: NonCdrecord. (line 150)
* stream_recording= try to get full speed on DVD-RAM, BD: NonCdrecord. * stream_recording= try to get full speed on DVD-RAM, BD: NonCdrecord.
(line 64) (line 64)
* tsize= set a fixed track size: SetBurn. (line 126) * tsize= set a fixed track size: SetBurn. (line 126)
* use_immed_bit= control use of Immed bit: NonCdrecord. (line 118) * use_immed_bit= control use of Immed bit: NonCdrecord. (line 135)
* write_start_address= set block address for write start: NonCdrecord. * write_start_address= set block address for write start: NonCdrecord.
(line 127) (line 144)
 
File: xorrecord.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top File: xorrecord.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
@ -959,7 +979,7 @@ File: xorrecord.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Menu: * Menu:
* Accessing drive, wait for stdin, -waiti: SetBurn. (line 113) * Accessing drive, wait for stdin, -waiti: SetBurn. (line 113)
* Blank, format, Immed bit, use_immed_bit=: NonCdrecord. (line 118) * Blank, format, Immed bit, use_immed_bit=: NonCdrecord. (line 135)
* Bugs, reporting: Bugreport. (line 6) * Bugs, reporting: Bugreport. (line 6)
* Data track, announce, -data: SetBurn. (line 157) * Data track, announce, -data: SetBurn. (line 157)
* Defect management, control, stream_recording=: NonCdrecord. (line 64) * Defect management, control, stream_recording=: NonCdrecord. (line 64)
@ -1002,6 +1022,9 @@ File: xorrecord.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Track size, obtain from ISO 9660, -isosize: SetBurn. (line 137) * Track size, obtain from ISO 9660, -isosize: SetBurn. (line 137)
* Track size, set fixed, tsize=: SetBurn. (line 126) * Track size, set fixed, tsize=: SetBurn. (line 126)
* Track, _definiton: Standards. (line 13) * Track, _definiton: Standards. (line 13)
* Transaction end padding, BD-R, -bdr_obs_exempt: NonCdrecord.
(line 92)
* Transaction end padding, enforce, -obs_pad: NonCdrecord. (line 81)
* Transaction size, set, dvd_obs=: NonCdrecord. (line 74) * Transaction size, set, dvd_obs=: NonCdrecord. (line 74)
* Tray, eject, -eject: SetBurn. (line 214) * Tray, eject, -eject: SetBurn. (line 214)
* Verbosity, increase, -v: Verbose. (line 16) * Verbosity, increase, -v: Verbose. (line 16)
@ -1009,14 +1032,14 @@ File: xorrecord.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Version, report, -version: Verbose. (line 8) * Version, report, -version: Verbose. (line 8)
* Write simulation , control, -dummy: SetBurn. (line 106) * Write simulation , control, -dummy: SetBurn. (line 106)
* Write start address, set, write_start_address=: NonCdrecord. * Write start address, set, write_start_address=: NonCdrecord.
(line 127) (line 144)
* Write type, SAO/DAO, -dao: SetBurn. (line 172) * Write type, SAO/DAO, -dao: SetBurn. (line 172)
* Write type, SAO/DAO, -sao: SetBurn. (line 168) * Write type, SAO/DAO, -sao: SetBurn. (line 168)
* Write type, TAO, -tao: SetBurn. (line 162) * Write type, TAO, -tao: SetBurn. (line 162)
* Write, buffer syncing, stdio_sync=: NonCdrecord. (line 133) * Write, buffer syncing, stdio_sync=: NonCdrecord. (line 150)
* Write, drive buffer, -immed: SetBurn. (line 208) * Write, drive buffer, -immed: SetBurn. (line 208)
* Write, drive buffer, minbuf=: SetBurn. (line 205) * Write, drive buffer, minbuf=: SetBurn. (line 205)
* Write, drive buffer, modesty_on_drive=: NonCdrecord. (line 81) * Write, drive buffer, modesty_on_drive=: NonCdrecord. (line 98)
* xorriso, mkisofs emulation: Xorriso. (line 6) * xorriso, mkisofs emulation: Xorriso. (line 6)
* xorriso, options: Options. (line 6) * xorriso, options: Options. (line 6)
@ -1034,21 +1057,21 @@ Node: Inquire7618
Node: SetBurn10487 Node: SetBurn10487
Node: Verbose21111 Node: Verbose21111
Node: NonCdrecord22661 Node: NonCdrecord22661
Node: Examples30471 Node: Examples31496
Node: ExDevices31132 Node: ExDevices32157
Node: ExMedium31350 Node: ExMedium32375
Node: ExBlank31613 Node: ExBlank32638
Node: ExFormat31834 Node: ExFormat32859
Node: ExDeformat32352 Node: ExDeformat33377
Node: ExIsoSingle32619 Node: ExIsoSingle33644
Node: ExIsoMulti32903 Node: ExIsoMulti33928
Node: ExIsoFly34647 Node: ExIsoFly35672
Node: ExAfio35839 Node: ExAfio36864
Node: Files36837 Node: Files37862
Node: Seealso37393 Node: Seealso38418
Node: Bugreport37756 Node: Bugreport38781
Node: Legal38347 Node: Legal39372
Node: CommandIdx39276 Node: CommandIdx40301
Node: ConceptIdx42839 Node: ConceptIdx44073
 
End Tag Table End Tag Table

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*- \input texinfo @c -*-texinfo-*-
@c %**start of header @c %**start of header
@setfilename xorrecord.info @setfilename xorrecord.info
@settitle GNU xorrecord 1.5.4 @settitle GNU xorrecord 1.5.7
@c %**end of header @c %**end of header
@c @c
@c man-ignore-lines begin @c man-ignore-lines begin
@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps @c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @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 .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRECORD 1 "Version 1.5.4, Jan 30, 2021" @c man .TH XORRECORD 1 "Version 1.5.7, Apr 19, 2024"
@c man .\" Please adjust this date whenever revising the manpage. @c man .\" Please adjust this date whenever revising the manpage.
@c man .\" @c man .\"
@c man .\" Some roff macros, for reference: @c man .\" Some roff macros, for reference:
@ -68,7 +68,7 @@
@copying @copying
xorrecord - Emulation of CD/DVD/BD program cdrecord by program xorriso xorrecord - Emulation of CD/DVD/BD program cdrecord by program xorriso
Copyright @copyright{} 2011 - 2021 Thomas Schmitt Copyright @copyright{} 2011 - 2023 Thomas Schmitt
@quotation @quotation
Permission is granted to distribute this text freely. Permission is granted to distribute this text freely.
@ -76,7 +76,7 @@ Permission is granted to distribute this text freely.
@end copying @end copying
@c man-ignore-lines end @c man-ignore-lines end
@titlepage @titlepage
@title Manual of GNU xorriso personality xorrecord 1.5.4 @title Manual of GNU xorriso personality xorrecord 1.5.7
@author Thomas Schmitt @author Thomas Schmitt
@page @page
@vskip 0pt plus 1filll @vskip 0pt plus 1filll
@ -85,7 +85,7 @@ Permission is granted to distribute this text freely.
@contents @contents
@ifnottex @ifnottex
@node Top @node Top
@top xorrecord 1.5.4 @top xorrecord 1.5.7
@c man-ignore-lines 1 @c man-ignore-lines 1
@c man .SH NAME @c man .SH NAME
@ -823,12 +823,38 @@ addresses below that number. Any number below 16s is the same as "off".
@item dvd_obs="default"|"32k"|"64k" @item dvd_obs="default"|"32k"|"64k"
@kindex dvd_obs= set write transaction payload size @kindex dvd_obs= set write transaction payload size
@cindex Transaction size, set, dvd_obs= @cindex Transaction size, set, dvd_obs=
Linux specific:
Set the number of bytes to be transmitted with each write operation to DVD Set the number of bytes to be transmitted with each write operation to DVD
or BD media. Tracks get padded up to the next multiple of this write or BD media. With most write types, tracks get padded up to the next
size. A number of 64 KB may improve throughput with bus systems which multiple of this write size (see option --obs_pad). A number of 64 KB may
show latency problems. The default depends on media type, option improve throughput with bus systems which show latency problems.
stream_recording=, and on compile time options. The default depends on media type, option stream_recording=, and on compile
time options.
@c man .TP
@item --obs_pad
@kindex --obs_pad write transaction end padding
@cindex Transaction end padding, enforce, --obs_pad
Pad the data of the last write operation of a DVD-R[W] DAO session, or BD-R
session, or stdio: pseudo-drive session up to the full size of an output chunk.
This padding has to be applied automatically to the other DVD and BD media
types, where it causes e.g. ISO images to have trailing unclaimed blocks.
Whether it is applied automatically to BD-R depends on option
@minus{}@minus{}bdr_obs_exempt.
.br
Use this option if there is the suspicion that DVD-R[W] DAO or BD-R sessions
abort with your kernel and/or DVD drive, if their size is not a multiple of
16 blocks.
.br
This option may also get enabled at compile time of libburn.
@c man .TP
@item --bdr_obs_exempt
@kindex --bdr_obs_exempt write transaction end padding
@cindex Transaction end padding, BD-R, --bdr_obs_exempt
Exempt BD-R media from automatic unconditional transaction end padding,
provided that this padding is not requested by --obs_pad and that
no stream_recording is requested.
@*
This is a new feature introduced with version 1.5.6. It might become default
in later versions.
@c man .TP @c man .TP
@item modesty_on_drive=parameter[:parameters] @item modesty_on_drive=parameter[:parameters]
@kindex -modesty_on_drive keep drive buffer hungry @kindex -modesty_on_drive keep drive buffer hungry
@ -889,10 +915,10 @@ formatting will show no progress indication.
It may depend on the operating system whether -use_immed_bit is set to "off" It may depend on the operating system whether -use_immed_bit is set to "off"
by default. by default.
@c man .TP @c man .TP
@item write_start_address=value @item write_start_address=byte_offset
@kindex write_start_address= set block address for write start @kindex write_start_address= set block address for write start
@cindex Write start address, set, write_start_address= @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, 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. but better is 32 kiB on DVD and 64 kiB on BD.
With formatted DVD-RW 32 kiB alignment is mandatory. With formatted DVD-RW 32 kiB alignment is mandatory.
@ -1197,7 +1223,7 @@ Thomas Schmitt <scdbackup@@gmx.net>
for libburnia-project.org for libburnia-project.org
@c man .SH COPYRIGHT @c man .SH COPYRIGHT
@section Copyright @section Copyright
Copyright (c) 2011 - 2021 Thomas Schmitt Copyright (c) 2011 - 2024 Thomas Schmitt
@* @*
Permission is granted to distribute this text freely. It shall only be 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 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 .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH XORRISO-TCLTK 1 "Version 1.5.4, Jan 30, 2021" .TH XORRISO-TCLTK 1 "Version 1.5.7, Jun 07, 2023"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -119,7 +119,7 @@ Thomas Schmitt <scdbackup@gmx.net>
.br .br
for libburnia\-project.org for libburnia\-project.org
.SH COPYRIGHT .SH COPYRIGHT
Copyright (c) 2011 \- 2021 Thomas Schmitt Copyright (c) 2011 \- 2023 Thomas Schmitt
.br .br
Permission is granted to distribute this text freely. It shall only be Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of xorriso\-tcltk. modified in sync with the technical properties of xorriso\-tcltk.

Binary file not shown.

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*- \input texinfo @c -*-texinfo-*-
@c %**start of header @c %**start of header
@setfilename xorriso-tcltk.info @setfilename xorriso-tcltk.info
@settitle GNU xorriso-tcltk 1.5.4 @settitle GNU xorriso-tcltk 1.5.7
@c %**end of header @c %**end of header
@c @c
@c man-ignore-lines begin @c man-ignore-lines begin
@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps @c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @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 .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO-TCLTK 1 "Version 1.5.4, Jan 30, 2021" @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 .\" Please adjust this date whenever revising the manpage.
@c man .\" @c man .\"
@c man .\" Some roff macros, for reference: @c man .\" Some roff macros, for reference:
@ -68,7 +68,7 @@
@copying @copying
xorriso-tcltk - Educational GUI frontend for xorriso xorriso-tcltk - Educational GUI frontend for xorriso
Copyright @copyright{} 2011 - 2021 Thomas Schmitt Copyright @copyright{} 2011 - 2023 Thomas Schmitt
@quotation @quotation
Permission is granted to distribute this text freely. Permission is granted to distribute this text freely.
@ -76,7 +76,7 @@ Permission is granted to distribute this text freely.
@end copying @end copying
@c man-ignore-lines end @c man-ignore-lines end
@titlepage @titlepage
@title Manual of GNU xorriso frontend xorriso-tcltk 1.5.4 @title Manual of GNU xorriso frontend xorriso-tcltk 1.5.7
@author Thomas Schmitt @author Thomas Schmitt
@page @page
@vskip 0pt plus 1filll @vskip 0pt plus 1filll
@ -85,7 +85,7 @@ Permission is granted to distribute this text freely.
@contents @contents
@ifnottex @ifnottex
@node Top @node Top
@top xorriso-tcltk 1.5.4 @top xorriso-tcltk 1.5.7
@c man-ignore-lines 1 @c man-ignore-lines 1
@c man .SH NAME @c man .SH NAME
@ -237,7 +237,7 @@ Thomas Schmitt <scdbackup@@gmx.net>
for libburnia-project.org for libburnia-project.org
@c man .SH COPYRIGHT @c man .SH COPYRIGHT
@section Copyright @section Copyright
Copyright (c) 2011 - 2021 Thomas Schmitt Copyright (c) 2011 - 2023 Thomas Schmitt
@* @*
Permission is granted to distribute this text freely. It shall only be Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of xorriso-tcltk. modified in sync with the technical properties of xorriso-tcltk.

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH XORRISO 1 "Version 1.5.4, Jan 30, 2021" .TH XORRISO 1 "Version 1.5.7, May 12, 2024"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -191,6 +191,14 @@ They can be made unformatted by \-blank "deformat".
.br .br
Regular files and block devices are handled as overwritable media. Regular files and block devices are handled as overwritable media.
Pipes and other writeable file types are handled as blank multi\-session media. Pipes and other writeable file types are handled as blank multi\-session media.
.br
The program growisofs formats by default BD\-R to be pseudo\-overwritable (POW).
xorriso will classify them as
.br
Media current: is unsuitable , is POW formatted
.br
and will refuse to write to them or to obtain multi\-session information from
them.
.PP .PP
These media can assume several states in which they offer different These media can assume several states in which they offer different
capabilities. capabilities.
@ -306,9 +314,9 @@ the path of their block device or of their generic character device. E.g.
.br .br
By default xorriso will try to map the given address to /dev/hd* and /dev/sr*. By default xorriso will try to map the given address to /dev/hd* and /dev/sr*.
The command \-scsi_dev_family can redirect the mapping from sr to scd or sg. The command \-scsi_dev_family can redirect the mapping from sr to scd or sg.
The latter does not suffer from the concurrency problems which plague /dev/sr The latter does not suffer from the concurrency problems which plagued /dev/sr
of Linux kernels since version 3. But it does not yield the same addresses of Linux kernels since version 3 up to 5.5. But it does not yield the same
which are used by mount(8) or by open(2) for read(2). addresses which are used by mount(8) or by open(2) for read(2).
.br .br
On FreeBSD the device files have names like On FreeBSD the device files have names like
.br .br
@ -492,6 +500,10 @@ given as program arguments and command
\fB\-x\fR \fB\-x\fR
is among them. is among them.
.br .br
The list of all current settings can be inquired by command \-status "long".
Command \-status "short" lists a handful of fundamental settings and all
settings which are not default at program start.
.PP
Commands consist of a command word, Commands consist of a command word,
followed by zero or more parameter words. If the list of parameter words followed by zero or more parameter words. If the list of parameter words
is of variable length (indicated by "[...]" or "[***]") then it must be is of variable length (indicated by "[...]" or "[***]") then it must be
@ -997,9 +1009,8 @@ Mode "any" processes attributes of all namespaces. This might need
administrator privileges, even if the owner of the disk file tries to read or administrator privileges, even if the owner of the disk file tries to read or
write the attributes. write the attributes.
.br .br
Note that xattr from namespace "isofs." are never read from disk or restored Note that it is not possible to set xattr of namespace "isofs." by xorriso
to disk. Further it is not possible to set them via xorriso xattr manipulation xattr manipulation commands.
commands.
.TP .TP
\fB\-md5\fR "on"|"all"|"off"|"load_check_off" \fB\-md5\fR "on"|"all"|"off"|"load_check_off"
Enable or disable processing of MD5 checksums for the overall session and for Enable or disable processing of MD5 checksums for the overall session and for
@ -1381,14 +1392,17 @@ iso_rr_paths are derived by exchanging disk_prefix by iso_rr_prefix before
pattern expansion happens. The current \-cdi directory has no influence. pattern expansion happens. The current \-cdi directory has no influence.
.TP .TP
\fB\-cut_out\fR disk_path byte_offset byte_count iso_rr_path \fB\-cut_out\fR 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 Map a byte interval of a regular disk file or of a device file into a regular
image. file in the ISO image. The file depicted by disk_path has to support random
This may be necessary if the disk file is larger than a single medium, or if read access. A symbolic link will only work if enabled by \-follow "link" or
it exceeds the traditional limit of 2 GiB \- 1 for old operating systems, "param".
or the limit of 4 GiB \- 1 for newer ones. Only the newest Linux kernels
seem to read properly files >= 4 GiB \- 1.
.br .br
A clumsy remedy for this limit is to backup file pieces and to concatenate Cutting out a byte interval may be necessary if the disk file is larger than
a single medium, or if it exceeds the traditional limit of 2 GiB \- 1 for old
operating systems, or the limit of 4 GiB \- 1 for newer ones. Contemporary
Linux kernels are able to read properly files >= 4 GiB \- 1.
.br
A clumsy remedy for such limits is to backup file pieces and to concatenate
them at restore time. A well tested chopping size is 2047m. them at restore time. A well tested chopping size is 2047m.
It is permissible to request a higher byte_count than available. The It is permissible to request a higher byte_count than available. The
resulting file will be truncated to the correct size of a final piece. resulting file will be truncated to the correct size of a final piece.
@ -1408,12 +1422,23 @@ E.g:
.br .br
/file/part_3_of_3_at_4094m_with_2047m_of_5753194821 /file/part_3_of_3_at_4094m_with_2047m_of_5753194821
.br .br
If the directory /file does no yet exist, then its permissions are not taken
from directory /my/disk but rather from /my/disk/file with additional
x\-permission for those who have r\-permission.
.br
While command \-split_size is set larger than 0, and if all pieces of a file While command \-split_size is set larger than 0, and if all pieces of a file
reside in the same ISO directory with no other files, and if the names look reside in the same ISO directory with no other files, and if the names look
like above, then their ISO directory will be recognized and handled like a like above, then their ISO directory will be recognized and handled like a
regular file. This affects commands \-compare*, \-update*, and overwrite regular file. This affects commands \-compare*, \-update*, and overwrite
situations. situations.
.br
See command \-split_size for details. See command \-split_size for details.
.br
Another use case is copying the content of a device file as interval or as
a whole into the emerging ISO filesystem. The fact that the byte_count is
allowed to be unreasonably high enables copying of a whole device:
.br
\-cut_out /dev/sdd3 0 1000g /content_of_sdd3
.TP .TP
\fB\-cpr\fR disk_path [***] iso_rr_path \fB\-cpr\fR disk_path [***] iso_rr_path
Insert the given files or directory trees from filesystem Insert the given files or directory trees from filesystem
@ -1490,10 +1515,13 @@ the target filesystem of an \-extract must be able to take the file size.
\fB\-not_mgt\fR code[:code[...]] \fB\-not_mgt\fR code[:code[...]]
Control the behavior of the exclusion lists. Control the behavior of the exclusion lists.
.br .br
Exclusion processing happens before disk_paths get mapped to the ISO image Exclusion processing happens before disk_paths get mapped to the ISO image,
and before disk files get compared with image files. before disk files get compared with image files, and before image files get
The absolute disk path of the source is matched against the \-not_paths list. extracted to disk files.
The leafname of the disk path is matched against the patterns in the \-not_leaf .br
The absolute disk paths involved in such an action are matched against the
\-not_paths list.
The leafnames of disk paths are matched against the patterns in the \-not_leaf
list. If a match is detected then the disk path will not be regarded as an list. If a match is detected then the disk path will not be regarded as an
existing file and not be added to the ISO image. existing file and not be added to the ISO image.
.br .br
@ -1534,6 +1562,13 @@ path is relative, then the current \-cdx is prepended to form an absolute path.
Pattern matching, if enabled, happens at definition time and not when exclusion Pattern matching, if enabled, happens at definition time and not when exclusion
checks are made. checks are made.
.br .br
Keep in mind that there may be alternative paths to the same disk file. The
exclusion tests are done literally, so that they do not keep files from getting
into the ISO filesystem by other paths. Accordingly an exclusion does not
prevent a disk file from being overwritten by file extraction via an
alternative not excluded path. So the exclusions need to be coordinated with
the actual disk_path parameters given with commands.
.br
(Do not forget to end the list of disk_paths by "\-\-") (Do not forget to end the list of disk_paths by "\-\-")
.TP .TP
\fB\-not_leaf\fR pattern \fB\-not_leaf\fR pattern
@ -1551,10 +1586,10 @@ handled as one parameter for \-not_paths or \-not_leaf.
.TP .TP
\fB\-follow\fR occasion[:occasion[...]] \fB\-follow\fR occasion[:occasion[...]]
Enable or disable resolution of symbolic links and mountpoints under Enable or disable resolution of symbolic links and mountpoints under
disk_paths. This applies to actions \-add, \-du*x, \-ls*x, \-findx, \-concat, disk_paths. This applies to actions \-add, \-cut_out, \-du*x, \-ls*x, \-findx,
and to \-disk_pattern expansion. \-concat, and to \-disk_pattern expansion.
.br .br
There are three kinds of follow decisison to be made: There are three main kinds of follow decisison to be made:
.br .br
\fBlink\fR is the hop from a symbolic link to its target file object for the \fBlink\fR is the hop from a symbolic link to its target file object for the
purpose of reading. I.e. not for command \-concat. purpose of reading. I.e. not for command \-concat.
@ -1579,7 +1614,7 @@ expansion).
If enabled then \-ls*x will show the link targets rather than the links If enabled then \-ls*x will show the link targets rather than the links
themselves. \-du*x, \-findx, and \-add will process the link targets but not themselves. \-du*x, \-findx, and \-add will process the link targets but not
follow links in an eventual directory tree below the targets (unless "link" follow links in an eventual directory tree below the targets (unless "link"
is enabled). is enabled). \-cut_out will process link targets.
.br .br
Occasions can be combined in a colon separated list. All occasions Occasions can be combined in a colon separated list. All occasions
mentioned in the list will then lead to a positive follow decision. mentioned in the list will then lead to a positive follow decision.
@ -1660,6 +1695,9 @@ FAILURE event.
A well tested \-split_size is 2047m. Sizes above \-file_size_limit are not A well tested \-split_size is 2047m. Sizes above \-file_size_limit are not
permissible. permissible.
.br .br
The newly created ISO directory inherits its permissions from the data file
with additional x\-permission for those who have r\-permission.
.br
While command \-split_size is set larger than 0 such a directory with split While command \-split_size is set larger than 0 such a directory with split
file pieces will be recognized and handled like a regular file by commands file pieces will be recognized and handled like a regular file by commands
\-compare* , \-update*, and in overwrite situations. There are \-osirrox \-compare* , \-update*, and in overwrite situations. There are \-osirrox
@ -1989,6 +2027,33 @@ and "Xotic" which matches what is not matched by the other types.
.br .br
Only the first letter is interpreted. E.g.: \-find / \-type d Only the first letter is interpreted. E.g.: \-find / \-type d
.br .br
\fB\-size\fR [+-][=]number[cwbdksmg] :
Matches files with matching relation to the given size number.
.br
The prefix defines the desired relation:
.br
No prefix or prefix "=" means: File must have exactly the given size.
.br
Prefix "+" means: File must be larger than given size.
.br
Prefix "+=" means: File must be larger than or equal to given size limit.
.br
Prefix "\-" means: File must be smaller than given size limit.
.br
Prefix "\-=" means: File must be smaller than or equal to given size limit.
.br
Suffixes are peculiar to stay compatible with program "find":
.br
No suffix means blocks of 512 bytes, "c" means single bytes, "w" means 2 bytes,
"b" means 512 bytes.
The suffixes "k", "M", and "G" mean 1024, 1024k, and 1024M respectively.
As usual with xorriso, the suffixes "d" and "s" mean 512 and 2048 and all
suffixes are recognized as both, uppercase and lowercase letters.
.br
E.g. match files of 4 GiB or larger:
.br
\-size +=4g
.br
\fB\-maxdepth\fR number : \fB\-maxdepth\fR number :
Matches only files which are at most at the given depth level relative to Matches only files which are at most at the given depth level relative to
the iso_rr_path where \-find starts. That path itself is at depth 0, its the iso_rr_path where \-find starts. That path itself is at depth 0, its
@ -2721,6 +2786,10 @@ A number without "+" gives the overall number of bytes. In any case the result
may not be smaller than "new". Numbers may have a unit suffix: "d"=512, may not be smaller than "new". Numbers may have a unit suffix: "d"=512,
"k"=1024, "s"=2048, "m"=1024k, "g"=1024m. "k"=1024, "s"=2048, "m"=1024k, "g"=1024m.
.br .br
Normally the volume descriptors at block 16 ff. have to be readable. Only with
entity "lba" or "sbsector" and adjust mode "new" it is possible to address
a session if block 16 ff. yields no valid volume descriptors.
.br
Examples: Examples:
.br .br
Activate session 4 and enable overwriting of the blocks of younger sessions: Activate session 4 and enable overwriting of the blocks of younger sessions:
@ -2886,7 +2955,7 @@ Both words then stem from a reserved subset of UCS\-2.
.br .br
"rec_mtime" records with non\-RockRidge directory entries the disk file's "rec_mtime" records with non\-RockRidge directory entries the disk file's
mtime and not the creation time of the image. This applies to the ECMA\-119 mtime and not the creation time of the image. This applies to the ECMA\-119
tree (plain ISO 9660), to Joliet, and to ISO 9660:1999. "rec_time" is tree (plain ISO 9660), to Joliet, and to ISO 9660:1999. "rec_mtime" is
default. If disabled, it gets automatically re\-enabled by \-as mkisofs emulation default. If disabled, it gets automatically re\-enabled by \-as mkisofs emulation
when a pathspec is encountered. when a pathspec is encountered.
.br .br
@ -2911,11 +2980,36 @@ do not understand Rock Ridge.
of [0,31] to files with no own data content. The new way is to have of [0,31] to files with no own data content. The new way is to have
a dedicated block to which all such files will point. a dedicated block to which all such files will point.
.br .br
"max_ce_entries="number sets the maximum number of SUSP CE entries and thus
continuation areas. Each continuation area can hold at most 2048 bytes of
SUSP data (Rock Ridge or AAIP). The first area can be smaller. There might
be some waste at the end of each area.
When the maximum number is exceeded during ISO filesystem production
then either xattr and ACL get dropped from the affected file or an error
gets reported and image production is prevented.
.br
Linux silently ignores a file when encountering its 32th CE entry.
(Workaround is to mount the filesystem with option "norock".)
So the default setting is 31. Minimum is 1, maximum is 100000.
If a limit higher than 31 is chosen and 31 gets surpassed, then a warning
message gets reported.
.br
"max_ce_drop="mode sets the behavior when the limit of max_ce_entries= is
surpassed. Mode "off" causes an error message and prevents image production.
Mode "xattr" and "xattr_acl" report a warning, delete from the affected
file all xattr of namespaces other than "isofs", and then try again.
If this still surpasses the limit, then mode "xattr_acl" deletes all ACL from
the file and retries.
If this still surpasses the limit, then an error message gets reported and
image production is prevented.
.br
Default setting is Default setting is
.br .br
"clear:only_iso_version:deep_paths:long_paths:no_j_force_dots: "clear:iso_9660_level=3:only_iso_version:deep_paths:long_paths:
.br .br
always_gmt:old_rr". no_j_force_dots:always_gmt:rec_mtime:old_rr:max_ce_entries=31:
.br
max_ce_drop=xattr_acl"
.br .br
Note: The term "ECMA\-119 name" means the plain ISO 9660 names and attributes Note: The term "ECMA\-119 name" means the plain ISO 9660 names and attributes
which get visible if the reader ignores Rock Ridge. which get visible if the reader ignores Rock Ridge.
@ -3230,12 +3324,28 @@ in order to set an own address limit.
"data" causes full speed to start when superblock and directory entries are "data" causes full speed to start when superblock and directory entries are
written and writing of file content blocks begins. written and writing of file content blocks begins.
.TP .TP
\fB\-dvd_obs\fR "default"|"32k"|"64k" \fB\-dvd_obs\fR "default"|"32k"|"64k"|"obs_pad"|"bdr_obs_exempt"
GNU/Linux specific: GNU/Linux specific:
Set the number of bytes to be transmitted with each write operation to DVD Set the number of bytes to be transmitted with each write operation to DVD
or BD media. A number of 64 KB may improve throughput with bus systems which or BD media. A number of 64 KB may improve throughput with bus systems which
show latency problems. The default depends on media type, on command show latency problems. The default depends on media type, on command
\-stream_recording , and on compile time options. \-stream_recording , and on compile time options.
.br
On all systems:
"obs_pad" pads the data of the last write operation of a DVD\-R[W] DAO session
or BD\-R session up to the full size of an output chunk.
This padding has to be applied automatically to the other DVD and BD media
types, where it causes e.g. ISO images to have trailing unclaimed blocks.
Whether it is applied automatically to BD\-R depends on "bdr_obs_exempt".
"obs_pad" can be disabled by "no_obs_pad".
.br
"bdr_obs_exempt" exempts BD\-R media from automatic unconditional transaction
end padding, provided that this padding is not requested by "obs_pad" and that
no stream_recording is requested. "bdr_obs_exempt" can be disabled by
"no_obs_exempt".
.br
This is a new feature introduced with version 1.5.6. It might become default
in later versions.
.TP .TP
\fB\-modesty_on_drive\fR parameter[:parameters] \fB\-modesty_on_drive\fR parameter[:parameters]
Control whether the drive buffer shall be kept from getting completely filled. Control whether the drive buffer shall be kept from getting completely filled.
@ -3482,10 +3592,12 @@ and to write the loaded system area content without alterations.
\fBdiscard\fR gives up the El Torito boot catalog and its boot images. \fBdiscard\fR gives up the El Torito boot catalog and its boot images.
regardless whether loaded from an ISO filesystem or defined by commands. regardless whether loaded from an ISO filesystem or defined by commands.
Any BIOS or EFI related boot options get revoked. Any BIOS or EFI related boot options get revoked.
Nevertheless, loaded system area data stay valid. If desired, they have to be Nevertheless, loaded system area data and the possibly defined appended
erased by partitions stay valid. If desired, they have to be erased by
.br .br
\-boot_image any system_area=/dev/zero \-boot_image any system_area=/dev/zero
.br
\-append_partition all revoke \-
.br .br
\fBkeep\fR keeps or copies El Torito boot images unaltered and writes a new catalog. \fBkeep\fR keeps or copies El Torito boot images unaltered and writes a new catalog.
.br .br
@ -3506,23 +3618,59 @@ 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 \fBreplay\fR is a more modern version of "patch", which not only cares
for existing El Torito boot equipment but also for the recognizable for existing El Torito boot equipment but also for the recognizable
boot provisions in the System Area. It discards any existing \-boot_image 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 .br
This action will only succeed if the file objects mentioned in the Special care has to be taken with manipulations of files in the emerging ISO
output of command \-report_el_torito "cmd" are still available. Do not filesystem which are mentioned by \-report_el_torito "cmd". Their paths are
remove or rename boot image files after \-indev. memorized at ISO image load time.
In general \-boot_image "any" "replay" should be applied after all file
manipulations are done. All file paths from the \-report_el_torito commands
must then still lead to data files which are suitable for their respective
commands.
.br .br
Drop unknown El Torito: \-boot_image "any" "discard" The effects of file path changes after \-boot_image "any" "replay" can be
surprising. E.g. removing or replacing a boot image with boot info table
for legacy BIOS leads to a hidden boot image with the content as it was at
"replay" time. Doing the same with a boot image for EFI leads to an error
at \-commit time or to the new file content becomming the EFI boot image.
.br .br
Maintain recognizable stuff: \-boot_image "any" "replay" Out of historical reasons \fBreplay\fR does not revoke all possibly made
.br \-append_partition settings but only overwrites those for which the loaded
El Torito only for GRUB: \-boot_image "grub" "patch" ISO image provides candidates.
.br
El Torito only for ISOLINUX: \-boot_image "isolinux" "patch"
.br .br
\fBshow_status\fR will print what is known about the loaded boot images \fBshow_status\fR will print what is known about the loaded boot images
and their designated fate. and their designated fate.
.br .br
Examples:
.br
Drop 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 A \fBbootspec\fR is a word of the form name=value. It is used to describe
the parameters of a boot feature. the parameters of a boot feature.
@ -3619,13 +3767,27 @@ which can be used to boot from USB stick or hard disk.
Other than an El Torito boot image, the file disk_path needs not to be added Other than an El Torito boot image, the file disk_path needs not to be added
to the ISO image. to the ISO image.
.br .br
In multi\-session situations the existing System Area is preserved by default.
In in this case, the special disk_path "." prevents reading of
a disk file but nevertheless causes adjustments in the
loaded system area data. Such adjustments may get ordered by \-boot_image
commands.
.br
Special "system_area=/dev/zero" causes 32k of 0\-bytes.
Use this to e.g. discard partition tables which were loaded with the ISO image.
.br
This setting is the default with the write method of Modifying, when \-indev
and \-outdev are both used and not the same drive. If you indeed need to copy
the unchanged system area from \-indev to \-outdev, use
"system_area=\-\-interval:imported_iso:0s\-15s::" , which was the default in older
versions of xorriso.
.br
\fB\-boot_image isolinux system_area=\fR implies "partition_table=on". \fB\-boot_image isolinux system_area=\fR implies "partition_table=on".
In this case, the disk path should lead to one of the SYSLINUX files In this case, the disk path should lead to one of the SYSLINUX files
isohdp[fp]x*.bin or to a file which was derived from one of those files. isohdp[fp]x*.bin or to a file which was derived from one of those files.
E.g. to the first 512 bytes from an ISOLINUX isohybrid ISO image. E.g. to the first 512 bytes from an ISOLINUX isohybrid ISO image.
.br .br
In this case, El Torito boot images (dir=, bin_path=, efi_path=) El Torito boot images (dir=, bin_path=, efi_path=) may then be augmented by
may be augmented by
\fBisolinux partition_entry=gpt_basdat\fR \fBisolinux partition_entry=gpt_basdat\fR
or \fBisolinux partition_entry=gpt_hfsplus\fR, or \fBisolinux partition_entry=gpt_hfsplus\fR,
and by \fBisolinux partition_entry=apm_hfsplus\fR. and by \fBisolinux partition_entry=apm_hfsplus\fR.
@ -3635,12 +3797,6 @@ The first three GPT partitions will also be marked by MBR partitions. The
MBR partition of type 0xEF is what actually is used by EFI firmware for MBR partition of type 0xEF is what actually is used by EFI firmware for
booting from USB stick. booting from USB stick.
.br .br
In multi\-session situations the existing System Area is preserved by default.
In in this case, the special disk_path "." prevents reading of
a disk file but nevertheless causes adjustments in the
loaded system area data. Such adjustments may get ordered by \-boot_image
commands.
.br
\fB\-boot_image any gpt_disk_guid=\fRvalue controls whether an emerging GPT \fB\-boot_image any gpt_disk_guid=\fRvalue controls whether an emerging GPT
shall get a randomly generated disk GUID or whether the GUID is supplied by shall get a randomly generated disk GUID or whether the GUID is supplied by
the user. the user.
@ -3708,12 +3864,10 @@ In this case the existing System Area gets checked whether it bears addresses
and sizes as if it had been processed by "partition_table=on". If so, and sizes as if it had been processed by "partition_table=on". If so,
then those parameters get updated when the new System Area is written. then those parameters get updated when the new System Area is written.
.br .br
Special "system_area=/dev/zero" causes 32k of NUL\-bytes.
Use this to discard an MBR which was loaded with the ISO image.
.br
\fBappended_part_as=gpt\fR marks partitions from \-append_partition \fBappended_part_as=gpt\fR marks partitions from \-append_partition
in GPT rather than in MBR. In this case the MBR shows a single partition in GPT rather than in MBR. In this case the MBR shows a single partition
of type 0xee which covers the whole output data. of type 0xee which covers the whole output data.
The number of appendable partitions with GPT is 8 rather than 4 with MBR.
.br .br
\fBappended_part_as=mbr\fR is the default. Appended partitions get \fBappended_part_as=mbr\fR is the default. Appended partitions get
marked in GPT only if GPT is produced because of other settings. marked in GPT only if GPT is produced because of other settings.
@ -3721,7 +3875,8 @@ If given explicitly, this clears setting "gpt" and "apm". Nevertheless "apm"
may be added to "mbr". may be added to "mbr".
.br .br
\fBappended_part_as=apm\fR marks partitions from \-append_partition in APM \fBappended_part_as=apm\fR marks partitions from \-append_partition in APM
additionally to "mbr" or "gpt". additionally to "mbr" or "gpt". The partition number in APM will not be
influenced by \-append_partition parameter partition_number.
.br .br
By default, appended partitions get marked in APM only if APM is By default, appended partitions get marked in APM only if APM is
produced because of other options together with part_like_isohybrid="on". produced because of other options together with part_like_isohybrid="on".
@ -3802,6 +3957,18 @@ If no bootable MBR is indicated and a partition gets created by
\-append_partition, then mbr_force_bootable="on" causes a bootflag like it \-append_partition, then mbr_force_bootable="on" causes a bootflag like it
would do with a bootable MBR. would do with a bootable MBR.
.br .br
\fBgpt_iso_bootable=\fRon causes bit 2 of the GPT partition flags to be
set for the ISO 9660 partition if such a GPT partition emerges. This bit is
specified as "Legacy BIOS bootable" but its true significance is unclear.
Some GPT\-aware BIOS might want to see it in some partition. Mode "off"
revokes this setting.
.br
\fBgpt_iso_not_ro=\fRon causes bit 60 of the GPT partition flags to be not
set for the ISO 9660 partition if such a GPT partition emerges. This bit is
specified as "Read\-only" and thus appropriate. But it is unusual in GPT disk
partitions. Mode "off" revokes this setting and causes the read\-only bit to be
set.
.br
\fBmips_path=\fRiso_rr_path declares a data file in the image to be a \fBmips_path=\fRiso_rr_path declares a data file in the image to be a
MIPS Big Endian boot file and causes production of a MIPS Big Endian Volume MIPS Big Endian boot file and causes production of a MIPS Big Endian Volume
Header. This is mutually exclusive with production of other boot blocks Header. This is mutually exclusive with production of other boot blocks
@ -3852,8 +4019,8 @@ DEC Alpha SRM Secondary Bootstrap Loader and causes production of a boot sector
which points to it. which points to it.
This is mutually exclusive with production of other boot blocks like MBR. This is mutually exclusive with production of other boot blocks like MBR.
.br .br
\fBmips_discard\fR, \fBsparc_discard\fR, \fBhppa_discard\fR, \fBmips_discard\fR, \fBmipsel_discard\fR, \fBsparc_discard\fR,
\fBalpha_discard\fR \fBhppa_discard\fR, \fBalpha_discard\fR
revoke any boot file declarations made for mips/mipsel, sparc, hppa, revoke any boot file declarations made for mips/mipsel, sparc, hppa,
or alpha, respectively. or alpha, respectively.
This removes the ban on production of other boot blocks. This removes the ban on production of other boot blocks.
@ -3884,9 +4051,11 @@ of the cylinder size.
Beware of subsequent multi\-session runs. The appended partition will get Beware of subsequent multi\-session runs. The appended partition will get
overwritten. overwritten.
.br .br
Partitions may be appended with boot block type MBR and with SUN Disk Label. Partitions may be appended with partition table types MBR, GPT, and
SUN Disk Label. Additionally to MBR and GPT it is possible to have them
marked in APM.
.br .br
With MBR: With \fBMBR\fR:
.br .br
partition_number may be 1 to 4. Number 1 will put the whole ISO image into partition_number may be 1 to 4. Number 1 will put the whole ISO image into
the unclaimed space before partition 1. So together with most \fBxorriso\fR the unclaimed space before partition 1. So together with most \fBxorriso\fR
@ -3906,19 +4075,49 @@ In APM, 48465300\-0000\-11AA\-AA11\-00306543ECAC will be mapped to partition
type "Apple_HFS", any other to "Data". type "Apple_HFS", any other to "Data".
.br .br
If some other command causes the production of GPT, then the appended If some other command causes the production of GPT, then the appended
partitions will be mentioned there too. partitions will be mentioned there too.
.br .br
The disk_path must provide the necessary data bytes at commit time. \fBGPT\fR can be forced by
An empty disk_path disables this feature for the given partition number.
.br .br
With SUN Disk Label (selected by \-boot_image any sparc_label=): \-boot_image "any" "appended_part_as=gpt"
.br
partition_number may be 1 to 8. But other than with MBR partitions it is not
guaranteed that the resulting GPT partition will have this number.
.br
More important than the desired partition number will be that the resulting
ISO filesystem is covered gaplessly with GPT table and its partitions and that
the partitions in the table are sorted by block address. If partition_number is
higher than the number of preceding partitions, then the appropriate number of
empty partition entries is inserted to achieve the desired partition_number.
If the number of preceding partitions is too high, then a NOTE message informs
about the inability to achieve partition_number and about the actually assigned
number.
.br
The type_code may be the same as described with MBR. Given GUIDs are used
unchanged. Given MBR partition types get translated. 0xef becomes
C12A7328\-F81F\-11D2\-BA4B\-00A0C93EC93B, others become
EBD0A0A2\-B9E5\-4433\-87C0\-68B6B72699C7.
.br
\fBSUN Disk Label\fR is chosen by \-boot_image any sparc_label=.
.br .br
partition_number may be 2 to 8. Number 1 will always be the ISO image. 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 Partition start addresses are aligned to 320 KiB. The type_code does not
matter. Submit 0x0. matter. Submit 0x0.
.br .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. 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 .TP
.B Jigdo Template Extraction: .B Jigdo Template Extraction:
.PP .PP
@ -4374,6 +4573,48 @@ summary of drive state and medium content is printed.
As further difference to \-toc, this command does not emit FAILURE events As further difference to \-toc, this command does not emit FAILURE events
if the desired drive is not acquired. if the desired drive is not acquired.
.TP .TP
\fB\-assess_indev_features\fR "plain"|"cmd"|"as_mkisofs"|"replay"
Inspect the filesystem on \-indev for the presence of Rock Ridge, Joliet, or
ISO 9660:1999, and for traces of other write options which seem to have been
used when the filesystem was created.
.br
Note that this command does not detect and report a possibly present HFS+ tree.
.br
Mode "cmd" lists xorriso commands which would activate the detected settings.
.br
Mode "as_mkisofs" lists options of the \-as mkisofs emulation, which would
activate those of the detected settings which are not default.
.br
Mode "replay" performs the commands which get listed by mode "cmd".
.br
Mode "plain" lists after a "Indev feature: " header name\-value pairs as
delivered by libisofs function iso_read_image_feature_named(). See libisofs.h.
The other modes derive their output from this list. I.e. the sequence of
commands from "cmd" follows the sequence of "plain".
.br
Not leading to "cmd" lines are:
.br
"size=" tells the number of 2048 byte blocks of the filesystem.
.br
"eltorito=1" tells that El Torito boot equipment was detected.
.br
"tree_loaded=" tells which tree was loaded by \-indev:
.br
0 = ISO 9660 , 1 = Joliet , 2 = ISO 9660:1999
.br
"tree_loaded_text=" tells the same by name: "ISO9660", "Joliet", "ISO9660:1999"
.br
"rr_loaded=1" tells that Rock Ridge information was loaded with the tree.
.br
"aaip=1" tells that AAIP information was detected (ACL, xattr, MD5, ...).
.br
"relaxed_vol_atts=1" tells that the volume attributes like \-volid or
\-preparer_id bear characters outside the restricted character sets which are
specified for them by ECMA\-119.
.br
"rrip_1_10_px_ino=1" tells that with Rock Ridge 1.10 a PX entry was found which
looks like from Rock Ridge 1.12.
.TP
\fB\-mount_cmd\fR drive entity id path \fB\-mount_cmd\fR drive entity id path
Emit an appropriate command line for mounting the ISO session Emit an appropriate command line for mounting the ISO session
indicated by drive, entity and id. indicated by drive, entity and id.
@ -4478,6 +4719,19 @@ Mode \fBas_mkisofs\fR tries to print the \fBxorriso \-as mkisofs\fR
options, which are necessary to produce the found equipment. options, which are necessary to produce the found equipment.
The intended use case is to use the mounted filesystem as input tree The intended use case is to use the mounted filesystem as input tree
together with the printed options. together with the printed options.
.br
If CHRP equipment is detected, then modes \fBcmd\fR and \fBas_mkisofs\fR
issue some of the relaxation commands or options which get detected by
command \fB\-assess_indev_features\fR. This happens because CHRP firmware
reads file paths from file /ppc/bootinfo.txt and tries to find them
case\-insensitively in the ECMA\-119 tree without using Rock Ridge. If such a
path has actually forbidden properties, like the name "powerpc\-ieee1275", then
the relaxations are needed to bring it unmangled into the ECMA\-119 tree.
.br
It is important to keep in mind that the file paths shown in the report lines
and commands were registered directly after image loading. Possible filesystem
manipulations which later remove these paths or replace their file content will
not influence the report lines or commands.
.TP .TP
\fB\-report_system_area\fR mode \fB\-report_system_area\fR mode
With mode \fBplain\fR print a report about the information found in With mode \fBplain\fR print a report about the information found in
@ -4492,6 +4746,11 @@ mentioned boot facilities.
Modes \fBcmd\fR and \fBas_mkisofs\fR work like with Modes \fBcmd\fR and \fBas_mkisofs\fR work like with
command \-report_el_torito. See above. command \-report_el_torito. See above.
.br .br
It is important to keep in mind that the file paths shown in the report lines
and commands were registered directly after image loading. Possible filesystem
manipulations which later remove these paths or replace their file content will
not influence the report lines or commands.
.br
With mode \fBgpt_disk_guid\fR print the GPT disk GUID of the loaded ISO With mode \fBgpt_disk_guid\fR print the GPT disk GUID of the loaded ISO
in RFC 4122 text format to result channel. It is not considered an error if in RFC 4122 text format to result channel. It is not considered an error if
no GPT is present. In this case nothing is printed to result channel. no GPT is present. In this case nothing is printed to result channel.
@ -4951,6 +5210,15 @@ But its alter ego osirrox is able to extract file objects
from ISO images and to create, overwrite, or delete file objects on disk. from ISO images and to create, overwrite, or delete file objects on disk.
.br .br
Disk file exclusions by \-not_mgt, \-not_leaf, \-not_paths apply. Disk file exclusions by \-not_mgt, \-not_leaf, \-not_paths apply.
The exclusion tests are made with the paths and names for the disk files.
If exclusion of paths or names in the ISO image is desired, then use image
manipulation commands like \-rm or \-find ... \-exec rm before extraction,
and end the program by \-rollback_end .
.br
Excluded disk_path parameters of extraction commands cause SORRY events.
Implicitly given paths in trees under disk_path parameters are excluded
silently.
.br
If disk file objects already exist then the settings of \-overwrite and If disk file objects already exist then the settings of \-overwrite and
\-reassure apply. But \-overwrite "on" only triggers the behavior \-reassure apply. But \-overwrite "on" only triggers the behavior
of \-overwrite "nondir". I.e. directories cannot be deleted. of \-overwrite "nondir". I.e. directories cannot be deleted.
@ -5096,8 +5364,10 @@ Like \-cp_rx but restoring mtime, atime as in ISO image and trying to set
ownership and group as in ISO image. ownership and group as in ISO image.
.TP .TP
\fB\-paste_in\fR iso_rr_path disk_path byte_offset byte_count \fB\-paste_in\fR iso_rr_path disk_path byte_offset byte_count
Read the content of a ISO data file and write it into a data file on disk Read the content of a ISO data file and write it into a data file or device
beginning at the byte_offset. Write at most byte_count bytes. file on disk beginning at the byte_offset. Write at most byte_count bytes.
The file depicted by disk_path has to support random write access.
.br
This is the inverse of command \-cut_out. This is the inverse of command \-cut_out.
.TP .TP
\fB\-concat\fR mode [target | lim prog [args [...]] lim] iso_rr_path [***] \fB\-concat\fR mode [target | lim prog [args [...]] lim] iso_rr_path [***]
@ -6492,7 +6762,7 @@ Thomas Schmitt <scdbackup@gmx.net>
.br .br
for libburnia\-project.org for libburnia\-project.org
.SH COPYRIGHT .SH COPYRIGHT
Copyright (c) 2007 \- 2021 Thomas Schmitt Copyright (c) 2007 \- 2024 Thomas Schmitt
.br .br
Permission is granted to distribute this text freely. It shall only be Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of \fBxorriso\fR. modified in sync with the technical properties of \fBxorriso\fR.

View File

@ -2,7 +2,7 @@
/* xorriso - libisoburn higher level API which creates, loads, manipulates /* xorriso - libisoburn higher level API which creates, loads, manipulates
and burns ISO 9660 filesystem images. and burns ISO 9660 filesystem images.
Copyright 2007-2021 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
@ -74,7 +74,7 @@ struct XorrisO;
*/ */
#define Xorriso_header_version_majoR 1 #define Xorriso_header_version_majoR 1
#define Xorriso_header_version_minoR 5 #define Xorriso_header_version_minoR 5
#define Xorriso_header_version_micrO 4 #define Xorriso_header_version_micrO 7
/** If needed: Something like ".pl01" to indicate a bug fix. Normally empty. /** 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. /* Inquire whether option -commit would make sense.
@param xorriso The context object to inquire. @param xorriso The context object to inquire.
@param flag @since 0.6.6 @param flag bit0= do not return 1 if -as mkisofs -print-size was
bit0= do not return 1 if -as mkisofs -print-size was
performed on the current image. 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 @return 0= -commit would have nothing to do
1= a new image session would emerge at -commit 1= a new image session would emerge at -commit
*/ */
@ -867,6 +871,9 @@ int Xorriso_sieve_dispose(struct XorrisO *xorriso, int flag);
argv[3]= Volume Id argv[3]= Volume Id
"Image size :" up to 1 result from -print_size "Image size :" up to 1 result from -print_size
argv[0]= number of blocks with "s" appended argv[0]= number of blocks with "s" appended
"Indev feature:" up to 10000 results from -assess_indev_features plain
argv[0]= name
argv[1]= value
"Jigdo files :" up to 1 result from -list_extras "Jigdo files :" up to 1 result from -list_extras
argv[0]= "yes" or "no" argv[0]= "yes" or "no"
"Local ACL :" up to 1 result from -list_extras "Local ACL :" up to 1 result from -list_extras
@ -908,6 +915,9 @@ int Xorriso_sieve_dispose(struct XorrisO *xorriso, int flag);
"Modif. Time :" up to 1 result from -pvd_info "Modif. Time :" up to 1 result from -pvd_info
argv[0]= YYYYMMDDhhmmsscc argv[0]= YYYYMMDDhhmmsscc
(Note: prefix is "Modif. Time : ") (Note: prefix is "Modif. Time : ")
"Overburnt by :" up to 2 results from -toc
argv[0]= number of readable blocks beyond ATIP leadout
(Note: only reported with overburnt CD-RW)
"PVD address :" up to 1 result from -pvd_info "PVD address :" up to 1 result from -pvd_info
argv[0]= block address with "s" appended argv[0]= block address with "s" appended
"Preparer Id :" up to 1 result from -pvd_info "Preparer Id :" up to 1 result from -pvd_info
@ -1290,6 +1300,11 @@ int Xorriso_option_as(struct XorrisO *xorriso, int argc, char **argv,
int Xorriso_option_assert_volid(struct XorrisO *xorriso, char *pattern, int Xorriso_option_assert_volid(struct XorrisO *xorriso, char *pattern,
char *severity, int flag); char *severity, int flag);
/* Command -assess_indev_features */
/* @since 1.5.6 */
int Xorriso_option_assess_indev_features(struct XorrisO *xorriso, char *mode,
int flag);
/* Command -auto_charset "on"|"off" */ /* Command -auto_charset "on"|"off" */
/* @since 0.3.8 */ /* @since 0.3.8 */
int Xorriso_option_auto_charset(struct XorrisO *xorriso, char *mode, int flag); int Xorriso_option_auto_charset(struct XorrisO *xorriso, char *mode, int flag);

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*- \input texinfo @c -*-texinfo-*-
@c %**start of header @c %**start of header
@setfilename xorriso.info @setfilename xorriso.info
@settitle GNU xorriso 1.5.4 @settitle GNU xorriso 1.5.7
@c %**end of header @c %**end of header
@c @c
@c man-ignore-lines begin @c man-ignore-lines begin
@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps @c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @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 .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO 1 "Version 1.5.4, Jan 30, 2021" @c man .TH XORRISO 1 "Version 1.5.7, May 12, 2024"
@c man .\" Please adjust this date whenever revising the manpage. @c man .\" Please adjust this date whenever revising the manpage.
@c man .\" @c man .\"
@c man .\" Some roff macros, for reference: @c man .\" Some roff macros, for reference:
@ -69,7 +69,7 @@
xorriso - creates, loads, manipulates and writes ISO 9660 filesystem images xorriso - creates, loads, manipulates and writes ISO 9660 filesystem images
with Rock Ridge extensions. with Rock Ridge extensions.
Copyright @copyright{} 2007 - 2021 Thomas Schmitt Copyright @copyright{} 2007 - 2023 Thomas Schmitt
@quotation @quotation
Permission is granted to distribute this text freely. Permission is granted to distribute this text freely.
@ -77,7 +77,7 @@ Permission is granted to distribute this text freely.
@end copying @end copying
@c man-ignore-lines end @c man-ignore-lines end
@titlepage @titlepage
@title Manual of GNU xorriso 1.5.4 @title Manual of GNU xorriso 1.5.7
@author Thomas Schmitt @author Thomas Schmitt
@page @page
@vskip 0pt plus 1filll @vskip 0pt plus 1filll
@ -86,7 +86,7 @@ Permission is granted to distribute this text freely.
@contents @contents
@ifnottex @ifnottex
@node Top @node Top
@top GNU xorriso 1.5.4 @top GNU xorriso 1.5.7
@c man-ignore-lines 1 @c man-ignore-lines 1
@c man .SH NAME @c man .SH NAME
@ -299,6 +299,15 @@ They can be made unformatted by -blank "deformat".
@* @*
Regular files and block devices are handled as overwritable media. Regular files and block devices are handled as overwritable media.
Pipes and other writeable file types are handled as blank multi-session media. Pipes and other writeable file types are handled as blank multi-session media.
@*
@cindex Unsuitable media states, _definition
The program growisofs formats by default BD-R to be pseudo-overwritable (POW).
xorriso will classify them as
@*
Media current: is unsuitable , is POW formatted
@*
and will refuse to write to them or to obtain multi-session information from
them.
@c man .PP @c man .PP
@sp 1 @sp 1
These media can assume several states in which they offer different These media can assume several states in which they offer different
@ -437,9 +446,9 @@ the path of their block device or of their generic character device. E.g.
@* @*
By default xorriso will try to map the given address to /dev/hd* and /dev/sr*. By default xorriso will try to map the given address to /dev/hd* and /dev/sr*.
The command -scsi_dev_family can redirect the mapping from sr to scd or sg. The command -scsi_dev_family can redirect the mapping from sr to scd or sg.
The latter does not suffer from the concurrency problems which plague /dev/sr The latter does not suffer from the concurrency problems which plagued /dev/sr
of Linux kernels since version 3. But it does not yield the same addresses of Linux kernels since version 3 up to 5.5. But it does not yield the same
which are used by mount(8) or by open(2) for read(2). addresses which are used by mount(8) or by open(2) for read(2).
@* @*
On FreeBSD the device files have names like On FreeBSD the device files have names like
@* @*
@ -643,6 +652,11 @@ given as program arguments and command
@strong{-x} @strong{-x}
is among them. is among them.
@* @*
The list of all current settings can be inquired by command -status "long".
Command -status "short" lists a handful of fundamental settings and all
settings which are not default at program start.
@c man .PP
@sp 1
@cindex List delimiter, _definition @cindex List delimiter, _definition
Commands consist of a command word, Commands consist of a command word,
followed by zero or more parameter words. If the list of parameter words followed by zero or more parameter words. If the list of parameter words
@ -1243,9 +1257,8 @@ Mode "any" processes attributes of all namespaces. This might need
administrator privileges, even if the owner of the disk file tries to read or administrator privileges, even if the owner of the disk file tries to read or
write the attributes. write the attributes.
@* @*
Note that xattr from namespace "isofs." are never read from disk or restored Note that it is not possible to set xattr of namespace "isofs." by xorriso
to disk. Further it is not possible to set them via xorriso xattr manipulation xattr manipulation commands.
commands.
@c man .TP @c man .TP
@item -md5 "on"|"all"|"off"|"load_check_off" @item -md5 "on"|"all"|"off"|"load_check_off"
@kindex -md5 controls handling of MD5 sums @kindex -md5 controls handling of MD5 sums
@ -1687,16 +1700,19 @@ iso_rr_paths are derived by exchanging disk_prefix by iso_rr_prefix before
pattern expansion happens. The current -cdi directory has no influence. pattern expansion happens. The current -cdi directory has no influence.
@c man .TP @c man .TP
@item -cut_out disk_path byte_offset byte_count iso_rr_path @item -cut_out disk_path byte_offset byte_count iso_rr_path
@kindex -cut_out inserts piece of data file @kindex -cut_out inserts piece of data file or device
@cindex Insert, piece of data file, -cut_out @cindex Insert, piece of data file or device, -cut_out
Map a byte interval of a regular disk file into a regular file in the ISO Map a byte interval of a regular disk file or of a device file into a regular
image. file in the ISO image. The file depicted by disk_path has to support random
This may be necessary if the disk file is larger than a single medium, or if read access. A symbolic link will only work if enabled by -follow "link" or
it exceeds the traditional limit of 2 GiB - 1 for old operating systems, "param".
or the limit of 4 GiB - 1 for newer ones. Only the newest Linux kernels
seem to read properly files >= 4 GiB - 1.
@* @*
A clumsy remedy for this limit is to backup file pieces and to concatenate Cutting out a byte interval may be necessary if the disk file is larger than
a single medium, or if it exceeds the traditional limit of 2 GiB - 1 for old
operating systems, or the limit of 4 GiB - 1 for newer ones. Contemporary
Linux kernels are able to read properly files >= 4 GiB - 1.
@*
A clumsy remedy for such limits is to backup file pieces and to concatenate
them at restore time. A well tested chopping size is 2047m. them at restore time. A well tested chopping size is 2047m.
It is permissible to request a higher byte_count than available. The It is permissible to request a higher byte_count than available. The
resulting file will be truncated to the correct size of a final piece. resulting file will be truncated to the correct size of a final piece.
@ -1716,12 +1732,23 @@ E.g:
@* @*
/file/part_3_of_3_at_4094m_with_2047m_of_5753194821 /file/part_3_of_3_at_4094m_with_2047m_of_5753194821
@* @*
If the directory /file does no yet exist, then its permissions are not taken
from directory /my/disk but rather from /my/disk/file with additional
x-permission for those who have r-permission.
@*
While command -split_size is set larger than 0, and if all pieces of a file While command -split_size is set larger than 0, and if all pieces of a file
reside in the same ISO directory with no other files, and if the names look reside in the same ISO directory with no other files, and if the names look
like above, then their ISO directory will be recognized and handled like a like above, then their ISO directory will be recognized and handled like a
regular file. This affects commands -compare*, -update*, and overwrite regular file. This affects commands -compare*, -update*, and overwrite
situations. situations.
@*
See command -split_size for details. See command -split_size for details.
@*
Another use case is copying the content of a device file as interval or as
a whole into the emerging ISO filesystem. The fact that the byte_count is
allowed to be unreasonably high enables copying of a whole device:
@*
-cut_out /dev/sdd3 0 1000g /content_of_sdd3
@c man .TP @c man .TP
@item -cpr disk_path [***] iso_rr_path @item -cpr disk_path [***] iso_rr_path
@kindex -cpr inserts like with cp -r @kindex -cpr inserts like with cp -r
@ -1816,10 +1843,13 @@ the target filesystem of an -extract must be able to take the file size.
@cindex Insert, file exclusion, -not_mgt @cindex Insert, file exclusion, -not_mgt
Control the behavior of the exclusion lists. Control the behavior of the exclusion lists.
@* @*
Exclusion processing happens before disk_paths get mapped to the ISO image Exclusion processing happens before disk_paths get mapped to the ISO image,
and before disk files get compared with image files. before disk files get compared with image files, and before image files get
The absolute disk path of the source is matched against the -not_paths list. extracted to disk files.
The leafname of the disk path is matched against the patterns in the -not_leaf @*
The absolute disk paths involved in such an action are matched against the
-not_paths list.
The leafnames of disk paths are matched against the patterns in the -not_leaf
list. If a match is detected then the disk path will not be regarded as an list. If a match is detected then the disk path will not be regarded as an
existing file and not be added to the ISO image. existing file and not be added to the ISO image.
@* @*
@ -1862,6 +1892,13 @@ path is relative, then the current -cdx is prepended to form an absolute path.
Pattern matching, if enabled, happens at definition time and not when exclusion Pattern matching, if enabled, happens at definition time and not when exclusion
checks are made. checks are made.
@* @*
Keep in mind that there may be alternative paths to the same disk file. The
exclusion tests are done literally, so that they do not keep files from getting
into the ISO filesystem by other paths. Accordingly an exclusion does not
prevent a disk file from being overwritten by file extraction via an
alternative not excluded path. So the exclusions need to be coordinated with
the actual disk_path parameters given with commands.
@*
(Do not forget to end the list of disk_paths by "@minus{}@minus{}") (Do not forget to end the list of disk_paths by "@minus{}@minus{}")
@c man .TP @c man .TP
@item -not_leaf pattern @item -not_leaf pattern
@ -1887,10 +1924,10 @@ handled as one parameter for -not_paths or -not_leaf.
@kindex -follow softlinks and mount points @kindex -follow softlinks and mount points
@cindex Insert, links or mount points, -follow @cindex Insert, links or mount points, -follow
Enable or disable resolution of symbolic links and mountpoints under Enable or disable resolution of symbolic links and mountpoints under
disk_paths. This applies to actions -add, -du*x, -ls*x, -findx, -concat, disk_paths. This applies to actions -add, -cut_out, -du*x, -ls*x, -findx,
and to -disk_pattern expansion. -concat, and to -disk_pattern expansion.
@* @*
There are three kinds of follow decisison to be made: There are three main kinds of follow decisison to be made:
@* @*
@strong{link} is the hop from a symbolic link to its target file object for the @strong{link} is the hop from a symbolic link to its target file object for the
purpose of reading. I.e. not for command -concat. purpose of reading. I.e. not for command -concat.
@ -1915,7 +1952,7 @@ expansion).
If enabled then -ls*x will show the link targets rather than the links If enabled then -ls*x will show the link targets rather than the links
themselves. -du*x, -findx, and -add will process the link targets but not themselves. -du*x, -findx, and -add will process the link targets but not
follow links in an eventual directory tree below the targets (unless "link" follow links in an eventual directory tree below the targets (unless "link"
is enabled). is enabled). -cut_out will process link targets.
@* @*
Occasions can be combined in a colon separated list. All occasions Occasions can be combined in a colon separated list. All occasions
mentioned in the list will then lead to a positive follow decision. mentioned in the list will then lead to a positive follow decision.
@ -2004,6 +2041,9 @@ FAILURE event.
A well tested -split_size is 2047m. Sizes above -file_size_limit are not A well tested -split_size is 2047m. Sizes above -file_size_limit are not
permissible. permissible.
@* @*
The newly created ISO directory inherits its permissions from the data file
with additional x-permission for those who have r-permission.
@*
While command -split_size is set larger than 0 such a directory with split While command -split_size is set larger than 0 such a directory with split
file pieces will be recognized and handled like a regular file by commands file pieces will be recognized and handled like a regular file by commands
-compare* , -update*, and in overwrite situations. There are -osirrox -compare* , -update*, and in overwrite situations. There are -osirrox
@ -2389,6 +2429,33 @@ and "Xotic" which matches what is not matched by the other types.
@* @*
Only the first letter is interpreted. E.g.: -find / -type d Only the first letter is interpreted. E.g.: -find / -type d
@* @*
@item -size [+-][=]number[cwbdksmg] :
Matches files with matching relation to the given size number.
@*
The prefix defines the desired relation:
@*
No prefix or prefix "=" means: File must have exactly the given size.
@*
Prefix "+" means: File must be larger than given size.
@*
Prefix "+=" means: File must be larger than or equal to given size limit.
@*
Prefix "-" means: File must be smaller than given size limit.
@*
Prefix "-=" means: File must be smaller than or equal to given size limit.
@*
Suffixes are peculiar to stay compatible with program "find":
@*
No suffix means blocks of 512 bytes, "c" means single bytes, "w" means 2 bytes,
"b" means 512 bytes.
The suffixes "k", "M", and "G" mean 1024, 1024k, and 1024M respectively.
As usual with xorriso, the suffixes "d" and "s" mean 512 and 2048 and all
suffixes are recognized as both, uppercase and lowercase letters.
@*
E.g. match files of 4 GiB or larger:
@*
-size +=4g
@*
@item -maxdepth number : @item -maxdepth number :
Matches only files which are at most at the given depth level relative to Matches only files which are at most at the given depth level relative to
the iso_rr_path where -find starts. That path itself is at depth 0, its the iso_rr_path where -find starts. That path itself is at depth 0, its
@ -3186,6 +3253,10 @@ A number without "+" gives the overall number of bytes. In any case the result
may not be smaller than "new". Numbers may have a unit suffix: "d"=512, may not be smaller than "new". Numbers may have a unit suffix: "d"=512,
"k"=1024, "s"=2048, "m"=1024k, "g"=1024m. "k"=1024, "s"=2048, "m"=1024k, "g"=1024m.
@* @*
Normally the volume descriptors at block 16 ff. have to be readable. Only with
entity "lba" or "sbsector" and adjust mode "new" it is possible to address
a session if block 16 ff. yields no valid volume descriptors.
@*
Examples: Examples:
@* @*
Activate session 4 and enable overwriting of the blocks of younger sessions: Activate session 4 and enable overwriting of the blocks of younger sessions:
@ -3369,7 +3440,7 @@ Both words then stem from a reserved subset of UCS-2.
@* @*
"rec_mtime" records with non-RockRidge directory entries the disk file's "rec_mtime" records with non-RockRidge directory entries the disk file's
mtime and not the creation time of the image. This applies to the ECMA-119 mtime and not the creation time of the image. This applies to the ECMA-119
tree (plain ISO 9660), to Joliet, and to ISO 9660:1999. "rec_time" is tree (plain ISO 9660), to Joliet, and to ISO 9660:1999. "rec_mtime" is
default. If disabled, it gets automatically re-enabled by -as mkisofs emulation default. If disabled, it gets automatically re-enabled by -as mkisofs emulation
when a pathspec is encountered. when a pathspec is encountered.
@* @*
@ -3394,11 +3465,36 @@ do not understand Rock Ridge.
of [0,31] to files with no own data content. The new way is to have of [0,31] to files with no own data content. The new way is to have
a dedicated block to which all such files will point. a dedicated block to which all such files will point.
@* @*
"max_ce_entries="number sets the maximum number of SUSP CE entries and thus
continuation areas. Each continuation area can hold at most 2048 bytes of
SUSP data (Rock Ridge or AAIP). The first area can be smaller. There might
be some waste at the end of each area.
When the maximum number is exceeded during ISO filesystem production
then either xattr and ACL get dropped from the affected file or an error
gets reported and image production is prevented.
@*
Linux silently ignores a file when encountering its 32th CE entry.
(Workaround is to mount the filesystem with option "norock".)
So the default setting is 31. Minimum is 1, maximum is 100000.
If a limit higher than 31 is chosen and 31 gets surpassed, then a warning
message gets reported.
@*
"max_ce_drop="mode sets the behavior when the limit of max_ce_entries= is
surpassed. Mode "off" causes an error message and prevents image production.
Mode "xattr" and "xattr_acl" report a warning, delete from the affected
file all xattr of namespaces other than "isofs", and then try again.
If this still surpasses the limit, then mode "xattr_acl" deletes all ACL from
the file and retries.
If this still surpasses the limit, then an error message gets reported and
image production is prevented.
@*
Default setting is Default setting is
@* @*
"clear:only_iso_version:deep_paths:long_paths:no_j_force_dots: "clear:iso_9660_level=3:only_iso_version:deep_paths:long_paths:
@* @*
always_gmt:old_rr". no_j_force_dots:always_gmt:rec_mtime:old_rr:max_ce_entries=31:
@*
max_ce_drop=xattr_acl"
@* @*
Note: The term "ECMA-119 name" means the plain ISO 9660 names and attributes Note: The term "ECMA-119 name" means the plain ISO 9660 names and attributes
which get visible if the reader ignores Rock Ridge. which get visible if the reader ignores Rock Ridge.
@ -3749,14 +3845,30 @@ in order to set an own address limit.
"data" causes full speed to start when superblock and directory entries are "data" causes full speed to start when superblock and directory entries are
written and writing of file content blocks begins. written and writing of file content blocks begins.
@c man .TP @c man .TP
@item -dvd_obs "default"|"32k"|"64k" @item -dvd_obs "default"|"32k"|"64k"|"obs_pad"|"bdr_obs_exempt"
@kindex -dvd_obs set write block size @kindex -dvd_obs set write block size and end alignment
@cindex Write, block size, -dvd_obs @cindex Write, block size and end alignment, -dvd_obs
GNU/Linux specific: GNU/Linux specific:
Set the number of bytes to be transmitted with each write operation to DVD Set the number of bytes to be transmitted with each write operation to DVD
or BD media. A number of 64 KB may improve throughput with bus systems which or BD media. A number of 64 KB may improve throughput with bus systems which
show latency problems. The default depends on media type, on command show latency problems. The default depends on media type, on command
-stream_recording , and on compile time options. -stream_recording , and on compile time options.
@*
On all systems:
"obs_pad" pads the data of the last write operation of a DVD-R[W] DAO session
or BD-R session up to the full size of an output chunk.
This padding has to be applied automatically to the other DVD and BD media
types, where it causes e.g. ISO images to have trailing unclaimed blocks.
Whether it is applied automatically to BD-R depends on "bdr_obs_exempt".
"obs_pad" can be disabled by "no_obs_pad".
@*
"bdr_obs_exempt" exempts BD-R media from automatic unconditional transaction
end padding, provided that this padding is not requested by "obs_pad" and that
no stream_recording is requested. "bdr_obs_exempt" can be disabled by
"no_obs_exempt".
@*
This is a new feature introduced with version 1.5.6. It might become default
in later versions.
@c man .TP @c man .TP
@item -modesty_on_drive parameter[:parameters] @item -modesty_on_drive parameter[:parameters]
@kindex -modesty_on_drive keep drive buffer hungry @kindex -modesty_on_drive keep drive buffer hungry
@ -4034,10 +4146,12 @@ and to write the loaded system area content without alterations.
@strong{discard} gives up the El Torito boot catalog and its boot images. @strong{discard} gives up the El Torito boot catalog and its boot images.
regardless whether loaded from an ISO filesystem or defined by commands. regardless whether loaded from an ISO filesystem or defined by commands.
Any BIOS or EFI related boot options get revoked. Any BIOS or EFI related boot options get revoked.
Nevertheless, loaded system area data stay valid. If desired, they have to be Nevertheless, loaded system area data and the possibly defined appended
erased by partitions stay valid. If desired, they have to be erased by
@* @*
-boot_image any system_area=/dev/zero -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. @strong{keep} keeps or copies El Torito boot images unaltered and writes a new catalog.
@* @*
@ -4058,23 +4172,59 @@ 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 @strong{replay} is a more modern version of "patch", which not only cares
for existing El Torito boot equipment but also for the recognizable for existing El Torito boot equipment but also for the recognizable
boot provisions in the System Area. It discards any existing -boot_image 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 Special care has to be taken with manipulations of files in the emerging ISO
output of command -report_el_torito "cmd" are still available. Do not filesystem which are mentioned by -report_el_torito "cmd". Their paths are
remove or rename boot image files after -indev. memorized at ISO image load time.
In general -boot_image "any" "replay" should be applied after all file
manipulations are done. All file paths from the -report_el_torito commands
must then still lead to data files which are suitable for their respective
commands.
@* @*
Drop unknown El Torito: -boot_image "any" "discard" The effects of file path changes after -boot_image "any" "replay" can be
surprising. E.g. removing or replacing a boot image with boot info table
for legacy BIOS leads to a hidden boot image with the content as it was at
"replay" time. Doing the same with a boot image for EFI leads to an error
at -commit time or to the new file content becomming the EFI boot image.
@* @*
Maintain recognizable stuff: -boot_image "any" "replay" Out of historical reasons @strong{replay} does not revoke all possibly made
@* -append_partition settings but only overwrites those for which the loaded
El Torito only for GRUB: -boot_image "grub" "patch" ISO image provides candidates.
@*
El Torito only for ISOLINUX: -boot_image "isolinux" "patch"
@* @*
@strong{show_status} will print what is known about the loaded boot images @strong{show_status} will print what is known about the loaded boot images
and their designated fate. and their designated fate.
@* @*
Examples:
@*
Drop 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 @sp 1
A @strong{bootspec} is a word of the form name=value. It is used to describe A @strong{bootspec} is a word of the form name=value. It is used to describe
@ -4174,13 +4324,27 @@ which can be used to boot from USB stick or hard disk.
Other than an El Torito boot image, the file disk_path needs not to be added Other than an El Torito boot image, the file disk_path needs not to be added
to the ISO image. to the ISO image.
@* @*
In multi-session situations the existing System Area is preserved by default.
In in this case, the special disk_path "." prevents reading of
a disk file but nevertheless causes adjustments in the
loaded system area data. Such adjustments may get ordered by -boot_image
commands.
@*
Special "system_area=/dev/zero" causes 32k of 0-bytes.
Use this to e.g. discard partition tables which were loaded with the ISO image.
@*
This setting is the default with the write method of Modifying, when -indev
and -outdev are both used and not the same drive. If you indeed need to copy
the unchanged system area from -indev to -outdev, use
"system_area=--interval:imported_iso:0s-15s::" , which was the default in older
versions of xorriso.
@*
@strong{-boot_image isolinux system_area=} implies "partition_table=on". @strong{-boot_image isolinux system_area=} implies "partition_table=on".
In this case, the disk path should lead to one of the SYSLINUX files In this case, the disk path should lead to one of the SYSLINUX files
isohdp[fp]x*.bin or to a file which was derived from one of those files. isohdp[fp]x*.bin or to a file which was derived from one of those files.
E.g. to the first 512 bytes from an ISOLINUX isohybrid ISO image. E.g. to the first 512 bytes from an ISOLINUX isohybrid ISO image.
@* @*
In this case, El Torito boot images (dir=, bin_path=, efi_path=) El Torito boot images (dir=, bin_path=, efi_path=) may then be augmented by
may be augmented by
@strong{isolinux partition_entry=gpt_basdat} @strong{isolinux partition_entry=gpt_basdat}
or @strong{isolinux partition_entry=gpt_hfsplus}, or @strong{isolinux partition_entry=gpt_hfsplus},
and by @strong{isolinux partition_entry=apm_hfsplus}. and by @strong{isolinux partition_entry=apm_hfsplus}.
@ -4190,12 +4354,6 @@ The first three GPT partitions will also be marked by MBR partitions. The
MBR partition of type 0xEF is what actually is used by EFI firmware for MBR partition of type 0xEF is what actually is used by EFI firmware for
booting from USB stick. booting from USB stick.
@* @*
In multi-session situations the existing System Area is preserved by default.
In in this case, the special disk_path "." prevents reading of
a disk file but nevertheless causes adjustments in the
loaded system area data. Such adjustments may get ordered by -boot_image
commands.
@*
@cindex GPT, control GUID, -boot_image gpt_disk_guid= @cindex GPT, control GUID, -boot_image gpt_disk_guid=
@strong{-boot_image any gpt_disk_guid=}value controls whether an emerging GPT @strong{-boot_image any gpt_disk_guid=}value controls whether an emerging GPT
shall get a randomly generated disk GUID or whether the GUID is supplied by shall get a randomly generated disk GUID or whether the GUID is supplied by
@ -4265,13 +4423,11 @@ In this case the existing System Area gets checked whether it bears addresses
and sizes as if it had been processed by "partition_table=on". If so, and sizes as if it had been processed by "partition_table=on". If so,
then those parameters get updated when the new System Area is written. then those parameters get updated when the new System Area is written.
@* @*
Special "system_area=/dev/zero" causes 32k of NUL-bytes.
Use this to discard an MBR which was loaded with the ISO image.
@*
@cindex Appended partition, in MBR or GPT @cindex Appended partition, in MBR or GPT
@strong{appended_part_as=gpt} marks partitions from -append_partition @strong{appended_part_as=gpt} marks partitions from -append_partition
in GPT rather than in MBR. In this case the MBR shows a single partition in GPT rather than in MBR. In this case the MBR shows a single partition
of type 0xee which covers the whole output data. of type 0xee which covers the whole output data.
The number of appendable partitions with GPT is 8 rather than 4 with MBR.
@* @*
@strong{appended_part_as=mbr} is the default. Appended partitions get @strong{appended_part_as=mbr} is the default. Appended partitions get
marked in GPT only if GPT is produced because of other settings. marked in GPT only if GPT is produced because of other settings.
@ -4280,7 +4436,8 @@ may be added to "mbr".
@* @*
@cindex Appended partition, in APM @cindex Appended partition, in APM
@strong{appended_part_as=apm} marks partitions from -append_partition in APM @strong{appended_part_as=apm} marks partitions from -append_partition in APM
additionally to "mbr" or "gpt". additionally to "mbr" or "gpt". The partition number in APM will not be
influenced by -append_partition parameter partition_number.
@* @*
By default, appended partitions get marked in APM only if APM is By default, appended partitions get marked in APM only if APM is
produced because of other options together with part_like_isohybrid="on". produced because of other options together with part_like_isohybrid="on".
@ -4368,6 +4525,20 @@ If no bootable MBR is indicated and a partition gets created by
-append_partition, then mbr_force_bootable="on" causes a bootflag like it -append_partition, then mbr_force_bootable="on" causes a bootflag like it
would do with a bootable MBR. would do with a bootable MBR.
@* @*
@cindex GPT Legacy BIOS bootable flag, set for ISO
@strong{gpt_iso_bootable=}on causes bit 2 of the GPT partition flags to be
set for the ISO 9660 partition if such a GPT partition emerges. This bit is
specified as "Legacy BIOS bootable" but its true significance is unclear.
Some GPT-aware BIOS might want to see it in some partition. Mode "off"
revokes this setting.
@*
@cindex GPT read-only flag, do not set for ISO
@strong{gpt_iso_not_ro=}on causes bit 60 of the GPT partition flags to be not
set for the ISO 9660 partition if such a GPT partition emerges. This bit is
specified as "Read-only" and thus appropriate. But it is unusual in GPT disk
partitions. Mode "off" revokes this setting and causes the read-only bit to be
set.
@*
@cindex MIPS boot file, activation @cindex MIPS boot file, activation
@strong{mips_path=}iso_rr_path declares a data file in the image to be a @strong{mips_path=}iso_rr_path declares a data file in the image to be a
MIPS Big Endian boot file and causes production of a MIPS Big Endian Volume MIPS Big Endian boot file and causes production of a MIPS Big Endian Volume
@ -4422,8 +4593,8 @@ DEC Alpha SRM Secondary Bootstrap Loader and causes production of a boot sector
which points to it. which points to it.
This is mutually exclusive with production of other boot blocks like MBR. This is mutually exclusive with production of other boot blocks like MBR.
@* @*
@strong{mips_discard}, @strong{sparc_discard}, @strong{hppa_discard}, @strong{mips_discard}, @strong{mipsel_discard}, @strong{sparc_discard},
@strong{alpha_discard} @strong{hppa_discard}, @strong{alpha_discard}
revoke any boot file declarations made for mips/mipsel, sparc, hppa, revoke any boot file declarations made for mips/mipsel, sparc, hppa,
or alpha, respectively. or alpha, respectively.
This removes the ban on production of other boot blocks. This removes the ban on production of other boot blocks.
@ -4462,9 +4633,12 @@ of the cylinder size.
Beware of subsequent multi-session runs. The appended partition will get Beware of subsequent multi-session runs. The appended partition will get
overwritten. overwritten.
@* @*
Partitions may be appended with boot block type MBR and with SUN Disk Label. Partitions may be appended with partition table types MBR, GPT, and
SUN Disk Label. Additionally to MBR and GPT it is possible to have them
marked in APM.
@* @*
With MBR: @cindex Appended partitions, MBR
With @strong{MBR}:
@* @*
partition_number may be 1 to 4. Number 1 will put the whole ISO image into partition_number may be 1 to 4. Number 1 will put the whole ISO image into
the unclaimed space before partition 1. So together with most @command{xorriso} the unclaimed space before partition 1. So together with most @command{xorriso}
@ -4484,20 +4658,51 @@ In APM, 48465300-0000-11AA-AA11-00306543ECAC will be mapped to partition
type "Apple_HFS", any other to "Data". type "Apple_HFS", any other to "Data".
@* @*
If some other command causes the production of GPT, then the appended If some other command causes the production of GPT, then the appended
partitions will be mentioned there too. partitions will be mentioned there too.
@* @*
The disk_path must provide the necessary data bytes at commit time. @cindex Appended partitions, GPT
An empty disk_path disables this feature for the given partition number. @strong{GPT} can be forced by
@*
-boot_image "any" "appended_part_as=gpt"
@*
partition_number may be 1 to 8. But other than with MBR partitions it is not
guaranteed that the resulting GPT partition will have this number.
@*
More important than the desired partition number will be that the resulting
ISO filesystem is covered gaplessly with GPT table and its partitions and that
the partitions in the table are sorted by block address. If partition_number is
higher than the number of preceding partitions, then the appropriate number of
empty partition entries is inserted to achieve the desired partition_number.
If the number of preceding partitions is too high, then a NOTE message informs
about the inability to achieve partition_number and about the actually assigned
number.
@*
The type_code may be the same as described with MBR. Given GUIDs are used
unchanged. Given MBR partition types get translated. 0xef becomes
C12A7328-F81F-11D2-BA4B-00A0C93EC93B, others become
EBD0A0A2-B9E5-4433-87C0-68B6B72699C7.
@* @*
@cindex SUN SPARC boot images, activation @cindex SUN SPARC boot images, activation
With SUN Disk Label (selected by -boot_image any sparc_label=): @strong{SUN Disk Label} is chosen by -boot_image any sparc_label=.
@* @*
partition_number may be 2 to 8. Number 1 will always be the ISO image. 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 Partition start addresses are aligned to 320 KiB. The type_code does not
matter. Submit 0x0. 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. 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 @end table
@c man .TP @c man .TP
@c man .B Jigdo Template Extraction: @c man .B Jigdo Template Extraction:
@ -5012,6 +5217,50 @@ summary of drive state and medium content is printed.
As further difference to -toc, this command does not emit FAILURE events As further difference to -toc, this command does not emit FAILURE events
if the desired drive is not acquired. if the desired drive is not acquired.
@c man .TP @c man .TP
@item -assess_indev_features "plain"|"cmd"|"as_mkisofs"|"replay"
@kindex -assess_indev_features shows filesystem features
@cindex Filesytem features, show, -assess_indev_features
Inspect the filesystem on -indev for the presence of Rock Ridge, Joliet, or
ISO 9660:1999, and for traces of other write options which seem to have been
used when the filesystem was created.
@*
Note that this command does not detect and report a possibly present HFS+ tree.
@*
Mode "cmd" lists xorriso commands which would activate the detected settings.
@*
Mode "as_mkisofs" lists options of the -as mkisofs emulation, which would
activate those of the detected settings which are not default.
@*
Mode "replay" performs the commands which get listed by mode "cmd".
@*
Mode "plain" lists after a "Indev feature: " header name-value pairs as
delivered by libisofs function iso_read_image_feature_named(). See libisofs.h.
The other modes derive their output from this list. I.e. the sequence of
commands from "cmd" follows the sequence of "plain".
@*
Not leading to "cmd" lines are:
@*
"size=" tells the number of 2048 byte blocks of the filesystem.
@*
"eltorito=1" tells that El Torito boot equipment was detected.
@*
"tree_loaded=" tells which tree was loaded by -indev:
@*
0 = ISO 9660 , 1 = Joliet , 2 = ISO 9660:1999
@*
"tree_loaded_text=" tells the same by name: "ISO9660", "Joliet", "ISO9660:1999"
@*
"rr_loaded=1" tells that Rock Ridge information was loaded with the tree.
@*
"aaip=1" tells that AAIP information was detected (ACL, xattr, MD5, ...).
@*
"relaxed_vol_atts=1" tells that the volume attributes like -volid or
-preparer_id bear characters outside the restricted character sets which are
specified for them by ECMA-119.
@*
"rrip_1_10_px_ino=1" tells that with Rock Ridge 1.10 a PX entry was found which
looks like from Rock Ridge 1.12.
@c man .TP
@item -mount_cmd drive entity id path @item -mount_cmd drive entity id path
@kindex -mount_cmd composes mount command line @kindex -mount_cmd composes mount command line
@cindex Session, mount command line, -mount_cmd @cindex Session, mount command line, -mount_cmd
@ -5130,6 +5379,19 @@ Mode @strong{as_mkisofs} tries to print the @strong{xorriso -as mkisofs}
options, which are necessary to produce the found equipment. options, which are necessary to produce the found equipment.
The intended use case is to use the mounted filesystem as input tree The intended use case is to use the mounted filesystem as input tree
together with the printed options. together with the printed options.
@*
If CHRP equipment is detected, then modes @strong{cmd} and @strong{as_mkisofs}
issue some of the relaxation commands or options which get detected by
command @strong{-assess_indev_features}. This happens because CHRP firmware
reads file paths from file /ppc/bootinfo.txt and tries to find them
case-insensitively in the ECMA-119 tree without using Rock Ridge. If such a
path has actually forbidden properties, like the name "powerpc-ieee1275", then
the relaxations are needed to bring it unmangled into the ECMA-119 tree.
@*
It is important to keep in mind that the file paths shown in the report lines
and commands were registered directly after image loading. Possible filesystem
manipulations which later remove these paths or replace their file content will
not influence the report lines or commands.
@c man .TP @c man .TP
@item -report_system_area mode @item -report_system_area mode
@kindex -report_system_area shows MBR, GPT, and alike @kindex -report_system_area shows MBR, GPT, and alike
@ -5146,6 +5408,11 @@ mentioned boot facilities.
Modes @strong{cmd} and @strong{as_mkisofs} work like with Modes @strong{cmd} and @strong{as_mkisofs} work like with
command -report_el_torito. See above. command -report_el_torito. See above.
@* @*
It is important to keep in mind that the file paths shown in the report lines
and commands were registered directly after image loading. Possible filesystem
manipulations which later remove these paths or replace their file content will
not influence the report lines or commands.
@*
With mode @strong{gpt_disk_guid} print the GPT disk GUID of the loaded ISO With mode @strong{gpt_disk_guid} print the GPT disk GUID of the loaded ISO
in RFC 4122 text format to result channel. It is not considered an error if in RFC 4122 text format to result channel. It is not considered an error if
no GPT is present. In this case nothing is printed to result channel. no GPT is present. In this case nothing is printed to result channel.
@ -5684,6 +5951,15 @@ But its alter ego osirrox is able to extract file objects
from ISO images and to create, overwrite, or delete file objects on disk. from ISO images and to create, overwrite, or delete file objects on disk.
@* @*
Disk file exclusions by -not_mgt, -not_leaf, -not_paths apply. Disk file exclusions by -not_mgt, -not_leaf, -not_paths apply.
The exclusion tests are made with the paths and names for the disk files.
If exclusion of paths or names in the ISO image is desired, then use image
manipulation commands like -rm or -find ... -exec rm before extraction,
and end the program by -rollback_end .
@*
Excluded disk_path parameters of extraction commands cause SORRY events.
Implicitly given paths in trees under disk_path parameters are excluded
silently.
@*
If disk file objects already exist then the settings of -overwrite and If disk file objects already exist then the settings of -overwrite and
-reassure apply. But -overwrite "on" only triggers the behavior -reassure apply. But -overwrite "on" only triggers the behavior
of -overwrite "nondir". I.e. directories cannot be deleted. of -overwrite "nondir". I.e. directories cannot be deleted.
@ -5851,8 +6127,10 @@ ownership and group as in ISO image.
@item -paste_in iso_rr_path disk_path byte_offset byte_count @item -paste_in iso_rr_path disk_path byte_offset byte_count
@kindex -paste_in copies file into disk file @kindex -paste_in copies file into disk file
@cindex Restore, copy file into disk file, -paste_in @cindex Restore, copy file into disk file, -paste_in
Read the content of a ISO data file and write it into a data file on disk Read the content of a ISO data file and write it into a data file or device
beginning at the byte_offset. Write at most byte_count bytes. file on disk beginning at the byte_offset. Write at most byte_count bytes.
The file depicted by disk_path has to support random write access.
@*
This is the inverse of command -cut_out. This is the inverse of command -cut_out.
@c man .TP @c man .TP
@item -concat mode [target | lim prog [args [...]] lim] iso_rr_path [***] @item -concat mode [target | lim prog [args [...]] lim] iso_rr_path [***]
@ -7557,7 +7835,7 @@ Thomas Schmitt <scdbackup@@gmx.net>
for libburnia-project.org for libburnia-project.org
@c man .SH COPYRIGHT @c man .SH COPYRIGHT
@section Copyright @section Copyright
Copyright (c) 2007 - 2021 Thomas Schmitt Copyright (c) 2007 - 2024 Thomas Schmitt
@* @*
Permission is granted to distribute this text freely. It shall only be Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of @command{xorriso}. modified in sync with the technical properties of @command{xorriso}.

View File

@ -201,7 +201,7 @@ libburnia git: libisoburn/frontend/xorriso-tcltk
You will probably have to give it x-permission after download. Some browsers You will probably have to give it x-permission after download. Some browsers
insist in adding &quot;.htm&quot; to the file name. insist in adding &quot;.htm&quot; to the file name.
<BR> <BR>
Further you need xorriso >= 1.5.4, Tcl, Tk >= 8.4, Further you need xorriso >= 1.5.6, Tcl, Tk >= 8.4,
Tcl/Tk package &quot;BWidget&quot;. Tcl/Tk package &quot;BWidget&quot;.
</P> </P>
@ -507,29 +507,38 @@ files or trees to disk:
<P> <P>
<DL> <DL>
<DT><H3>Download as source code (see README):</H3></DT> <DT><H3>Download as source code (see README):</H3></DT>
<DD><A HREF="xorriso-1.5.4.tar.gz">xorriso-1.5.4.tar.gz</A> <DD><A HREF="xorriso-1.5.6.pl02.tar.gz">xorriso-1.5.6.pl02.tar.gz</A>
(2720 KiB). (2780 KiB).
</DD> </DD>
<DD>(Released 30 Jan 2021)</DD> <DD>(Released 14 Jun 2023)</DD>
<DD><A HREF="xorriso-1.5.4.tar.gz.sig">xorriso-1.5.4.tar.gz.sig</A></DD> <DD><A HREF="xorriso-1.5.6.pl02.tar.gz.sig">xorriso-1.5.6.pl02.tar.gz.sig</A></DD>
<DD> <DD>
(detached GPG signature for verification by (detached GPG signature for verification by either
<KBD>gpg --verify xorriso-1.5.4.tar.gz.sig xorriso-1.5.4.tar.gz</KBD> <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.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.pl02.tar.gz.sig</KBD>
<BR>
Both should confirm
<BR> <BR>
which should confirm
<KBD>gpg: Good signature from "Thomas Schmitt &lt;scdbackup@gmx.net&gt;"</KBD> <KBD>gpg: Good signature from "Thomas Schmitt &lt;scdbackup@gmx.net&gt;"</KBD>
<BR> <BR>
<KBD> <KBD>
Primary key fingerprint: 44BC 9FD0 D688 EB00 7C4D D029 E9CB DFC0 ABC0 A854 Primary key fingerprint: 44BC 9FD0 D688 EB00 7C4D D029 E9CB DFC0 ABC0 A854
</KBD> </KBD>
)
<BR> <BR>
after <KBD>gpg --keyserver keys.gnupg.net --recv-keys ABC0A854</KBD>
).
</DD> </DD>
<DD> <DD>
Also on <A HREF="http://www.gnu.org/prep/ftp.html"> Also on <A HREF="http://www.gnu.org/prep/ftp.html">
mirrors of ftp://ftp.gnu.org/gnu/ </A> mirrors of ftp://ftp.gnu.org/gnu/ </A>
as xorriso/xorriso-1.5.4.tar.gz as xorriso/xorriso-1.5.6.pl02.tar.gz
</DD> </DD>
</DL> </DL>
</DD> </DD>
@ -564,35 +573,54 @@ describes the cdrecord emulation</DD>
<HR> <HR>
<P> <P>
Bug fixes towards previous stable version xorriso-1.5.2: Bug fixes towards previous stable version xorriso-1.5.4.pl02:
<UL> <UL>
<LI> <LI>
-report_system_area as_mkisofs misrepresented GPT with appended False -status failure with -boot_image --interval:appended_partition
partition and forced boot flag as -part_like_isohybrid
</LI> </LI>
<LI> <LI>
Boot catalog could get a wrong name if cat_path= is explicitely given but -no_rc prevented pre-scanning of arguments for stdio output and others.
not containing a slash character
</LI> </LI>
<LI> <LI>
Big-Endian MIPS Volume Header boot file size was rounded up to full 2048. -not_leaf and -not_paths were not applied to -extract and alike
Thanks René Rebe.
</LI> </LI>
<LI> <LI>
El Torito production failed if no catalog path is given and the -report_system_area cmd misperceived -part_like_isohybrid with
first boot image path contains no slash -isohybrid-gpt-basdat
</LI> </LI>
<LI> <LI>
zisofs production was wrong on big-endian machines -report_system_area cmd misperceived combination of isohybrid and
appended partition in GPT
</LI> </LI>
<LI> <LI>
Apple Partition Map entries wrote uninitialized data -as mkisofs option -part_like_isohybrid did not cause a MBR
partition table if the partitions are data files in the ISO
rather than appended
</LI> </LI>
<LI> <LI>
Appended APM partitions without HFS+ production had start and size 1 Split file directories (-split_size) were created with wrong permissions
<LI>
libisofs did not mark clones of imported files as imported.
This could cause that original and clone occupy data storage
in the newly written session. Thanks to Ivan Shmakov.
</LI> </LI>
<LI> <LI>
On GNU/Linux early SCSI commands were not logged Partition offset was preserved from -indev rather than from -outdev
</LI>
<LI>
libisofs could misrepresent Rock Ridge information if many symbolic links
or AAIP data were recorded in a directory
</LI>
<LI>
Data files named /boot.catalog or ./boot.cat could be left out of
the emerging ISO if the boot catalog was set to be hidden
</LI>
<LI>
-toc reported wrong track LBA with overwritable media with
unrecognized content (pseudo-closed)
</LI>
<LI>
-find test -has_xattr matched "isofs." attributes in -xattr mode "any"
</LI> </LI>
<!-- <!--
<LI>- none -</LI> <LI>- none -</LI>
@ -601,48 +629,45 @@ On GNU/Linux early SCSI commands were not logged
</P> </P>
<P> <P>
Enhancements towards previous stable version xorriso-1.5.2: Bug fixes towards deprecated version xorriso-1.5.6:
<UL> <UL>
<LI> <LI>
Switched to usage of libjte-2.0.0 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>
<LI>
New -boot_image settings gpt_iso_bootable= and gpt_iso_not_ro=
</LI> </LI>
<LI> <LI>
New -jigdo parameters "checksum_algorithm", "demand_checksum", "-checksum-list" New -as mkisofs options --gpt-iso-bootable and --gpt-iso-not-ro
</LI> </LI>
<LI> <LI>
New -as mkisofs options -jigdo-checksum-algorithm, -checksum-list, New -as cdrecord option --obs_pad. Automatic no_emul_toc with -as cdrecord.
-jigdo-force-checksum
</LI> </LI>
<LI> <LI>
New helper script xorriso-dd-target New parameters "obs_pad" and "bdr_obs_exempt" for -dvd_obs
</LI> </LI>
<LI> <LI>
New command -truncate_overwritable New -as cdrecord option --bdr_obs_exempt
</LI> </LI>
<LI> <LI>
New -read_speed prefixes "soft_force:" and "soft_corr:" New command -assess_indev_features
</LI> </LI>
<LI> <LI>
New -check_media option data_to="-" for standard output New -find test -size
</LI> </LI>
<LI> <LI>
New -zisofs parameters version_2=, block_size_v2=, max_bpt=, max_bpt_f=, New -compliance rules max_ce_entries=, max_ce_drop=
bpt_target=, bpt_free_ratio=, by_magic=v2, susp_z2=
</LI> </LI>
<LI> <LI>
New -as mkisofs options --zisofs-version-2, --zisofs2-susp-z2, --zisofs2-susp-zf Allowed lseekable device files with -cut_out.
</LI> Proof-of-concept by Ivan Shmakov on bugs.debian.org.
<LI>
Enabled recognition of zisofs by magic without zlib support
</LI>
<LI>
New -osirrox option sparse= controls extraction into sparse files
</LI>
<LI>
New command -joliet_map
</LI>
<LI>
New command -extract_boot_images
</LI> </LI>
<!-- <!--
<LI>- none -</LI> <LI>- none -</LI>
@ -666,16 +691,16 @@ libburnia project and the legal intentions of
<A HREF="http://www.fsf.org/"> FSF </A> match completely. <A HREF="http://www.fsf.org/"> FSF </A> match completely.
</DT> </DT>
<DD>&nbsp;</DD> <DD>&nbsp;</DD>
<DT>libburn-1.5.4</DT> <DT>libburn-1.5.6</DT>
<DD>reads and writes data from and to CD, DVD, BD.</DD> <DD>reads and writes data from and to CD, DVD, BD.</DD>
<DD>(founded by Derek Foreman and Ben Jansens, <DD>(founded by Derek Foreman and Ben Jansens,
developed and maintained since August 2006 by developed and maintained since August 2006 by
Thomas Schmitt from team of libburnia-project.org)</DD> Thomas Schmitt from team of libburnia-project.org)</DD>
<DT>libisofs-1.5.4</DT> <DT>libisofs-1.5.6</DT>
<DD>operates on ISO 9660 filesystem images.</DD> <DD>operates on ISO 9660 filesystem images.</DD>
<DD>(By Vreixo Formoso, Mario Danic and Thomas Schmitt <DD>(By Vreixo Formoso, Mario Danic and Thomas Schmitt
from team of libburnia-project.org. HFS+ code by Vladimir Serbinenko.)</DD> from team of libburnia-project.org. HFS+ code by Vladimir Serbinenko.)</DD>
<DT>libisoburn-1.5.4</DT> <DT>libisoburn-1.5.6</DT>
<DD>coordinates libburn and libisofs, emulates multi-session where needed, <DD>coordinates libburn and libisofs, emulates multi-session where needed,
and hosts the original source code of program xorriso.</DD> and hosts the original source code of program xorriso.</DD>
<DD>It provides the complete functionality of xorriso via <DD>It provides the complete functionality of xorriso via
@ -684,7 +709,7 @@ a C language API.</DD>
from team of libburnia-project.org</DD> from team of libburnia-project.org</DD>
<DD>The helper script xorriso-dd-target is developed in cooperation with <DD>The helper script xorriso-dd-target is developed in cooperation with
Nio Wiklund alias sudodus.)</DD> Nio Wiklund alias sudodus.)</DD>
<DT>libjte-1.0.0</DT> <DT>libjte-2.0.0</DT>
<DD>produces jigdo and template file together with the emerging ISO image.</DD> <DD>produces jigdo and template file together with the emerging ISO image.</DD>
<DD>(By Free Software Foundation, Steve McIntyre, George Danchev, <DD>(By Free Software Foundation, Steve McIntyre, George Danchev,
Thomas Schmitt)</DD> Thomas Schmitt)</DD>
@ -698,18 +723,58 @@ cdrecord and mkisofs.</DT>
<P> <P>
<DL> <DL>
<DT><H3>Development snapshot, version 1.5.5 :</H3></DT> <DT><H3>Development snapshot, version 1.5.7 :</H3></DT>
<DD>Bug fixes towards xorriso-1.5.4: <DD>Bug fixes towards stable version 1.5.6:
<UL> <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>
-outdev holding an ISO filesystem could get attached wrong start LBA
</LI>
<LI>
Command -load "volid" did not work with constant search text
</LI>
<LI>
Command -truncate_overwritable on ISO image without MD5 caused
double free of memory
</LI>
<LI>
Command -boot_image "any" "replay" failed after the legacy BIOS boot image
file was replaced by -map. Thanks Brian C. Lane.
</LI>
<LI>
Command -boot_image system_area=/dev/zero preserved system area of loaded ISO
</LI>
<LI>
Size assessment of ISO images smaller than 32 KiB yielded random values
</LI>
<!-- <!--
<LI>- none yet -</LI> <LI>- none yet -</LI>
--> -->
</UL> </UL>
</DD> </DD>
<DD>Enhancements towards stable version 1.5.4: <DD>Enhancements towards stable version 1.5.6:
<UL> <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>
The maximum number of appended GPT partitions was increased from 4 to 8
</LI>
<!-- <!--
<LI>- none yet -</LI> <LI>- none yet -</LI>
--> -->
@ -719,13 +784,13 @@ cdrecord and mkisofs.</DT>
<DD>&nbsp;</DD> <DD>&nbsp;</DD>
<DD><A HREF="README_xorriso_devel">README 1.5.5</A> <DD><A HREF="README_xorriso_devel">README 1.5.7</A>
<DD><A HREF="xorriso_help_devel">xorriso-1.5.5 -help</A></DD> <DD><A HREF="xorriso_help_devel">xorriso-1.5.7 -help</A></DD>
<DD><A HREF="xorrisofs_help_devel">xorriso-1.5.5 -as mkisofs -help</A></DD> <DD><A HREF="xorrisofs_help_devel">xorriso-1.5.7 -as mkisofs -help</A></DD>
<DD><A HREF="xorrecord_help_devel">xorriso-1.5.5 -as cdrecord -help</A></DD> <DD><A HREF="xorrecord_help_devel">xorriso-1.5.7 -as cdrecord -help</A></DD>
<DD><A HREF="man_1_xorriso_devel.html">man xorriso (as of 1.5.5)</A></DD> <DD><A HREF="man_1_xorriso_devel.html">man xorriso (as of 1.5.7)</A></DD>
<DD><A HREF="man_1_xorrisofs_devel.html">man xorrisofs (as of 1.5.5)</A></DD> <DD><A HREF="man_1_xorrisofs_devel.html">man xorrisofs (as of 1.5.7)</A></DD>
<DD><A HREF="man_1_xorrecord_devel.html">man xorrecord (as of 1.5.5)</A></DD> <DD><A HREF="man_1_xorrecord_devel.html">man xorrecord (as of 1.5.7)</A></DD>
<DD>&nbsp;</DD> <DD>&nbsp;</DD>
<DT>If you want to distribute development versions of xorriso, then use <DT>If you want to distribute development versions of xorriso, then use
this tarball which produces static linking between xorriso and the this tarball which produces static linking between xorriso and the
@ -735,8 +800,8 @@ libburnia libraries.
installation see README) installation see README)
</DD> </DD>
<DD> <DD>
<A HREF="xorriso-1.5.5.tar.gz">xorriso-1.5.5.tar.gz</A> <A HREF="xorriso-1.5.7.tar.gz">xorriso-1.5.7.tar.gz</A>
(2720 KiB). (2780 KiB).
</DD> </DD>
<DT>A dynamically linked development version of xorriso can be obtained <DT>A dynamically linked development version of xorriso can be obtained
from repositories of from repositories of
@ -765,18 +830,13 @@ versions for dynamic linking. Only release versions are safe for that.
But after the run of <KBD>./bootstrap</KBD>, only But after the run of <KBD>./bootstrap</KBD>, only
vanilla tools like make and gcc are needed. vanilla tools like make and gcc are needed.
</DT> </DT>
<DT>GNU xorriso contains a copy of libjte-1.0.0 or 2.0.0 from package jigit <DT>GNU xorriso contains a copy of libjte-2.0.0 from package jigit
which produces jigdo and template file together with the emerging ISO image. which produces jigdo and template file together with the emerging ISO image.
(By Free Software Foundation, Steve McIntyre, George Danchev, (By Free Software Foundation, Steve McIntyre, George Danchev,
Thomas Schmitt) Thomas Schmitt)
</DT> </DT>
<DD>Important: If desired, libjte has to be already installed when libisofs <DD>Important: If desired, libjte has to be already installed when libisofs
and libisoburn get built.</DD> and libisoburn get built.</DD>
<DD>Download: <KBD><B>wget http://www.einval.com/~steve/software/JTE/download/jigit_1.17.orig.tar.gz</B>
</KBD></DD>
<DD>Install: <KBD><B>tar xzf jigit_1.17.orig.tar.gz ; cd jigit-1.17 ; make ; make install</B>
</KBD></DD>
<DD>or</DD>
<DD>Download: <KBD><B>wget https://www.einval.com/~steve/software/JTE/download/jigit-1.22.tar.xz</B> <DD>Download: <KBD><B>wget https://www.einval.com/~steve/software/JTE/download/jigit-1.22.tar.xz</B>
</KBD></DD> </KBD></DD>
<DD>Install: <KBD><B>unxz &lt;jigit-1.22.tar.xz | tar xf - ; cd jigit-1.22 ; make ; make install</B> <DD>Install: <KBD><B>unxz &lt;jigit-1.22.tar.xz | tar xf - ; cd jigit-1.22 ; make ; make install</B>
@ -835,7 +895,7 @@ scdbackup, multi volume CD/DVD/BD backup</A></DD>
<BR> <BR>
Legal statement: This website does not serve any commercial purpose. Legal statement: This website does not serve any commercial purpose.
<BR><BR> <BR><BR>
Copyright &copy; 2008 - 2021 Thomas Schmitt. Copyright &copy; 2008 - 2023 Thomas Schmitt.
<BR> <BR>
This text is freely distributable. It shall only be modified in sync with This text is freely distributable. It shall only be modified in sync with
the factual properties of xorriso and its public storage locations. the factual properties of xorriso and its public storage locations.

View File

@ -2,7 +2,7 @@
/* xorriso - Command line oriented batch and dialog tool which creates, loads, /* xorriso - Command line oriented batch and dialog tool which creates, loads,
manipulates and burns ISO 9660 filesystem images. manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2021 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2023 Thomas Schmitt, <scdbackup@gmx.net>
Initial code of this program was derived from program src/askme.c out Initial code of this program was derived from program src/askme.c out
of scdbackup-0.8.8, Copyright 2007 Thomas Schmitt, BSD-License. of scdbackup-0.8.8, Copyright 2007 Thomas Schmitt, BSD-License.
@ -111,7 +111,7 @@
*/ */
#define Xorriso_req_majoR 1 #define Xorriso_req_majoR 1
#define Xorriso_req_minoR 5 #define Xorriso_req_minoR 5
#define Xorriso_req_micrO 4 #define Xorriso_req_micrO 7
static void yell_xorriso() static void yell_xorriso()
@ -276,7 +276,7 @@ int main(int argc, char **argv)
end_successfully:; /* normal shutdown, including eventual -commit */ end_successfully:; /* normal shutdown, including eventual -commit */
Xorriso_stop_msg_watcher(xorriso, 1); Xorriso_stop_msg_watcher(xorriso, 1);
Xorriso_process_msg_queues(xorriso, 0); 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_option_end(xorriso, 2);
Xorriso_process_msg_queues(xorriso, 0); Xorriso_process_msg_queues(xorriso, 0);
ret= Xorriso_make_return_value(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, /* Command line oriented batch and dialog tool which creates, loads,
manipulates and burns ISO 9660 filesystem images. 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. Provided under GPL version 2 or later.
@ -100,13 +100,20 @@ struct XorrisO { /* the global context of xorriso */
char initial_wdx[SfileadrL]; char initial_wdx[SfileadrL];
int no_rc; int no_rc;
/* Command line argument emulations: /* Command line argument emulations by program name:
0=xorriso mode 0=xorriso mode
1=mkisofs mode 1=mkisofs mode
2=cdrecord mode 2=cdrecord mode
*/ */
int argument_emulation; int argument_emulation;
/* Under which interpreter the current activities are running:
0=xorriso mode : Xorriso_interpreter()
1=mkisofs mode : Xorriso_genisofs()
2=cdrecord mode : Xorriso_cdrskin()
*/
int current_interpreter;
/** List of startupfiles */ /** List of startupfiles */
char rc_filenames[Xorriso_rc_nuM][SfileadrL]; char rc_filenames[Xorriso_rc_nuM][SfileadrL];
int rc_filename_count; int rc_filename_count;
@ -270,8 +277,8 @@ struct XorrisO { /* the global context of xorriso */
char application_use[SfileadrL]; char application_use[SfileadrL];
char session_logfile[SfileadrL]; char session_logfile[SfileadrL];
int session_lba; off_t session_lba;
int session_blocks; off_t session_blocks;
/* >>> put libburn/isoburn aspects here */ /* >>> put libburn/isoburn aspects here */
@ -295,6 +302,7 @@ struct XorrisO { /* the global context of xorriso */
1= value is session number 1= value is session number
2= value is track number 2= value is track number
3= value is lba 3= value is lba
4= value is volid
bit16= with mode 3 : value is possibly 16 too high. bit16= with mode 3 : value is possibly 16 too high.
Let isoburn_set_msc1() adjust it. Let isoburn_set_msc1() adjust it.
bit30= interference with normal msc1 processing bit30= interference with normal msc1 processing
@ -357,6 +365,11 @@ struct XorrisO { /* the global context of xorriso */
3= change pending, but the attempt to write it 3= change pending, but the attempt to write it
failed 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 */ int no_volset_present; /* set to 1 on first failure */
struct CheckmediajoB *check_media_default; struct CheckmediajoB *check_media_default;
@ -375,10 +388,10 @@ struct XorrisO { /* the global context of xorriso */
char outdev_off_adr[SfileadrL]; /* Result of burn_drive_convert_fs_adr(outdev) char outdev_off_adr[SfileadrL]; /* Result of burn_drive_convert_fs_adr(outdev)
when outdev gets acquired. */ when outdev gets acquired. */
int grow_blindly_msc2; /* if >= 0 this causes growing from drive to drive. off_t grow_blindly_msc2; /* if >= 0 this causes growing from drive to drive.
The value is used as block address offset for The value is used as block address offset for
image generation. Like in: mkisofs -C msc1,msc2 image generation. Like in: mkisofs -C msc1,msc2
*/ */
int ban_stdio_write; int ban_stdio_write;
int do_dummy; int do_dummy;
@ -406,6 +419,11 @@ struct XorrisO { /* the global context of xorriso */
>=16 means yes with number as start LBA */ >=16 means yes with number as start LBA */
int dvd_obs; /* DVD write chunk size: 0, 32k or 64k */ int dvd_obs; /* DVD write chunk size: 0, 32k or 64k */
int do_obs_pad; /* 1= pad up end on all media types */
int bdr_obs_exempt; /* 1= do not unconditionally apply do_obs_pad=1
to BD-R if not stream recording
*/
int modesty_on_drive; /* "enable" of burn_drive_set_buffer_waiting() int modesty_on_drive; /* "enable" of burn_drive_set_buffer_waiting()
0= disable , 1= enable waiting , 0= disable , 1= enable waiting ,
@ -553,6 +571,10 @@ struct XorrisO { /* the global context of xorriso */
uint8_t gpt_guid[16]; uint8_t gpt_guid[16];
int gpt_guid_mode; int gpt_guid_mode;
/* See libisoburn.h isoburn_igopt_set_max_ce_entries() */
uint32_t max_ce_entries;
uint32_t max_ce_entries_flag;
/* Eventual name of the non-ISO aspect of the image. E.g. SUN ASCII label. /* Eventual name of the non-ISO aspect of the image. E.g. SUN ASCII label.
*/ */
char ascii_disc_label[Xorriso_disc_label_sizE]; char ascii_disc_label[Xorriso_disc_label_sizE];
@ -608,7 +630,7 @@ struct XorrisO { /* the global context of xorriso */
*/ */
/* LBA of boot image after image loading */ /* 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 */ /* Path of the catalog node after image loading */
char loaded_boot_cat_path[SfileadrL]; char loaded_boot_cat_path[SfileadrL];

View File

@ -1 +1 @@
#define Xorriso_timestamP "2021.01.30.150001" #define Xorriso_timestamP "2024.05.19.204636"

View File

@ -4,7 +4,7 @@
a command line oriented batch and dialog tool which creates, loads, a command line oriented batch and dialog tool which creates, loads,
manipulates and burns ISO 9660 filesystem images. 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. Provided under GPL version 2 or later.
@ -19,7 +19,7 @@
*/ */
#define xorriso_libisoburn_req_major 1 #define xorriso_libisoburn_req_major 1
#define xorriso_libisoburn_req_minor 5 #define xorriso_libisoburn_req_minor 5
#define xorriso_libisoburn_req_micro 4 #define xorriso_libisoburn_req_micro 7
struct SpotlisT; /* List of intervals with different read qualities */ 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_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); 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_show_devices(struct XorrisO *xorriso, int flag);
int Xorriso_tell_media_space(struct XorrisO *xorriso, int Xorriso_tell_media_space(struct XorrisO *xorriso,
int *media_space, int *free_space, int flag); off_t *media_space, off_t *free_space, int flag);
/* @param flag bit0=fast , bit1=deformat /* @param flag bit0=fast , bit1=deformat
@return 0=failure, did not touch medium , -1=failure, altered medium @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 /* @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 @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 bit2= issue message about success
bit3= check whether source blocks are banned by in_sector_map 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, char *head_buffer, struct CheckmediajoB *job,
int flag); int flag);
@ -673,8 +675,23 @@ int Xorriso_make_guid(struct XorrisO *xorriso, char *line, int flag);
int Xorriso_set_libisofs_now(struct XorrisO *xorriso, 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 flag);
int Xorriso_assess_written_features(struct XorrisO *xorriso, char *mode,
int flag);
/* Frontend to isoburn_conv_name_chars() */
int Xorriso_conv_name_chars(struct XorrisO *xorriso, char *name,
char **result, size_t *result_len,
int name_space, int flag);
int Xorriso_warn_if_not_exist(struct XorrisO *xorriso, char *prefix,
char *purpose, char *path, int flag);
int Xorriso_warn_if_not_bootcat(struct XorrisO *xorriso, char *prefix,
char *purpose, char *path, int flag);
#endif /* Xorrisoburn_includeD */ #endif /* Xorrisoburn_includeD */

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH XORRISOFS 1 "Version 1.5.4, Jan 30, 2021" .TH XORRISOFS 1 "Version 1.5.7, May 07, 2024"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -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 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. quotations or an open quotation cause the next input line to be appended.
.TP .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 \fB\-f\fR
.br .br
Resolve symbolic links on disk rather than storing them as symbolic 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 Perform \-hide\-hfsplus using each line out of file disk_path as argument
disk_path_pattern. disk_path_pattern.
.TP .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: .B ISO image ID strings:
.PP .PP
The following strings and file addresses get stored in the Primary Volume The following strings and file addresses get stored in the Primary Volume
@ -1309,6 +1338,17 @@ If no bootable MBR is indicated by other options and a partition gets created
by \-append_partition, then \-\-mbr\-force\-bootable causes a by \-append_partition, then \-\-mbr\-force\-bootable causes a
bootflag like it would do with e.g. \-\-protective\-msdos\-label. bootflag like it would do with e.g. \-\-protective\-msdos\-label.
.TP .TP
\fB--gpt-iso-bootable\fR
Set bit 2 of the GPT partition flags for the ISO 9660 partition if such a GPT
partition emerges. This bit is specified as "Legacy BIOS bootable" but its
true significance is unclear.
Some GPT\-aware BIOS might want to see it in some partition.
.TP
\fB--gpt-iso-not-ro\fR
Do not set bit 60 of the GPT partition flags for the ISO 9660 partition if such
a GPT partition emerges. This bit is specified as "Read\-only" and thus
appropriate. But it is unusual in GPT disk partitions.
.TP
\fB\-partition_offset\fR 2kb_block_adr \fB\-partition_offset\fR 2kb_block_adr
Cause a partition table with a single partition that begins at the Cause a partition table with a single partition that begins at the
given block address. This is counted in 2048 byte given block address. This is counted in 2048 byte
@ -1398,9 +1438,21 @@ of type 0xee which covers the whole output data.
.br .br
By default, appended partitions get marked in GPT only if GPT is produced By default, appended partitions get marked in GPT only if GPT is produced
because of other options. because of other options.
.br
This option raises the maximum number of appended partitions from 4 to 8.
But it is not guaranteed that the resulting GPT partition will have the
given partition_number. Other GPT partitions may emerge. The final sorting by
start block address may put one of them in the partition entry with the desired
number, so that the appended partition will get a higher number.
.br
Given MBR partition types get translated.
0xef becomes C12A7328\-F81F\-11D2\-BA4B\-00A0C93EC93B, others become
EBD0A0A2\-B9E5\-4433\-87C0\-68B6B72699C7.
.TP .TP
\fB\-appended_part_as_apm\fR \fB\-appended_part_as_apm\fR
Marks partitions from \-append_partition in Apple Partition Map, too. Marks partitions from \-append_partition in Apple Partition Map, too.
The partition number in APM will not be influenced by \-append_partition
parameter partition_number.
.br .br
By default, appended partitions get marked in APM only if APM is produced By default, appended partitions get marked in APM only if APM is produced
because of other options and \-part_like_isohybrid is enabled. because of other options and \-part_like_isohybrid is enabled.
@ -2242,7 +2294,7 @@ Thomas Schmitt <scdbackup@gmx.net>
.br .br
for libburnia\-project.org for libburnia\-project.org
.SH COPYRIGHT .SH COPYRIGHT
Copyright (c) 2011 \- 2021 Thomas Schmitt Copyright (c) 2011 \- 2024 Thomas Schmitt
.br .br
Permission is granted to distribute this text freely. It shall only be 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 modified in sync with the technical properties of xorriso. If you make use

View File

@ -3,7 +3,7 @@ xorrisofs.texi.
xorrisofs - Emulation of ISO 9660 program mkisofs by program xorriso xorrisofs - Emulation of ISO 9660 program mkisofs by program xorriso
Copyright (C) 2011 - 2021 Thomas Schmitt Copyright (C) 2011 - 2023 Thomas Schmitt
Permission is granted to distribute this text freely. Permission is granted to distribute this text freely.
INFO-DIR-SECTION Archiving INFO-DIR-SECTION Archiving
@ -14,7 +14,7 @@ END-INFO-DIR-ENTRY
 
File: xorrisofs.info, Node: Top, Next: Overview, Up: (dir) File: xorrisofs.info, Node: Top, Next: Overview, Up: (dir)
xorrisofs 1.5.4 xorrisofs 1.5.7
*************** ***************
xorrisofs - Emulation of ISO 9660 program mkisofs by program xorriso 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 mark type can enclose the marks of the other type. A trailing
backslash \ outside quotations or an open quotation cause the next backslash \ outside quotations or an open quotation cause the next
input line to be appended. 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 -f
Resolve symbolic links on disk rather than storing them as symbolic 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 -hide-hfsplus-list disk_path
Perform -hide-hfsplus using each line out of file disk_path as Perform -hide-hfsplus using each line out of file disk_path as
argument disk_path_pattern. 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 File: xorrisofs.info, Node: ImageId, Next: Bootable, Prev: SetHide, Up: Options
@ -1144,6 +1166,16 @@ Examples:
If no bootable MBR is indicated by other options and a partition If no bootable MBR is indicated by other options and a partition
gets created by -append_partition, then --mbr-force-bootable causes gets created by -append_partition, then --mbr-force-bootable causes
a bootflag like it would do with e.g. --protective-msdos-label. a bootflag like it would do with e.g. --protective-msdos-label.
--gpt-iso-bootable
Set bit 2 of the GPT partition flags for the ISO 9660 partition if
such a GPT partition emerges. This bit is specified as "Legacy
BIOS bootable" but its true significance is unclear. Some
GPT-aware BIOS might want to see it in some partition.
--gpt-iso-not-ro
Do not set bit 60 of the GPT partition flags for the ISO 9660
partition if such a GPT partition emerges. This bit is specified
as "Read-only" and thus appropriate. But it is unusual in GPT disk
partitions.
-partition_offset 2kb_block_adr -partition_offset 2kb_block_adr
Cause a partition table with a single partition that begins at the Cause a partition table with a single partition that begins at the
given block address. This is counted in 2048 byte blocks, not in given block address. This is counted in 2048 byte blocks, not in
@ -1219,9 +1251,19 @@ Examples:
covers the whole output data. covers the whole output data.
By default, appended partitions get marked in GPT only if GPT is By default, appended partitions get marked in GPT only if GPT is
produced because of other options. produced because of other options.
This option raises the maximum number of appended partitions from 4
to 8. But it is not guaranteed that the resulting GPT partition
will have the given partition_number. Other GPT partitions may
emerge. The final sorting by start block address may put one of
them in the partition entry with the desired number, so that the
appended partition will get a higher number.
Given MBR partition types get translated. 0xef becomes
C12A7328-F81F-11D2-BA4B-00A0C93EC93B, others become
EBD0A0A2-B9E5-4433-87C0-68B6B72699C7.
-appended_part_as_apm -appended_part_as_apm
Marks partitions from -append_partition in Apple Partition Map, Marks partitions from -append_partition in Apple Partition Map,
too. too. The partition number in APM will not be influenced by
-append_partition parameter partition_number.
By default, appended partitions get marked in APM only if APM is By default, appended partitions get marked in APM only if APM is
produced because of other options and -part_like_isohybrid is produced because of other options and -part_like_isohybrid is
enabled. enabled.
@ -1970,7 +2012,7 @@ for libburnia-project.org
11.2 Copyright 11.2 Copyright
============== ==============
Copyright (c) 2011 - 2021 Thomas Schmitt Copyright (c) 2011 - 2024 Thomas Schmitt
Permission is granted to distribute this text freely. It shall only be Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of xorriso. If you make 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 use of the license to derive modified versions of xorriso then you are
@ -2002,10 +2044,13 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* --embedded-boot Fill System Area e.g. by MBR: SystemArea. (line 79) * --embedded-boot Fill System Area e.g. by MBR: SystemArea. (line 79)
* --emul-toc enable table-of-content emulation: SetProduct. (line 33) * --emul-toc enable table-of-content emulation: SetProduct. (line 33)
* --for_backup Enable backup fidelity: SetExtras. (line 92) * --for_backup Enable backup fidelity: SetExtras. (line 92)
* --gpt_disk_guid GPT GUID: SystemArea. (line 250) * --gpt-iso-bootable Set Legacy BIOS bootable flag: SystemArea.
(line 159)
* --gpt-iso-not-ro Do not set Read-only flag: SystemArea. (line 164)
* --gpt_disk_guid GPT GUID: SystemArea. (line 270)
* --grub2-boot-info Patch El Torito boot image: Bootable. (line 109) * --grub2-boot-info Patch El Torito boot image: Bootable. (line 109)
* --grub2-mbr Install modern GRUB2 MBR: SystemArea. (line 81) * --grub2-mbr Install modern GRUB2 MBR: SystemArea. (line 81)
* --grub2-sparc-core SUN SPARC core file: SystemArea. (line 305) * --grub2-sparc-core SUN SPARC core file: SystemArea. (line 325)
* --hardlinks Recording of hardlink relations: SetExtras. (line 130) * --hardlinks Recording of hardlink relations: SetExtras. (line 130)
* --mbr-force-bootable Enforce MBR bootable/active flag: SystemArea. * --mbr-force-bootable Enforce MBR bootable/active flag: SystemArea.
(line 148) (line 148)
@ -2017,10 +2062,10 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* --old-empty old block addresses for empty files: SetProduct. * --old-empty old block addresses for empty files: SetProduct.
(line 105) (line 105)
* --old-root-devno enable disk idevno with -old-root: SetInsert. * --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. * --old-root-no-ino disable disk ino with -old-root: SetInsert.
(line 93) (line 103)
* --old-root-no-md5 disable MD5 with -old-root: SetInsert. (line 111) * --old-root-no-md5 disable MD5 with -old-root: SetInsert. (line 121)
* --protective-msdos-label Patch System Area partition table: SystemArea. * --protective-msdos-label Patch System Area partition table: SystemArea.
(line 143) (line 143)
* --quoted_path_list read pathspecs from disk file: SetInsert. * --quoted_path_list read pathspecs from disk file: SetInsert.
@ -2037,24 +2082,24 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* --xattr Recording of any xattr: SetExtras. (line 116) * --xattr Recording of any xattr: SetExtras. (line 116)
* --xattr Recording of user xattr: SetExtras. (line 109) * --xattr Recording of user xattr: SetExtras. (line 109)
* --zisofs-version-2 enable recognition of zisofs2 files: SetInsert. * --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. * --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. * --zisofs2-susp-zf produce ZF for version 2 instead of Z2: SetInsert.
(line 70) (line 80)
* -A set Application Id: ImageId. (line 34) * -A set Application Id: ImageId. (line 34)
* -abstract set Abstract File path: ImageId. (line 57) * -abstract set Abstract File path: ImageId. (line 57)
* -allow-lowercase lowercase in ISO file names: SetCompl. (line 42) * -allow-lowercase lowercase in ISO file names: SetCompl. (line 42)
* -alpha-boot DEC Alpha SRM bootloader: SystemArea. (line 328) * -alpha-boot DEC Alpha SRM bootloader: SystemArea. (line 348)
* -appended_part_as_apm Appended partitions in APM: SystemArea. * -appended_part_as_apm Appended partitions in APM: SystemArea.
(line 234) (line 253)
* -appended_part_as_gpt Appended partitions in GPT: SystemArea. * -appended_part_as_gpt Appended partitions in GPT: SystemArea.
(line 228) (line 238)
* -append_partition Append MBR or GPT partition after image: SystemArea. * -append_partition Append MBR or GPT partition after image: SystemArea.
(line 198) (line 208)
* -appid set Application Id: ImageId. (line 41) * -appid set Application Id: ImageId. (line 41)
* -b El Torito PC-BIOS boot image: Bootable. (line 38) * -b El Torito PC-BIOS boot image: Bootable. (line 38)
* -B SUN SPARC boot images: SystemArea. (line 290) * -B SUN SPARC boot images: SystemArea. (line 310)
* -biblio set Biblio File path: ImageId. (line 62) * -biblio set Biblio File path: ImageId. (line 62)
* -boot-info-table Patch El Torito boot image: Bootable. (line 104) * -boot-info-table Patch El Torito boot image: Bootable. (line 104)
* -boot-load-size El Torito boot image load size: Bootable. (line 72) * -boot-load-size El Torito boot image load size: Bootable. (line 72)
@ -2066,9 +2111,10 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -checksum_algorithm_iso choose .jigdo checksums: Jigdo. (line 86) * -checksum_algorithm_iso choose .jigdo checksums: Jigdo. (line 86)
* -checksum_algorithm_template choose .template checksums: Jigdo. * -checksum_algorithm_template choose .template checksums: Jigdo.
(line 92) (line 92)
* -chrp-boot CHRP partition: SystemArea. (line 272) * -chrp-boot CHRP partition: SystemArea. (line 292)
* -chrp-boot-part CHRP partition: SystemArea. (line 263) * -chrp-boot-part CHRP partition: SystemArea. (line 283)
* -copyright set Copyright File path: ImageId. (line 66) * -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 allow deep directory hierarchies: SetExtras. (line 60)
* -d omit trailing dot in ISO file names: SetCompl. (line 50) * -d omit trailing dot in ISO file names: SetCompl. (line 50)
* -dev set path for loading existing ISO image: Loading. (line 23) * -dev set path for loading existing ISO image: Loading. (line 23)
@ -2078,7 +2124,7 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -disallow_dir_id_ext enforce ISO level 1 directory names: SetCompl. * -disallow_dir_id_ext enforce ISO level 1 directory names: SetCompl.
(line 23) (line 23)
* -e El Torito EFI boot image: Bootable. (line 53) * -e El Torito EFI boot image: Bootable. (line 53)
* -efi-boot-part EFI boot partition: SystemArea. (line 240) * -efi-boot-part EFI boot partition: SystemArea. (line 260)
* -eltorito-alt-boot begin next boot catalog entry: Bootable. (line 47) * -eltorito-alt-boot begin next boot catalog entry: Bootable. (line 47)
* -eltorito-boot El Torito PC-BIOS boot image: Bootable. (line 45) * -eltorito-boot El Torito PC-BIOS boot image: Bootable. (line 45)
* -eltorito-catalog El Torito boot catalog name: Bootable. (line 119) * -eltorito-catalog El Torito boot catalog name: Bootable. (line 119)
@ -2086,18 +2132,18 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -eltorito-platform El Torito Platform Id: Bootable. (line 63) * -eltorito-platform El Torito Platform Id: Bootable. (line 63)
* -eltorito-selcrit El Torito boot selection criteria: Bootable. * -eltorito-selcrit El Torito boot selection criteria: Bootable.
(line 100) (line 100)
* -exclude exclude disk files from inserting: SetInsert. (line 37) * -exclude exclude disk files from inserting: SetInsert. (line 47)
* -exclude-list exclude disk files from inserting: SetInsert. (line 44) * -exclude-list exclude disk files from inserting: SetInsert. (line 54)
* -f follow symbolic links on disk: SetInsert. (line 22) * -f follow symbolic links on disk: SetInsert. (line 32)
* -file-mode permissions for all data files: SetProduct. (line 92) * -file-mode permissions for all data files: SetProduct. (line 92)
* -file_name_limit curbs length of file names: SetExtras. (line 49) * -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. * -full-iso9660-filenames allow 31 characters in ISO file names: SetCompl.
(line 59) (line 59)
* -G Fill System Area e.g. by MBR: SystemArea. (line 68) * -G Fill System Area e.g. by MBR: SystemArea. (line 68)
* -generic-boot Fill System Area e.g. by MBR: SystemArea. (line 77) * -generic-boot Fill System Area e.g. by MBR: SystemArea. (line 77)
* -gid group assignment for all files: SetProduct. (line 83) * -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. * -gui increase frequency of pacifier messages: Miscellaneous.
(line 29) (line 29)
* -hard-disk-boot El Torito boot image emulation: Bootable. (line 83) * -hard-disk-boot El Torito boot image emulation: Bootable. (line 83)
@ -2124,12 +2170,13 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
(line 15) (line 15)
* -hide-rr-moved set deep directory relocation target: SetExtras. * -hide-rr-moved set deep directory relocation target: SetExtras.
(line 90) (line 90)
* -hppa-bootloader HP-PA bootloader file: SystemArea. (line 317) * -hide_iso_path keep a file invisible in ISO tree: SetHide. (line 31)
* -hppa-cmdline HP-PA PALO command line: SystemArea. (line 311) * -hppa-bootloader HP-PA bootloader file: SystemArea. (line 337)
* -hppa-hdrversion HP-PA PALO header version: SystemArea. (line 325) * -hppa-cmdline HP-PA PALO command line: SystemArea. (line 331)
* -hppa-kernel_32 HP-PA kernel_32 file: SystemArea. (line 319) * -hppa-hdrversion HP-PA PALO header version: SystemArea. (line 345)
* -hppa-kernel_64 HP-PA kernel_64 file: SystemArea. (line 321) * -hppa-kernel_32 HP-PA kernel_32 file: SystemArea. (line 339)
* -hppa-ramdisk HP-PA ramdisk file: SystemArea. (line 323) * -hppa-kernel_64 HP-PA kernel_64 file: SystemArea. (line 341)
* -hppa-ramdisk HP-PA ramdisk file: SystemArea. (line 343)
* -input-charset set character set of disk file names: Charset. * -input-charset set character set of disk file names: Charset.
(line 17) (line 17)
* -iso-level define ISO 9660 limitations: SetCompl. (line 7) * -iso-level define ISO 9660 limitations: SetCompl. (line 7)
@ -2161,19 +2208,19 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -joliet-utf16 use UTF-16 with Joliet names: SetExtras. (line 159) * -joliet-utf16 use UTF-16 with Joliet names: SetExtras. (line 159)
* -l allow 31 characters in ISO file names: SetCompl. (line 56) * -l allow 31 characters in ISO file names: SetCompl. (line 56)
* -log-file redirect stderr messages: Miscellaneous. (line 33) * -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) * -M set path for loading existing ISO image: Loading. (line 11)
* -max-iso9660-filenames allow 37 characters in ISO file names: SetCompl. * -max-iso9660-filenames allow 37 characters in ISO file names: SetCompl.
(line 61) (line 61)
* -md5-list set path of input checksum file: Jigdo. (line 81) * -md5-list set path of input checksum file: Jigdo. (line 81)
* -mips-boot MIPS Big Endian boot image: SystemArea. (line 279) * -mips-boot MIPS Big Endian boot image: SystemArea. (line 299)
* -mipsel-boot MIPS Little Endian boot image: SystemArea. (line 285) * -mipsel-boot MIPS Little Endian boot image: SystemArea. (line 305)
* -N omit version number in ISO file names: SetCompl. (line 64) * -N omit version number in ISO file names: SetCompl. (line 64)
* -no-emul-boot El Torito boot image emulation: Bootable. (line 86) * -no-emul-boot El Torito boot image emulation: Bootable. (line 86)
* -no-pad do not add zeros to ISO tree: SetProduct. (line 101) * -no-pad do not add zeros to ISO tree: SetProduct. (line 101)
* -o set output file address: SetProduct. (line 8) * -o set output file address: SetProduct. (line 8)
* -old-exclude exclude disk files from inserting: SetInsert. (line 42) * -old-exclude exclude disk files from inserting: SetInsert. (line 52)
* -old-root enable incremental insertion: SetInsert. (line 80) * -old-root enable incremental insertion: SetInsert. (line 90)
* -omit-period omit trailing dot in ISO file names: SetCompl. (line 54) * -omit-period omit trailing dot in ISO file names: SetCompl. (line 54)
* -omit-version-number omit version number in ISO file names: SetCompl. * -omit-version-number omit version number in ISO file names: SetCompl.
(line 69) (line 69)
@ -2183,15 +2230,15 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -p set Preparer Id: ImageId. (line 47) * -p set Preparer Id: ImageId. (line 47)
* -P set Publisher Id: ImageId. (line 28) * -P set Publisher Id: ImageId. (line 28)
* -pad add 300 KiB of zeros to ISO tree: SetProduct. (line 94) * -pad add 300 KiB of zeros to ISO tree: SetProduct. (line 94)
* -partition_cyl_align Image size alignment: SystemArea. (line 187) * -partition_cyl_align Image size alignment: SystemArea. (line 197)
* -partition_hd_cyl MBR heads per cylinder: SystemArea. (line 170) * -partition_hd_cyl MBR heads per cylinder: SystemArea. (line 180)
* -partition_offset Make mountable by partition 1: SystemArea. * -partition_offset Make mountable by partition 1: SystemArea.
(line 159) (line 169)
* -partition_sec_hd MBR sectors per head: SystemArea. (line 173) * -partition_sec_hd MBR sectors per head: SystemArea. (line 183)
* -part_like_isohybrid Mark partitions like with isohybrid: SystemArea. * -part_like_isohybrid Mark partitions like with isohybrid: SystemArea.
(line 122) (line 122)
* -path-list read pathspecs from disk file: SetInsert. (line 8) * -path-list read pathspecs from disk file: SetInsert. (line 8)
* -prep-boot-part PReP partition: SystemArea. (line 274) * -prep-boot-part PReP partition: SystemArea. (line 294)
* -preparer set Preparer Id: ImageId. (line 55) * -preparer set Preparer Id: ImageId. (line 55)
* -prev-session set path for loading existing ISO image: Loading. * -prev-session set path for loading existing ISO image: Loading.
(line 21) (line 21)
@ -2205,14 +2252,14 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -relaxed-filenames 7-bit special characters in ISO file names: SetCompl. * -relaxed-filenames 7-bit special characters in ISO file names: SetCompl.
(line 45) (line 45)
* -rock Rock Ridge (is enabled by default): SetExtras. (line 13) * -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. * -rr_reloc_dir set deep directory relocation target: SetExtras.
(line 74) (line 74)
* -sparc-boot SUN SPARC boot images: SystemArea. (line 301) * -sparc-boot SUN SPARC boot images: SystemArea. (line 321)
* -sparc-label SUN Disk Label text: SystemArea. (line 303) * -sparc-label SUN Disk Label text: SystemArea. (line 323)
* -sysid set System Id: ImageId. (line 43) * -sysid set System Id: ImageId. (line 43)
* -transparent-compression enable recognition of zisofs files: SetInsert. * -transparent-compression enable recognition of zisofs files: SetInsert.
(line 53) (line 63)
* -U very relaxed filename rules: SetCompl. (line 27) * -U very relaxed filename rules: SetCompl. (line 27)
* -uid ownership for all files: SetProduct. (line 79) * -uid ownership for all files: SetProduct. (line 79)
* -untranslated-filenames very relaxed filename rules: SetCompl. * -untranslated-filenames very relaxed filename rules: SetCompl.
@ -2224,8 +2271,8 @@ File: xorrisofs.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: T
* -version report program version: Miscellaneous. (line 43) * -version report program version: Miscellaneous. (line 43)
* -volid set Volume Id: ImageId. (line 23) * -volid set Volume Id: ImageId. (line 23)
* -volset set Volume Set Id: ImageId. (line 25) * -volset set Volume Set Id: ImageId. (line 25)
* -x exclude disk files from inserting: SetInsert. (line 39) * -x exclude disk files from inserting: SetInsert. (line 49)
* -z enable recognition of zisofs files: SetInsert. (line 47) * -z enable recognition of zisofs files: SetInsert. (line 57)
 
File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
@ -2239,7 +2286,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Abstract File, set path, -abstract: ImageId. (line 57) * Abstract File, set path, -abstract: ImageId. (line 57)
* ACL, record and load, --acl: SetExtras. (line 103) * ACL, record and load, --acl: SetExtras. (line 103)
* APM, mark appended partitions, -appended_part_as_apm: SystemArea. * APM, mark appended partitions, -appended_part_as_apm: SystemArea.
(line 234) (line 253)
* APM, _definition: SystemArea. (line 16) * APM, _definition: SystemArea. (line 16)
* Application Id, set, -A, -appid: ImageId. (line 34) * Application Id, set, -A, -appid: ImageId. (line 34)
* Backup, enable fidelity, --for_backup: SetExtras. (line 92) * Backup, enable fidelity, --for_backup: SetExtras. (line 92)
@ -2264,30 +2311,34 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
(line 104) (line 104)
* Bootability, bootable MBR partition, --mbr-force-bootable: SystemArea. * Bootability, bootable MBR partition, --mbr-force-bootable: SystemArea.
(line 148) (line 148)
* Bootability, control, --grub2-sparc-core: SystemArea. (line 305) * Bootability, control, --grub2-sparc-core: SystemArea. (line 325)
* Bootability, control, --efi-boot: Bootable. (line 59) * Bootability, control, --efi-boot: Bootable. (line 59)
* Bootability, control, -alpha-boot: SystemArea. (line 328) * Bootability, control, -alpha-boot: SystemArea. (line 348)
* Bootability, control, -b, -eltorito-boot: Bootable. (line 38) * Bootability, control, -b, -eltorito-boot: Bootable. (line 38)
* Bootability, control, -B, -sparc-boot: SystemArea. (line 290) * Bootability, control, -B, -sparc-boot: SystemArea. (line 310)
* Bootability, control, -e: Bootable. (line 53) * Bootability, control, -e: Bootable. (line 53)
* Bootability, control, -eltorito-platform: Bootable. (line 63) * Bootability, control, -eltorito-platform: Bootable. (line 63)
* Bootability, control, -hppa-bootloader: SystemArea. (line 317) * Bootability, control, -hppa-bootloader: SystemArea. (line 337)
* Bootability, control, -hppa-cmdline: SystemArea. (line 311) * Bootability, control, -hppa-cmdline: SystemArea. (line 331)
* Bootability, control, -hppa-hdrversion: SystemArea. (line 325) * Bootability, control, -hppa-hdrversion: SystemArea. (line 345)
* Bootability, control, -hppa-kernel_32: SystemArea. (line 319) * Bootability, control, -hppa-kernel_32: SystemArea. (line 339)
* Bootability, control, -hppa-kernel_64: SystemArea. (line 321) * Bootability, control, -hppa-kernel_64: SystemArea. (line 341)
* Bootability, control, -hppa-ramdisk: SystemArea. (line 323) * Bootability, control, -hppa-ramdisk: SystemArea. (line 343)
* Bootability, control, -mips-boot: SystemArea. (line 279) * Bootability, control, -mips-boot: SystemArea. (line 299)
* Bootability, control, -mipsel-boot: SystemArea. (line 285) * Bootability, control, -mipsel-boot: SystemArea. (line 305)
* Bootability, El Torito section id string, -eltorito-id: Bootable. * Bootability, El Torito section id string, -eltorito-id: Bootable.
(line 93) (line 93)
* Bootability, El Torito selection criteria, -eltorito-selcrit: Bootable. * Bootability, El Torito selection criteria, -eltorito-selcrit: Bootable.
(line 100) (line 100)
* Bootability, fill System Area e.g. by MBR, -G, --embedded-boot, -generic-boot: SystemArea. * Bootability, fill System Area e.g. by MBR, -G, --embedded-boot, -generic-boot: SystemArea.
(line 68) (line 68)
* Bootability, for CHRP, -chrp-boot-part: SystemArea. (line 263) * Bootability, for CHRP, -chrp-boot-part: SystemArea. (line 283)
* Bootability, for EFI, -efi-boot-part: SystemArea. (line 240) * Bootability, for EFI, -efi-boot-part: SystemArea. (line 260)
* Bootability, for PReP, -prep-boot-part: SystemArea. (line 274) * Bootability, for PReP, -prep-boot-part: SystemArea. (line 294)
* Bootability, GPT Legacy BIOS bootable, --gpt-iso-bootable: SystemArea.
(line 159)
* Bootability, GPT Read-only flag, --gpt-iso-not-ro: SystemArea.
(line 164)
* Bootability, install ISOLINUX isohybrid MBR, -isohybrid-mbr: SystemArea. * Bootability, install ISOLINUX isohybrid MBR, -isohybrid-mbr: SystemArea.
(line 87) (line 87)
* Bootability, install modern GRUB2 MBR, --grub2-mbr: SystemArea. * Bootability, install modern GRUB2 MBR, --grub2-mbr: SystemArea.
@ -2305,7 +2356,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
(line 122) (line 122)
* Bootability, patch System Area partition table, --protective-msdos-label: SystemArea. * Bootability, patch System Area partition table, --protective-msdos-label: SystemArea.
(line 143) (line 143)
* Bootability, SUN Disk Label text, -sparc-label: SystemArea. (line 303) * Bootability, SUN Disk Label text, -sparc-label: SystemArea. (line 323)
* Bootability, type of ISO MBR partition, -iso_mbr_part_type: SystemArea. * Bootability, type of ISO MBR partition, -iso_mbr_part_type: SystemArea.
(line 129) (line 129)
* Bugs, reporting: Bugreport. (line 6) * Bugs, reporting: Bugreport. (line 6)
@ -2321,10 +2372,10 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
(line 90) (line 90)
* Deep directories, relocation target, -rr_reloc_dir: SetExtras. * Deep directories, relocation target, -rr_reloc_dir: SetExtras.
(line 74) (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. * Disk files, exclude, -m, -exclude, -x, -old-exclude: SetInsert.
(line 31) (line 41)
* Disk GUID, for GPT, --gpt_disk_guid: SystemArea. (line 250) * Disk GUID, for GPT, --gpt_disk_guid: SystemArea. (line 270)
* disk_path, _definition: Insert. (line 7) * disk_path, _definition: Insert. (line 7)
* ECMA-119, _definition: Standards. (line 6) * ECMA-119, _definition: Standards. (line 6)
* El Torito, _definition: Bootable. (line 13) * El Torito, _definition: Bootable. (line 13)
@ -2333,7 +2384,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* File timestamps, set all, --set_all_file_dates: SetExtras. (line 35) * File timestamps, set all, --set_all_file_dates: SetExtras. (line 35)
* Forced output, control, --stdio_sync: SetProduct. (line 23) * Forced output, control, --stdio_sync: SetProduct. (line 23)
* GPT, mark appended partitions, -appended_part_as_gpt: SystemArea. * GPT, mark appended partitions, -appended_part_as_gpt: SystemArea.
(line 228) (line 238)
* GPT, _definition: SystemArea. (line 13) * GPT, _definition: SystemArea. (line 13)
* Group, for all files, -gid: SetProduct. (line 83) * Group, for all files, -gid: SetProduct. (line 83)
* HFS+, enables production: SetExtras. (line 164) * HFS+, enables production: SetExtras. (line 164)
@ -2345,20 +2396,22 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
(line 208) (line 208)
* HFS+, set serial number: SetExtras. (line 193) * HFS+, set serial number: SetExtras. (line 193)
* HFS+, _definition: Standards. (line 32) * 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: SetHide. (line 25)
* Hiding, from HFS+, -hide-hfsplus-list: SetHide. (line 28) * Hiding, from HFS+, -hide-hfsplus-list: SetHide. (line 28)
* Hiding, from ISO and Rock Ridge, -hide: SetHide. (line 8) * Hiding, from ISO and Rock Ridge, -hide: SetHide. (line 8)
* Hiding, from ISO and Rock Ridge, -hide-list: SetHide. (line 15) * Hiding, from ISO and Rock Ridge, -hide-list: SetHide. (line 15)
* Hiding, from Joliet, -hide-joliet: SetHide. (line 18) * Hiding, from Joliet, -hide-joliet: SetHide. (line 18)
* Hiding, from Joliet, -hide-joliet-list: SetHide. (line 22) * Hiding, from Joliet, -hide-joliet-list: SetHide. (line 22)
* Image size, alignment, -partition_cyl_align: SystemArea. (line 187) * Image size, alignment, -partition_cyl_align: SystemArea. (line 197)
* Incremental insertion, disable disk ino, --old-root-no-ino: SetInsert. * Incremental insertion, disable disk ino, --old-root-no-ino: SetInsert.
(line 93) (line 103)
* Incremental insertion, disable MD5, --old-root-no-md5: SetInsert. * Incremental insertion, disable MD5, --old-root-no-md5: SetInsert.
(line 111) (line 121)
* Incremental insertion, enable disk devno, --old-root-devno: SetInsert. * Incremental insertion, enable disk devno, --old-root-devno: SetInsert.
(line 104) (line 114)
* Incremental insertion, enable, -old-root: SetInsert. (line 80) * 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) * Interval reader for system area and partitions: SystemArea. (line 24)
* ISO 9660, _definition: Standards. (line 6) * ISO 9660, _definition: Standards. (line 6)
* ISO 9660:1999, _definition: Standards. (line 26) * ISO 9660:1999, _definition: Standards. (line 26)
@ -2386,7 +2439,7 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
(line 23) (line 23)
* ISO level, specify, -iso-level: SetCompl. (line 7) * ISO level, specify, -iso-level: SetCompl. (line 7)
* ISO level, specify, -iso-level <1>: SetCompl. (line 8) * 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) * iso_rr_path, _definition: Insert. (line 8)
* Jigdo Template Extraction, -checksum-list: Jigdo. (line 77) * Jigdo Template Extraction, -checksum-list: Jigdo. (line 77)
* Jigdo Template Extraction, -checksum_algorithm_iso: Jigdo. (line 86) * Jigdo Template Extraction, -checksum_algorithm_iso: Jigdo. (line 86)
@ -2407,25 +2460,25 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Joliet, allows longer names, -joliet-long: SetExtras. (line 153) * Joliet, allows longer names, -joliet-long: SetExtras. (line 153)
* Joliet, enable, -J, -joliet: SetExtras. (line 147) * Joliet, enable, -J, -joliet: SetExtras. (line 147)
* Joliet, _definition: Standards. (line 21) * 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) * Links, record and load hard links, --hardlinks: SetExtras. (line 130)
* MBR, GPT, append partition, -append_partition: SystemArea. (line 198) * MBR, GPT, append partition, -append_partition: SystemArea. (line 208)
* MBR, sectors per head, -partition_sec_hd: SystemArea. (line 170) * MBR, sectors per head, -partition_sec_hd: SystemArea. (line 180)
* MBR, sectors per head, -partition_sec_hd <1>: SystemArea. (line 173) * MBR, sectors per head, -partition_sec_hd <1>: SystemArea. (line 183)
* MBR, _definition: SystemArea. (line 9) * MBR, _definition: SystemArea. (line 9)
* MD5, record and load, --md5: SetExtras. (line 122) * MD5, record and load, --md5: SetExtras. (line 122)
* Message output, increase frequency, -gui: Miscellaneous. (line 29) * Message output, increase frequency, -gui: Miscellaneous. (line 29)
* Message output, redirect stderr, -log-file: Miscellaneous. (line 33) * Message output, redirect stderr, -log-file: Miscellaneous. (line 33)
* Message output, suppress, -quiet: Miscellaneous. (line 25) * Message output, suppress, -quiet: Miscellaneous. (line 25)
* Mountability, by non-trivial partition 1, -partition_offset: SystemArea. * Mountability, by non-trivial partition 1, -partition_offset: SystemArea.
(line 159) (line 169)
* Options, list, -help: Miscellaneous. (line 21) * Options, list, -help: Miscellaneous. (line 21)
* Output file, set address, -o, -output: SetProduct. (line 8) * Output file, set address, -o, -output: SetProduct. (line 8)
* Ownership, for all files, -uid: SetProduct. (line 79) * Ownership, for all files, -uid: SetProduct. (line 79)
* Padding, 300 KiB, -pad: SetProduct. (line 94) * Padding, 300 KiB, -pad: SetProduct. (line 94)
* Padding, disable, --old-empty: SetProduct. (line 105) * Padding, disable, --old-empty: SetProduct. (line 105)
* Padding, disable, -no-pad: SetProduct. (line 101) * 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, --quoted_path_list: SetInsert. (line 12)
* pathspec, read list of, -path-list: SetInsert. (line 8) * pathspec, read list of, -path-list: SetInsert. (line 8)
* pathspec, _definition: Insert. (line 11) * pathspec, _definition: Insert. (line 11)
@ -2458,13 +2511,13 @@ File: xorrisofs.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* xorriso, mkisofs emulation: Xorriso. (line 6) * xorriso, mkisofs emulation: Xorriso. (line 6)
* xorriso, options: Options. (line 6) * xorriso, options: Options. (line 6)
* Z2 instead of ZF for version 2, -zisofs2-susp-z2: SetInsert. * 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. * ZF instead of Z2 for version 2, -zisofs2-susp-zf: SetInsert.
(line 70) (line 80)
* zisofs file, enable recognition, -z, -transparent-compression: SetInsert. * zisofs file, enable recognition, -z, -transparent-compression: SetInsert.
(line 47) (line 57)
* zisofs2 file, enable recognition, -zisofs-version-2: SetInsert. * zisofs2 file, enable recognition, -zisofs-version-2: SetInsert.
(line 55) (line 65)
 
@ -2477,30 +2530,30 @@ Node: Xorriso5616
Node: Options6762 Node: Options6762
Node: Loading7489 Node: Loading7489
Node: SetInsert9530 Node: SetInsert9530
Node: SetProduct14900 Node: SetProduct15465
Node: SetCompl20471 Node: SetCompl21036
Node: SetExtras23063 Node: SetExtras23628
Node: SetHide34672 Node: SetHide35237
Node: ImageId35976 Node: ImageId37236
Node: Bootable40258 Node: Bootable41518
Node: SystemArea46544 Node: SystemArea47804
Node: Charset65074 Node: Charset67532
Node: Jigdo66099 Node: Jigdo68557
Node: Miscellaneous71069 Node: Miscellaneous73527
Node: Examples72714 Node: Examples75172
Node: ExSimple73208 Node: ExSimple75666
Node: ExGraft73691 Node: ExGraft76149
Node: ExMkisofs74991 Node: ExMkisofs77449
Node: ExGrowisofs76799 Node: ExGrowisofs79257
Node: ExIncBackup77989 Node: ExIncBackup80447
Node: ExIncBckAcc81165 Node: ExIncBckAcc83623
Node: ExBootable82870 Node: ExBootable85328
Node: Files87052 Node: Files89510
Node: Environ88147 Node: Environ90605
Node: Seealso89020 Node: Seealso91478
Node: Bugreport89671 Node: Bugreport92129
Node: Legal90264 Node: Legal92722
Node: CommandIdx91161 Node: CommandIdx93619
Node: ConceptIdx107943 Node: ConceptIdx110757
 
End Tag Table End Tag Table

View File

@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*- \input texinfo @c -*-texinfo-*-
@c %**start of header @c %**start of header
@setfilename xorrisofs.info @setfilename xorrisofs.info
@settitle GNU xorrisofs 1.5.4 @settitle GNU xorrisofs 1.5.7
@c %**end of header @c %**end of header
@c @c
@c man-ignore-lines begin @c man-ignore-lines begin
@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps @c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @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 .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISOFS 1 "Version 1.5.4, Jan 30, 2021" @c man .TH XORRISOFS 1 "Version 1.5.7, May 07, 2024"
@c man .\" Please adjust this date whenever revising the manpage. @c man .\" Please adjust this date whenever revising the manpage.
@c man .\" @c man .\"
@c man .\" Some roff macros, for reference: @c man .\" Some roff macros, for reference:
@ -68,7 +68,7 @@
@copying @copying
xorrisofs - Emulation of ISO 9660 program mkisofs by program xorriso xorrisofs - Emulation of ISO 9660 program mkisofs by program xorriso
Copyright @copyright{} 2011 - 2021 Thomas Schmitt Copyright @copyright{} 2011 - 2023 Thomas Schmitt
@quotation @quotation
Permission is granted to distribute this text freely. Permission is granted to distribute this text freely.
@ -76,7 +76,7 @@ Permission is granted to distribute this text freely.
@end copying @end copying
@c man-ignore-lines end @c man-ignore-lines end
@titlepage @titlepage
@title Manual of GNU xorriso personality xorrisofs 1.5.4 @title Manual of GNU xorriso personality xorrisofs 1.5.7
@author Thomas Schmitt @author Thomas Schmitt
@page @page
@vskip 0pt plus 1filll @vskip 0pt plus 1filll
@ -85,7 +85,7 @@ Permission is granted to distribute this text freely.
@contents @contents
@ifnottex @ifnottex
@node Top @node Top
@top xorrisofs 1.5.4 @top xorrisofs 1.5.7
@c man-ignore-lines 1 @c man-ignore-lines 1
@c man .SH NAME @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 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. quotations or an open quotation cause the next input line to be appended.
@c man .TP @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 @item -f
@kindex -f follow symbolic links on disk @kindex -f follow symbolic links on disk
@cindex Links, follow on disk, -f, -follow-links @cindex Links, follow on disk, -f, -follow-links
@ -408,7 +423,7 @@ Alias of -m.
@c man .TP @c man .TP
@item -exclude-list disk_path @item -exclude-list disk_path
@kindex -exclude-list exclude disk files from inserting @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. Perform -m using each line out of file disk_path as argument disk_pattern.
@c man .TP @c man .TP
@item -z @item -z
@ -1169,6 +1184,24 @@ if their disk_path matches the given shell parser pattern.
@cindex Hiding, from HFS+, -hide-hfsplus-list @cindex Hiding, from HFS+, -hide-hfsplus-list
Perform -hide-hfsplus using each line out of file disk_path as argument Perform -hide-hfsplus using each line out of file disk_path as argument
disk_path_pattern. 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: @minus{}@minus{}boot-catalog-hide
@end table @end table
@c man .TP @c man .TP
@c man .B ISO image ID strings: @c man .B ISO image ID strings:
@ -1725,6 +1758,21 @@ If no bootable MBR is indicated by other options and a partition gets created
by -append_partition, then @minus{}@minus{}mbr-force-bootable causes a by -append_partition, then @minus{}@minus{}mbr-force-bootable causes a
bootflag like it would do with e.g. @minus{}@minus{}protective-msdos-label. bootflag like it would do with e.g. @minus{}@minus{}protective-msdos-label.
@c man .TP @c man .TP
@item @minus{}@minus{}gpt-iso-bootable
@kindex @minus{}@minus{}gpt-iso-bootable Set Legacy BIOS bootable flag
@cindex Bootability, GPT Legacy BIOS bootable, @minus{}@minus{}gpt-iso-bootable
Set bit 2 of the GPT partition flags for the ISO 9660 partition if such a GPT
partition emerges. This bit is specified as "Legacy BIOS bootable" but its
true significance is unclear.
Some GPT-aware BIOS might want to see it in some partition.
@c man .TP
@item @minus{}@minus{}gpt-iso-not-ro
@kindex @minus{}@minus{}gpt-iso-not-ro Do not set Read-only flag
@cindex Bootability, GPT Read-only flag, @minus{}@minus{}gpt-iso-not-ro
Do not set bit 60 of the GPT partition flags for the ISO 9660 partition if such
a GPT partition emerges. This bit is specified as "Read-only" and thus
appropriate. But it is unusual in GPT disk partitions.
@c man .TP
@item -partition_offset 2kb_block_adr @item -partition_offset 2kb_block_adr
@kindex -partition_offset Make mountable by partition 1 @kindex -partition_offset Make mountable by partition 1
@cindex Mountability, by non-trivial partition 1, -partition_offset @cindex Mountability, by non-trivial partition 1, -partition_offset
@ -1826,11 +1874,23 @@ of type 0xee which covers the whole output data.
@* @*
By default, appended partitions get marked in GPT only if GPT is produced By default, appended partitions get marked in GPT only if GPT is produced
because of other options. because of other options.
@*
This option raises the maximum number of appended partitions from 4 to 8.
But it is not guaranteed that the resulting GPT partition will have the
given partition_number. Other GPT partitions may emerge. The final sorting by
start block address may put one of them in the partition entry with the desired
number, so that the appended partition will get a higher number.
@*
Given MBR partition types get translated.
0xef becomes C12A7328-F81F-11D2-BA4B-00A0C93EC93B, others become
EBD0A0A2-B9E5-4433-87C0-68B6B72699C7.
@c man .TP @c man .TP
@item -appended_part_as_apm @item -appended_part_as_apm
@kindex -appended_part_as_apm Appended partitions in APM @kindex -appended_part_as_apm Appended partitions in APM
@cindex APM, mark appended partitions, -appended_part_as_apm @cindex APM, mark appended partitions, -appended_part_as_apm
Marks partitions from -append_partition in Apple Partition Map, too. Marks partitions from -append_partition in Apple Partition Map, too.
The partition number in APM will not be influenced by -append_partition
parameter partition_number.
@* @*
By default, appended partitions get marked in APM only if APM is produced By default, appended partitions get marked in APM only if APM is produced
because of other options and -part_like_isohybrid is enabled. because of other options and -part_like_isohybrid is enabled.
@ -2917,7 +2977,7 @@ Thomas Schmitt <scdbackup@@gmx.net>
for libburnia-project.org for libburnia-project.org
@c man .SH COPYRIGHT @c man .SH COPYRIGHT
@section Copyright @section Copyright
Copyright (c) 2011 - 2021 Thomas Schmitt Copyright (c) 2011 - 2024 Thomas Schmitt
@* @*
Permission is granted to distribute this text freely. It shall only be 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 modified in sync with the technical properties of xorriso. If you make use