]> git.baikalelectronics.ru Git - kernel.git/commit
seq_file: introduce seq_setwidth() and seq_pad()
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Thu, 14 Nov 2013 22:31:56 +0000 (14:31 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Nov 2013 00:32:20 +0000 (09:32 +0900)
commitc1c3d2da7243db210556134957b4de339083185b
treec48aa0e5bcd3f09ad5b7354396a50928c9211155
parent94125f2e30b5148108cd74e145cca09f3d0c5d72
seq_file: introduce seq_setwidth() and seq_pad()

There are several users who want to know bytes written by seq_*() for
alignment purpose.  Currently they are using %n format for knowing it
because seq_*() returns 0 on success.

This patch introduces seq_setwidth() and seq_pad() for allowing them to
align without using %n format.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Joe Perches <joe@perches.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/seq_file.c
include/linux/seq_file.h