diff options
| author | Andy Shevchenko <[email protected]> | 2021-07-01 01:55:23 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-07-01 18:06:04 +0000 |
| commit | 229563b196ed3ce36036a18b6bdfe4cce9dcbbd4 (patch) | |
| tree | 035f9a5e415120572a7af1a90db019de5a514455 /lib/test-string_helpers.c | |
| parent | lib/string_helpers: allow to append additional characters to be escaped (diff) | |
| download | kernel-229563b196ed3ce36036a18b6bdfe4cce9dcbbd4.tar.gz kernel-229563b196ed3ce36036a18b6bdfe4cce9dcbbd4.zip | |
lib/test-string_helpers: print flags in hexadecimal format
Since flags are bitmapped, it's better to print them in hexadecimal
format.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Andy Shevchenko <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Chuck Lever <[email protected]>
Cc: "J. Bruce Fields" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
| -rw-r--r-- | lib/test-string_helpers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/test-string_helpers.c b/lib/test-string_helpers.c index 10360d4ea273..079fb12d59cc 100644 --- a/lib/test-string_helpers.c +++ b/lib/test-string_helpers.c @@ -19,7 +19,7 @@ static __init bool test_string_check_buf(const char *name, unsigned int flags, if (q_real == q_test && !memcmp(out_test, out_real, q_test)) return true; - pr_warn("Test '%s' failed: flags = %u\n", name, flags); + pr_warn("Test '%s' failed: flags = %#x\n", name, flags); print_hex_dump(KERN_WARNING, "Input: ", DUMP_PREFIX_NONE, 16, 1, in, p, true); @@ -290,7 +290,7 @@ test_string_escape_overflow(const char *in, int p, unsigned int flags, const cha q_real = string_escape_mem(in, p, NULL, 0, flags, esc); if (q_real != q_test) - pr_warn("Test '%s' failed: flags = %u, osz = 0, expected %d, got %d\n", + pr_warn("Test '%s' failed: flags = %#x, osz = 0, expected %d, got %d\n", name, flags, q_test, q_real); } |
