diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-07-01 04:55:14 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-07-01 21:06:04 +0300 |
commit | a0809783355cfe1cc1b2fa7f881c3a79df0b2a27 (patch) | |
tree | eb1770a0d1002e4aacbc68b1c94664361efa4294 /include/linux/string_helpers.h | |
parent | 7e5969aeb7f1e7d6f68d5501a6c040605272763e (diff) | |
download | linux-a0809783355cfe1cc1b2fa7f881c3a79df0b2a27.tar.xz |
lib/string_helpers: introduce ESCAPE_NA for escaping non-ASCII
Some users may want to have an ASCII based filter, provided by isascii()
function. Here is the addition of a such.
Link: https://lkml.kernel.org/r/20210504180819.73127-5-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/linux/string_helpers.h')
-rw-r--r-- | include/linux/string_helpers.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h index bf01e24edd89..d6cf6fe10f74 100644 --- a/include/linux/string_helpers.h +++ b/include/linux/string_helpers.h @@ -52,6 +52,7 @@ static inline int string_unescape_any_inplace(char *buf) #define ESCAPE_NP BIT(4) #define ESCAPE_ANY_NP (ESCAPE_ANY | ESCAPE_NP) #define ESCAPE_HEX BIT(5) +#define ESCAPE_NA BIT(6) int string_escape_mem(const char *src, size_t isz, char *dst, size_t osz, unsigned int flags, const char *only); |