summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-06-30 18:55:20 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-07-01 11:06:04 -0700
commitaec0d0966f20d131cc4ff6927b02d448a478a6d4 (patch)
tree751fc1eca537287e2c12147d96dec9b074349881 /include
parent0362c27fb373ea04eace9e7a70e61036ab81f09f (diff)
lib/string_helpers: allow to append additional characters to be escaped
Introduce a new flag to append additional characters, passed in 'only' parameter, to be escaped if they fall in the corresponding class. Link: https://lkml.kernel.org/r/20210504180819.73127-7-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Chuck Lever <chuck.lever@oracle.com> Cc: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/string_helpers.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h
index 811c6a627620..f8728ed4d563 100644
--- a/include/linux/string_helpers.h
+++ b/include/linux/string_helpers.h
@@ -54,6 +54,7 @@ static inline int string_unescape_any_inplace(char *buf)
#define ESCAPE_HEX BIT(5)
#define ESCAPE_NA BIT(6)
#define ESCAPE_NAP BIT(7)
+#define ESCAPE_APPEND BIT(8)
int string_escape_mem(const char *src, size_t isz, char *dst, size_t osz,
unsigned int flags, const char *only);