aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2015-04-15 16:17:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-15 16:35:23 -0700
commit3aeddc7d665e41b1ba193f5c427ca52086d085ae (patch)
tree7f00129aa094227adc55ee92cc585f039a747fe5 /fs
parentlib/vsprintf.c: fix potential NULL deref in hex_string (diff)
downloadlinux-dev-3aeddc7d665e41b1ba193f5c427ca52086d085ae.tar.xz
linux-dev-3aeddc7d665e41b1ba193f5c427ca52086d085ae.zip
lib/string_helpers.c: refactor string_escape_mem
When printf is given the format specifier %pE, it needs a way of obtaining the total output size that would be generated if the buffer was large enough, and string_escape_mem doesn't easily provide that. This is a refactorization of string_escape_mem in preparation of changing its external API to provide that information. The somewhat ugly early returns and subsequent seemingly redundant conditionals are to make the following patch touch as little as possible in string_helpers.c while still preserving the current behaviour of never outputting partial escape sequences. That behaviour must also change for %pE to work as one expects from every other printf specifier. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions