}
EXPORT_SYMBOL(string_escape_mem);
-int string_escape_mem_ascii(const char *src, size_t isz, char *dst,
- size_t osz)
-{
- char *p = dst;
- char *end = p + osz;
-
- while (isz--) {
- unsigned char c = *src++;
-
- if (!isprint(c) || !isascii(c) || c == '"' || c == '\\')
- escape_hex(c, &p, end);
- else
- escape_passthrough(c, &p, end);
- }
-
- return p - dst;
-}
-EXPORT_SYMBOL(string_escape_mem_ascii);
-
/*
* Return an allocated string that has been escaped of special characters
* and double quotes, making it safe to log in quotes.