Doc: seq_file.txt fix wrong dd command example.
Subsystems (4)
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
@@ -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
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
@@ -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 ; }
Patrick McHardy
AppliedRe: [PATCH 2/2] Bugfix: xt_hashlimit does a wrong SEQ_SKIP.
Quoted 6 lines · Jesper Dangaard Brouer
(Inside
net/netfilter/xt_hashlimit.c)
The functiondl_seq_show()returns 1 (equal toSEQ_SKIP) in case aseq_printf()call return -1. It should return -1.This
SEQ_SKIPbehavior brakes processing the proc file e.g. via a pipe or just through less.
Applied patch 2/2, thanks.