Looking at 2.0.28/drivers/char/mem.c, I find this:
static int read_full(struct inode * node, struct file * file, char * buf,int count)
{
file->f_pos += count;
return count;
}
It appears that read_full advances the file position as if data had been
read, but doesn't put any data in the buffer... So whatever data was
last read on this file descriptor shows up over and over.
Is this what /dev/full should do on read?
What would a more correct behavior be?
I searched the kernel archives, and found that someone else posted
about this bug around January 7, but there were no replies, and
the bug was not fixed. There are no patches to mem.c in 2.0.29.
Steve
ssd@nevets.oau.org