On Tue, 2015-06-09 at 01:26 +0200, Rasmus Villemoes wrote:
> Strings are sometimes sanitized by replacing a certain character
> (often '/') by another (often '!').
[]
> v2: spello fixed, parameters renamed 'old' and 'new' (just so the
> kernel doc aligns nicely, and because that's what python -c
> 'help(str.replace)' uses). Still EXPORT_SYMBOL, not inline (tried it,
> caused more bloat), still called strreplace.

OK, thanks.  I think the chars should be ints though
just for consistency for strchr variants.

> diff --git a/include/linux/string.h b/include/linux/string.h
[]
> @@ -111,6 +111,7 @@ extern int memcmp(const void *,const void 
> *,__kernel_size_t);
>  extern void * memchr(const void *,int,__kernel_size_t);
>  #endif
>  void *memchr_inv(const void *s, int c, size_t n);
> +char *strreplace(char *s, char old, char new);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to