#855463 e2image: attempt to seek into a pipe

Package:
e2fsprogs
Source:
e2fsprogs
Description:
ext2/ext3/ext4 file system utilities
Submitter:
"G.raud"
Date:
2017-09-21 13:24:03 UTC
Severity:
wishlist
#855463#5
Date:
2017-02-18 17:13:53 UTC
From:
To:
e2image tries to seek into an ouput to stdout ("-"), even when it is a
pipe:
------
#  LC_ALL=C  e2image /dev/mapper/debian-var - | cat >test
e2image 1.42.12 (29-Aug-2014)
seek_set: Illegal seek
------

According the manpage, only the raw and qcow2 formats require seeking
into the output.

#855463#10
Date:
2017-08-22 22:15:27 UTC
From:
To:
severity 855463 wishlist
merge 236408 855463
thanks

Actually, the manage states that only the raw mode supports using
stdout:

   If image-file is -, then the output of e2image will be sent to
   standard output, so that the output can be piped to another
   program, such as gzip(1).  (Note that this is currently only
   supported when creating a raw image file using the -r option, since
   the process of creating a normal image file, or QCOW2 image
   currently requires random access to the file, which cannot be done
   using a pipe.  This restriction will hopefully be lifted in a
   future version of e2image.)

The fact that e2image doesn't work on "normal" e2image files is a
long-standing short-coming.  But note that it's really an obsolete
format.  The raw or qcow image formats are actually far more useful,
and the primary use cases of e2image today.  The only reason why
"normal" is still used to describe the original e2image format is for
historical reasons.

Cheers,

					- Ted

#855463#21
Date:
2017-09-21 13:20:21 UTC
From:
To:
Either I misread that part or the manpage in jessie was erroneous.

To avoid that someone else makes the same mistake, I suggest to put a
warning message to stderr in case such a combination of options is
selected, because "seek_set: Illegal seek" implies a programming error.

Regards