On Mon, Aug 15, 2016 at 10:41:02AM +1000, Dave Horsfall wrote:
Probably not much use to you, but back in Ed6 I did
modify it to return
the amount of data in the pipe.
7th Ed seems to return the amount of free space in the pipe, if I read
the code correctly:
fstat()
{
...
/* Call stat1() with the current offset in the pipe */
stat1(fp->f_inode, uap->sb, fp->f_flag&FPIPE? fp->f_un.f_offset: 0);
}
stat1()
{
...
ds.st_size = ip->i_size - pipeadj;
}
Cheers, Warren