Lines Matching refs:flags

14 static __init bool test_string_check_buf(const char *name, unsigned int flags,  in test_string_check_buf()  argument
22 pr_warn("Test '%s' failed: flags = %#x\n", name, flags); in test_string_check_buf()
37 unsigned int flags; member
44 .flags = UNESCAPE_SPACE,
49 .flags = UNESCAPE_OCTAL,
54 .flags = UNESCAPE_HEX,
59 .flags = UNESCAPE_SPECIAL,
63 static void __init test_string_unescape(const char *name, unsigned int flags, in test_string_unescape() argument
84 if (flags & strings[i].flags) { in test_string_unescape()
96 if (flags == UNESCAPE_ANY) in test_string_unescape()
99 q_real = string_unescape_inplace(out_real, flags); in test_string_unescape()
100 } else if (flags == UNESCAPE_ANY) { in test_string_unescape()
103 q_real = string_unescape(in, out_real, q_real, flags); in test_string_unescape()
106 test_string_check_buf(name, flags, in, p - 1, out_real, q_real, in test_string_unescape()
116 unsigned int flags; member
130 .flags = ESCAPE_SPACE,
133 .flags = ESCAPE_SPACE | ESCAPE_OCTAL,
136 .flags = ESCAPE_SPACE | ESCAPE_HEX,
144 .flags = ESCAPE_SPECIAL,
147 .flags = ESCAPE_SPECIAL | ESCAPE_OCTAL,
150 .flags = ESCAPE_SPECIAL | ESCAPE_HEX,
158 .flags = ESCAPE_SPACE,
161 .flags = ESCAPE_SPECIAL,
164 .flags = ESCAPE_SPACE | ESCAPE_SPECIAL,
167 .flags = ESCAPE_OCTAL,
170 .flags = ESCAPE_SPACE | ESCAPE_OCTAL,
173 .flags = ESCAPE_SPECIAL | ESCAPE_OCTAL,
176 .flags = ESCAPE_SPACE | ESCAPE_SPECIAL | ESCAPE_OCTAL,
179 .flags = ESCAPE_NP,
182 .flags = ESCAPE_SPACE | ESCAPE_NP,
185 .flags = ESCAPE_SPECIAL | ESCAPE_NP,
188 .flags = ESCAPE_SPACE | ESCAPE_SPECIAL | ESCAPE_NP,
191 .flags = ESCAPE_OCTAL | ESCAPE_NP,
194 .flags = ESCAPE_SPACE | ESCAPE_OCTAL | ESCAPE_NP,
197 .flags = ESCAPE_SPECIAL | ESCAPE_SPACE | ESCAPE_OCTAL |
201 .flags = ESCAPE_NP | ESCAPE_HEX,
209 .flags = ESCAPE_OCTAL | ESCAPE_NA,
212 .flags = ESCAPE_HEX | ESCAPE_NA,
215 .flags = ESCAPE_NA,
228 .flags = ESCAPE_OCTAL,
231 .flags = ESCAPE_HEX,
234 .flags = ESCAPE_ANY | ESCAPE_APPEND,
237 .flags = ESCAPE_OCTAL | ESCAPE_APPEND | ESCAPE_NAP,
240 .flags = ESCAPE_HEX | ESCAPE_APPEND | ESCAPE_NAP,
243 .flags = ESCAPE_OCTAL | ESCAPE_APPEND | ESCAPE_NA,
246 .flags = ESCAPE_HEX | ESCAPE_APPEND | ESCAPE_NA,
254 .flags = ESCAPE_OCTAL,
257 .flags = ESCAPE_ANY | ESCAPE_APPEND,
260 .flags = ESCAPE_OCTAL | ESCAPE_APPEND | ESCAPE_NAP,
263 .flags = ESCAPE_OCTAL | ESCAPE_APPEND | ESCAPE_NA,
271 .flags = ESCAPE_OCTAL,
279 .flags = ESCAPE_NA,
282 .flags = ESCAPE_SPACE | ESCAPE_NA,
285 .flags = ESCAPE_SPECIAL | ESCAPE_NA,
288 .flags = ESCAPE_SPACE | ESCAPE_SPECIAL | ESCAPE_NA,
291 .flags = ESCAPE_OCTAL | ESCAPE_NA,
294 .flags = ESCAPE_SPACE | ESCAPE_OCTAL | ESCAPE_NA,
297 .flags = ESCAPE_SPECIAL | ESCAPE_OCTAL | ESCAPE_NA,
300 .flags = ESCAPE_ANY | ESCAPE_NA,
303 .flags = ESCAPE_HEX | ESCAPE_NA,
306 .flags = ESCAPE_SPACE | ESCAPE_HEX | ESCAPE_NA,
309 .flags = ESCAPE_SPECIAL | ESCAPE_HEX | ESCAPE_NA,
312 .flags = ESCAPE_SPACE | ESCAPE_SPECIAL | ESCAPE_HEX | ESCAPE_NA,
320 .flags = ESCAPE_NAP,
323 .flags = ESCAPE_SPACE | ESCAPE_NAP,
326 .flags = ESCAPE_SPECIAL | ESCAPE_NAP,
329 .flags = ESCAPE_SPACE | ESCAPE_SPECIAL | ESCAPE_NAP,
332 .flags = ESCAPE_OCTAL | ESCAPE_NAP,
335 .flags = ESCAPE_SPACE | ESCAPE_OCTAL | ESCAPE_NAP,
338 .flags = ESCAPE_SPECIAL | ESCAPE_OCTAL | ESCAPE_NAP,
341 .flags = ESCAPE_ANY | ESCAPE_NAP,
344 .flags = ESCAPE_HEX | ESCAPE_NAP,
347 .flags = ESCAPE_SPACE | ESCAPE_HEX | ESCAPE_NAP,
350 .flags = ESCAPE_SPECIAL | ESCAPE_HEX | ESCAPE_NAP,
353 .flags = ESCAPE_SPACE | ESCAPE_SPECIAL | ESCAPE_HEX | ESCAPE_NAP,
384 unsigned int flags) in test_string_find_match() argument
389 if (!flags) in test_string_find_match()
393 flags &= ~ESCAPE_NULL; in test_string_find_match()
396 if (flags & ESCAPE_OCTAL) in test_string_find_match()
397 flags &= ~ESCAPE_HEX; in test_string_find_match()
400 if (s1->flags == flags) in test_string_find_match()
406 test_string_escape_overflow(const char *in, int p, unsigned int flags, const char *esc, in test_string_escape_overflow() argument
411 q_real = string_escape_mem(in, p, NULL, 0, flags, esc); in test_string_escape_overflow()
414 name, flags, q_test, q_real); in test_string_escape_overflow()
419 unsigned int flags, const char *esc) in test_string_escape() argument
436 if (flags & ESCAPE_NULL) { in test_string_escape()
439 if (flags & ESCAPE_NA && !(flags & ESCAPE_APPEND && esc)) { in test_string_escape()
448 out = test_string_find_match(s2, flags); in test_string_escape()
463 q_real = string_escape_mem(in, p, out_real, out_size, flags, esc); in test_string_escape()
465 test_string_check_buf(name, flags, in, p, out_real, q_real, out_test, in test_string_escape()
468 test_string_escape_overflow(in, p, flags, esc, q_test, name); in test_string_escape()