stdin does not work for imageinfo
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".
Interesting ... according the the man page on lseek, it should return an "ESPIPE" error for stdin but it is not doing that.