[Pkg-libburnia-devel] Bug#1010098: xorriso: please allow -cut-out directly from block devices
Thomas Schmitt
scdbackup at gmx.net
Mon Apr 25 19:42:28 BST 2022
Hi,
the plan to allow nearly all file types with -cut_out is dwindeling:
- lseek(SEEK_END) on S_IFCHR /dev/zero returns 0, not -1.
- open() on S_IFIFO blocks (and i don't want to know what it will do
in libisofs). IIRC a successful open() has side effects on the fifo.
- S_IFSOCK fails properly with the lseek test.
But in this case open() fails with errno 6 "No such device or address"
although it exists as file /run/user/...userid../pulse/native.
So i don't know what might happen with other sockets.
So if we exclude S_IFSOCK, S_IFLNK, S_IFDIR, S_IFIFO there remain only
S_IFREG, S_IFBLK, S_IFCHR with the latter on Linux behaving like S_IFREG
with 0 bytes of content. (As said on FreeBSD it could be a lseekable disk
device.)
Now i ponder whether i shall count S_IFCHR with size 0 as non-seekable
or really as empty file.
And whether i shall have a negative list of four types or a positive list
of three types.
Further it turned out that the lseek test in libisofs falls victim to
a bug in fs_local.c and fs_image.c which trick iso_file_source_lseek()
into returning libisofs error codes as positive off_t numbers.
A bug from the very early days of libisofs.
I am still testing but looking forward to committing the changes tomorrow.
Have a nice day :)
Thomas
More information about the Pkg-libburnia-devel
mailing list