mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] debug_ll: implement putws_ll
Date: Wed, 31 Jul 2024 09:13:38 +0200	[thread overview]
Message-ID: <20240731071337.2557351-1-a.fatoum@pengutronix.de> (raw)

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@a3f.at>
---
 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




             reply	other threads:[~2024-07-31  7:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31  7:13 Ahmad Fatoum [this message]
2024-08-01 11:31 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240731071337.2557351-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox