stdin does not work for imageinfo

Bug #252404 reported by Gene Czarcinski
2
Affects Status Importance Assigned to Milestone
partimage-ng
New
Undecided
Unassigned

Bug Description

Using stdin for the input imagefile when doing the "imageinfo" command does not work. This might occur if you have a commpressed imagefile and you use zcat to decompress it, partimage-ng imageinfo stdin
will produce garbage output.

The reason appears to be that lseek does not work for stdin.

This may not be easily fixable.

1. At the very least, an error message that "stdin" is not supported for imageinfo needs to be added.

2. A potential fix is to actually read all of the data (ignoring the input) rather than trying to "skip" over it. This should work but will (natuarally) take a lot more time and use a lot more computer resources. If implemented, this "read and ignore" should only be used if the input is "stdin".

Revision history for this message
Gene Czarcinski (gene-czarc) wrote :

Interesting ... according the the man page on lseek, it should return an "ESPIPE" error for stdin but it is not doing that.

Revision history for this message
Gene Czarcinski (gene-czarc) wrote :

fix in devel-gc1/devel-gc2 r140

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.