Files
kernel_arpi/include/linux
Rasmus Villemoes 94df290404 lib/string.c: introduce strreplace()
Strings are sometimes sanitized by replacing a certain character (often
'/') by another (often '!').  In a few places, this is done the same way
Schlemiel the Painter would do it.  Others are slightly smarter but still
do multiple strchr() calls.  Introduce strreplace() to do this using a
single function call and a single pass over the string.

One would expect the return value to be one of three things: void, s, or
the number of replacements made.  I chose the fourth, returning a pointer
to the end of the string.  This is more likely to be useful (for example
allowing the caller to avoid a strlen call).

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-06-25 17:00:40 -07:00
..
2014-09-22 16:48:47 +09:00
2014-11-24 17:24:08 -05:00
2015-05-27 12:42:16 -07:00
2015-05-31 13:40:53 +02:00
2012-12-02 00:05:12 +00:00
2015-04-17 09:03:53 -04:00
2015-05-04 13:09:55 -06:00
2015-04-17 08:31:12 -06:00
2015-05-06 11:58:57 +01:00
2013-11-15 09:32:21 +09:00
2010-08-04 11:00:45 +02:00
2014-12-19 22:55:06 +01:00
2014-01-16 10:23:02 +10:30
2015-06-24 17:49:45 -07:00
2015-05-12 10:46:53 +02:00
2015-06-01 14:33:35 +02:00
2015-06-19 15:18:28 +02:00
2015-04-03 16:18:02 +02:00
2015-06-20 19:14:31 +02:00
2015-05-14 17:55:51 -07:00
2015-04-14 16:49:05 -07:00
2015-06-24 17:49:41 -07:00
2015-03-31 12:04:12 +02:00
2014-01-27 21:02:39 -08:00
2015-05-09 22:15:31 -04:00
2015-04-23 14:36:28 -04:00
2012-12-11 17:22:27 -08:00
2015-04-12 21:03:31 +02:00
2015-06-19 01:18:14 +02:00
2015-06-12 11:36:30 +02:00
2015-06-10 19:14:04 +08:00
2010-02-10 17:47:17 -08:00
2015-05-27 12:58:04 -07:00
2015-05-26 15:23:23 +02:00
2015-04-11 15:53:35 -04:00
2015-06-25 17:00:40 -07:00
2015-06-25 17:00:39 -07:00
2015-05-22 10:36:29 -07:00
2010-11-29 08:55:25 +11:00
2015-05-10 19:26:37 +02:00
2015-05-29 17:21:45 -05:00
2015-04-11 22:29:44 -04:00
2015-06-25 17:00:37 -07:00
2015-04-15 16:35:20 -07:00