Re: [PATCH] proc: use seq_puts()/seq_putc() where possible

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Joe Perches
Date: Thursday, November 25, 2010 - 12:14 am

On Wed, 2010-11-24 at 23:40 +0200, Alexey Dobriyan wrote:

If this is really useful, perhaps it should be done treewide.

Here's a script that does that:

grep -rPl --include=*.[ch] "\bseq_printf\b" * | 
xargs perl -p -i \
	-e 's/\bseq_printf\s*\(\s*([^,]+),\s*\"([^\%\"]+)\"\s*\)/seq_puts\($1, \"$2\"\)/g'
grep -rPl --include=*.[ch] "\bseq_puts\b" * | 
xargs perl -p -i \
	-e "s/\bseq_puts\s*\(\s*([^,]+),\s*\"\\\n\"\s*\)/seq_putc\(\$1, '\\\n'\)/g"
grep -rPl --include=*.[ch] "\bseq_puts\b" * | 
xargs perl -p -i \
	-e "s/\bseq_puts\s*\(\s*([^,]+),\s*\"(.)\"\s*\)/seq_putc\(\$1, '\$2'\)/g"

$ git diff --shortstat
 256 files changed, 1119 insertions(+), 1119 deletions(-)


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] proc: use seq_puts()/seq_putc() where possible, Alexey Dobriyan, (Wed Nov 24, 2:40 pm)
Re: [PATCH] proc: use seq_puts()/seq_putc() where possible, Joe Perches, (Thu Nov 25, 12:14 am)