o net/core/dev: another fix for the seq_file handling of /proc/net/dev

With this one and 100 dummy interfaces everything now is working
flawlessly, case closed :-)
parent e9442649
......@@ -1797,7 +1797,7 @@ static __inline__ struct net_device *dev_get_idx(struct seq_file *seq,
void *dev_seq_start(struct seq_file *seq, loff_t *pos)
{
read_lock(&dev_base_lock);
return *pos ? dev_get_idx(seq, *pos) : (void *)1;
return *pos ? dev_get_idx(seq, *pos - 1) : (void *)1;
}
void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment