Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135489
b: refs/heads/master
c: c7a913c
h: refs/heads/master
i:
  135487: d1ecd8f
v: v3
  • Loading branch information
Eric Leblond authored and Patrick McHardy committed Mar 16, 2009
1 parent 08a5cb6 commit 8080c3f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca735b3aaa945626ba65a3e51145bfe4ecd9e222
refs/heads/master: c7a913cd5535554d6f5d5e1f5ef46c4307cf2afc
28 changes: 26 additions & 2 deletions trunk/net/netfilter/nf_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,37 @@ static int seq_show(struct seq_file *s, void *v)
{
loff_t *pos = v;
const struct nf_logger *logger;
struct nf_logger *t;
int ret;

logger = rcu_dereference(nf_loggers[*pos]);

if (!logger)
return seq_printf(s, "%2lld NONE\n", *pos);
ret = seq_printf(s, "%2lld NONE (", *pos);
else
ret = seq_printf(s, "%2lld %s (", *pos, logger->name);

if (ret < 0)
return ret;

mutex_lock(&nf_log_mutex);
list_for_each_entry(t, &nf_loggers_l[*pos], list[*pos]) {
ret = seq_printf(s, "%s", t->name);
if (ret < 0) {
mutex_unlock(&nf_log_mutex);
return ret;
}
if (&t->list[*pos] != nf_loggers_l[*pos].prev) {
ret = seq_printf(s, ",");
if (ret < 0) {
mutex_unlock(&nf_log_mutex);
return ret;
}
}
}
mutex_unlock(&nf_log_mutex);

return seq_printf(s, "%2lld %s\n", *pos, logger->name);
return seq_printf(s, ")\n");
}

static const struct seq_operations nflog_seq_ops = {
Expand Down

0 comments on commit 8080c3f

Please sign in to comment.