lib/string_helpers: introduce generic string_unescape
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 30 Apr 2013 22:27:30 +0000 (15:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 May 2013 00:04:03 +0000 (17:04 -0700)
commit16c7fa05829e8b91db48e3539c5d6ff3c2b18a23
tree6658e9f27c033e5f6de19284fe9a6b8485360aa6
parente1d12f327037a59e06c66520951ab4e0bd29f9c4
lib/string_helpers: introduce generic string_unescape

There are several places in kernel where modules unescapes input to convert
C-Style Escape Sequences into byte codes.

The patch provides generic implementation of such approach. Test cases are
also included into the patch.

[akpm@linux-foundation.org: clarify comment]
[akpm@linux-foundation.org: export get_random_int() to modules]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Chris Brannon <chris@the-brannons.com>
Cc: Kirk Reiser <kirk@braille.uwo.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/random.c
include/linux/string_helpers.h
lib/Kconfig.debug
lib/Makefile
lib/string_helpers.c
lib/test-string_helpers.c [new file with mode: 0644]