netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Doc: seq_file.txt fix wrong dd command example.
@ 2009-05-26 13:18 Jesper Dangaard Brouer
  2009-05-26 13:18 ` [PATCH 2/2] Bugfix: xt_hashlimit does a wrong SEQ_SKIP Jesper Dangaard Brouer
  0 siblings, 1 reply; 3+ messages in thread
From: Jesper Dangaard Brouer @ 2009-05-26 13:18 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, netfilter-devel, Patrick McHardy, Jonathan Corbet,
	Jesper Dangaard Brouer

Small error in the "dd" command example, "out=" should be "of=".

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
---

 Documentation/filesystems/seq_file.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/filesystems/seq_file.txt b/Documentation/filesystems/seq_file.txt
index b843743..0d15ebc 100644
--- a/Documentation/filesystems/seq_file.txt
+++ b/Documentation/filesystems/seq_file.txt
@@ -46,7 +46,7 @@ better to do. The file is seekable, in that one can do something like the
 following:
 
     dd if=/proc/sequence of=out1 count=1
-    dd if=/proc/sequence skip=1 out=out2 count=1
+    dd if=/proc/sequence skip=1 of=out2 count=1
 
 Then concatenate the output files out1 and out2 and get the right
 result. Yes, it is a thoroughly useless module, but the point is to show


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] Bugfix: xt_hashlimit does a wrong SEQ_SKIP.
  2009-05-26 13:18 [PATCH 1/2] Doc: seq_file.txt fix wrong dd command example Jesper Dangaard Brouer
@ 2009-05-26 13:18 ` Jesper Dangaard Brouer
  2009-05-27 13:46   ` Patrick McHardy
  0 siblings, 1 reply; 3+ messages in thread
From: Jesper Dangaard Brouer @ 2009-05-26 13:18 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, netfilter-devel, Patrick McHardy, Jonathan Corbet,
	Jesper Dangaard Brouer

(Inside net/netfilter/xt_hashlimit.c)
The function dl_seq_show() returns 1 (equal to SEQ_SKIP) in case
a seq_printf() call return -1.  It should return -1.

This SEQ_SKIP behavior brakes processing the proc file e.g. via a
pipe or just through less.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
---

 net/netfilter/xt_hashlimit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index a5b5369..219dcdb 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -926,7 +926,7 @@ static int dl_seq_show(struct seq_file *s, void *v)
 	if (!hlist_empty(&htable->hash[*bucket])) {
 		hlist_for_each_entry(ent, pos, &htable->hash[*bucket], node)
 			if (dl_seq_real_show(ent, htable->family, s))
-				return 1;
+				return -1;
 	}
 	return 0;
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] Bugfix: xt_hashlimit does a wrong SEQ_SKIP.
  2009-05-26 13:18 ` [PATCH 2/2] Bugfix: xt_hashlimit does a wrong SEQ_SKIP Jesper Dangaard Brouer
@ 2009-05-27 13:46   ` Patrick McHardy
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2009-05-27 13:46 UTC (permalink / raw)
  To: Jesper Dangaard Brouer
  Cc: David S. Miller, netdev, netfilter-devel, Jonathan Corbet

Jesper Dangaard Brouer wrote:
> (Inside net/netfilter/xt_hashlimit.c)
> The function dl_seq_show() returns 1 (equal to SEQ_SKIP) in case
> a seq_printf() call return -1.  It should return -1.
> 
> This SEQ_SKIP behavior brakes processing the proc file e.g. via a
> pipe or just through less.

Applied patch 2/2, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-27 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-26 13:18 [PATCH 1/2] Doc: seq_file.txt fix wrong dd command example Jesper Dangaard Brouer
2009-05-26 13:18 ` [PATCH 2/2] Bugfix: xt_hashlimit does a wrong SEQ_SKIP Jesper Dangaard Brouer
2009-05-27 13:46   ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).