Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - etfsctl and stdin: (2 Items)
   
etfsctl and stdin  
I've found a problem with etfsctl and stdin; specifically when runing etfsctl where the input file is stdin, and the 
output part has bad blocks.

In trans_write(), if there was a problem writing the record to the part, there is some code to correctly reposition the 
input and output to allow the containing block to be skipped.  However, if the input is stdin, and is coming from a pipe
, the fseek() call to rewind the src will silently fail, and the resulting filesystem will be incorrect.

For example, if one were to do something like:

gzip -d /tmp/myetfs.gz | etfsctl -S -e -w - -c

-garyf
Re: etfsctl and stdin  
Gary,

Thank you for this report.  You are right that etfsctl requires an input stream capable of seeking, if there is a chance
 of bad blocks on the output device.  I will open a problem report to track/fix this.

Until then, the workaround is to use an input file capable of seeking.

David


> I've found a problem with etfsctl and stdin; specifically when runing etfsctl 
> where the input file is stdin, and the output part has bad blocks.
> 
> In trans_write(), if there was a problem writing the record to the part, there
>  is some code to correctly reposition the input and output to allow the 
> containing block to be skipped.  However, if the input is stdin, and is coming
>  from a pipe, the fseek() call to rewind the src will silently fail, and the 
> resulting filesystem will be incorrect.
> 
> For example, if one were to do something like:
> 
> gzip -d /tmp/myetfs.gz | etfsctl -S -e -w - -c
> 
> -garyf