[PATCH] debug_ll: implement putws_ll

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

 



For use of low-level debugging of EFI-related functionality, let's
add a wchar_t version of puts_ll.

Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx>
---
 include/debug_ll.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/include/debug_ll.h b/include/debug_ll.h
index 0128ab524a76..5ac8ae12ceb8 100644
--- a/include/debug_ll.h
+++ b/include/debug_ll.h
@@ -64,12 +64,27 @@ static inline void puts_ll(const char * str)
 	}
 }
 
+static inline void putws_ll(const wchar_t * wstr)
+{
+	while (*wstr) {
+		if (*wstr == L'\n')
+			putc_ll('\r');
+
+		putc_ll(*wstr);
+		wstr++;
+	}
+}
+
 #else
 
 static inline void putc_ll(char value)
 {
 }
 
+static inline void putws_ll(const wchar_t * wstr)
+{
+}
+
 static inline void puthexc_ll(unsigned char value)
 {
 }
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux