[PATCH v1 1/5] lib/test_bitmap: Excape space symbols when printing input string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



test_bitmap_printlist() prints the input string which contains
a new line character. Instead of stripping it, escape that kind
of characters, so developer will see the actual input string
that has been used. Without this change the new line splits
the string to two, and the first one is not guaranteed to be
followed by the first part immediatelly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
 lib/test_bitmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c
index f2ea9f30c7c5..1f2dc7fef17f 100644
--- a/lib/test_bitmap.c
+++ b/lib/test_bitmap.c
@@ -523,7 +523,7 @@ static void __init test_bitmap_printlist(void)
 		goto out;
 	}
 
-	pr_err("bitmap_print_to_pagebuf: input is '%s', Time: %llu\n", buf, time);
+	pr_err("bitmap_print_to_pagebuf: input is '%*pEs', Time: %llu\n", ret, buf, time);
 out:
 	kfree(buf);
 	kfree(bmap);
-- 
2.40.0.1.gaa8946217a0b




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux