Skip to contentSkip to conversation

Doc: seq_file.txt fix wrong dd command example.

PATCH Applied Jesper Dangaard Brouer 2 participants 3 messages May 26, 2009 – May 27, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Doc: seq_file.txt fix wrong dd command example.

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

---

 Documentation/filesystems/seq_file.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/filesystems/seq_file.txt +1 -1
index b843743..0d15ebc 100644
@@ -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
#1 lore raw

PATCH 2/2 Bugfix: xt_hashlimit does a wrong SEQ_SKIP.

(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.

---

 net/netfilter/xt_hashlimit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/xt_hashlimit.c +1 -1
index a5b5369..219dcdb 100644
@@ -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;
 }
#2 lore raw

Re: [PATCH 2/2] Bugfix: xt_hashlimit does a wrong SEQ_SKIP.

Quoted 6 lines · 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.

Applied patch 2/2, thanks.