mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
ax25: proc uid file misses header
This has been broken for a while. I happened to catch it testing because one app "knew" that the top line of the calls data was the policy line and got confused. Put the header back. Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e8d1937073
commit
c7c1a0f60b
1 changed files with 9 additions and 3 deletions
|
@ -148,9 +148,13 @@ static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos)
|
||||||
{
|
{
|
||||||
struct ax25_uid_assoc *pt;
|
struct ax25_uid_assoc *pt;
|
||||||
struct hlist_node *node;
|
struct hlist_node *node;
|
||||||
int i = 0;
|
int i = 1;
|
||||||
|
|
||||||
read_lock(&ax25_uid_lock);
|
read_lock(&ax25_uid_lock);
|
||||||
|
|
||||||
|
if (*pos == 0)
|
||||||
|
return SEQ_START_TOKEN;
|
||||||
|
|
||||||
ax25_uid_for_each(pt, node, &ax25_uid_list) {
|
ax25_uid_for_each(pt, node, &ax25_uid_list) {
|
||||||
if (i == *pos)
|
if (i == *pos)
|
||||||
return pt;
|
return pt;
|
||||||
|
@ -162,8 +166,10 @@ static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos)
|
||||||
static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos)
|
static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos)
|
||||||
{
|
{
|
||||||
++*pos;
|
++*pos;
|
||||||
|
if (v == SEQ_START_TOKEN)
|
||||||
return hlist_entry(((ax25_uid_assoc *)v)->uid_node.next,
|
return ax25_uid_list.first;
|
||||||
|
else
|
||||||
|
return hlist_entry(((ax25_uid_assoc *)v)->uid_node.next,
|
||||||
ax25_uid_assoc, uid_node);
|
ax25_uid_assoc, uid_node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue