21143 updates, and Re: large number of TX packets on ftp
Peter Stein
nbi@xnet.com
Wed Jul 29 22:24:25 1998
>> (it appears /dev/null is not diskless).
>What is that supposed to mean? Of course accessing /dev/null does not
>cause disk activity.
Oh yes it does. This anomaly is even pointed out in some of the linux
documentation. But I'm not trying to be argumentative. Please read what
follows.
>In fact here are the exact functions used to implement the read and write
>syscalls for /dev/null (in drivers/char/mem.c)
>static ssize_t read_null(struct file * file, char * buf,
> size_t count, loff_t *ppos)
>{
> return 0;
>}
>
>static ssize_t write_null(struct file * file, const char * buf,
> size_t count, loff_t *ppos)
>{
> return count;
>}
Guess what? My mem.c contains different code! Here are my mem.c functions:
static int read_null(struct inode * node, struct file * file,
char * buf, int count)
{
return 0;
}
static int write_null(struct inode * inode, struct file * file,
const char * buf, int count)
{
return count;
}
Clearly a hint that things are different on our systems. Your versions
look much newer and I suspect in your distribution this problem was
fixed. My code base is RedHat 4.2 upgraded from 4.1 and I assumed all
the code is fairly current, but apparently this is not the case. Which
distribution did your mem.c come from?
Peter Stein
nbi@xnet.com