Allowed lseekable device files with -cut_out. Proof-of-concept by Ivan Shmakov.

This commit is contained in:
2022-04-26 12:17:22 +02:00
parent 0ef65a7837
commit fc587966d3
6 changed files with 172 additions and 103 deletions

View File

@@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO 1 "Version 1.5.5, Sep 13, 2021"
@c man .TH XORRISO 1 "Version 1.5.5, Apr 26, 2022"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@@ -69,7 +69,7 @@
xorriso - creates, loads, manipulates and writes ISO 9660 filesystem images
with Rock Ridge extensions.
Copyright @copyright{} 2007 - 2021 Thomas Schmitt
Copyright @copyright{} 2007 - 2022 Thomas Schmitt
@quotation
Permission is granted to distribute this text freely.
@@ -1701,16 +1701,18 @@ iso_rr_paths are derived by exchanging disk_prefix by iso_rr_prefix before
pattern expansion happens. The current -cdi directory has no influence.
@c man .TP
@item -cut_out disk_path byte_offset byte_count iso_rr_path
@kindex -cut_out inserts piece of data file
@cindex Insert, piece of data file, -cut_out
Map a byte interval of a regular disk file into a regular file in the ISO
image.
This 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. Only the newest Linux kernels
seem to read properly files >= 4 GiB - 1.
@kindex -cut_out inserts 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.
@*
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.
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.
@@ -1735,7 +1737,14 @@ 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
regular file. This affects commands -compare*, -update*, and overwrite
situations.
@*
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
@item -cpr disk_path [***] iso_rr_path
@kindex -cpr inserts like with cp -r
@@ -3393,7 +3402,7 @@ Both words then stem from a reserved subset of UCS-2.
@*
"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
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
when a pathspec is encountered.
@*
@@ -7620,7 +7629,7 @@ Thomas Schmitt <scdbackup@@gmx.net>
for libburnia-project.org
@c man .SH COPYRIGHT
@section Copyright
Copyright (c) 2007 - 2021 Thomas Schmitt
Copyright (c) 2007 - 2022 Thomas Schmitt
@*
Permission is granted to distribute this text freely. It shall only be
modified in sync with the technical properties of @command{xorriso}.