From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/4] common: boot: replace printf by pr_info/warn variants
Date: Fri, 21 May 2021 18:34:33 +0200 [thread overview]
Message-ID: <20210521163435.17365-3-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20210521163435.17365-1-m.felsch@pengutronix.de>
This allows us to control the output behaviour e.g. booting silently
to improve boot time. Furthermore it adds a 'WARNING:' prefixed output
in case of pr_warn which is colored as well (depending on your
terminal). This helps us to identify unwanted behaviour.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
common/boot.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/boot.c b/common/boot.c
index 07b67734d8..8220b8d3fb 100644
--- a/common/boot.c
+++ b/common/boot.c
@@ -138,7 +138,7 @@ int boot_entry(struct bootentry *be, int verbose, int dryrun)
{
int ret;
- printf("Booting entry '%s'\n", be->title);
+ pr_info("Booting entry '%s'\n", be->title);
if (IS_ENABLED(CONFIG_WATCHDOG) && boot_watchdog_timeout) {
boot_enabled_watchdog = watchdog_get_default();
@@ -319,7 +319,7 @@ void bootsources_menu(struct bootentries *bootentries, int timeout)
struct menu_entry *back_entry;
if (!IS_ENABLED(CONFIG_MENU)) {
- printf("no menu support available\n");
+ pr_warn("no menu support available\n");
return;
}
--
2.29.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-05-21 16:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-21 16:34 [PATCH 0/4] Change printf behaviour Marco Felsch
2021-05-21 16:34 ` [PATCH 1/4] commands: mount: replace printf by pr_info Marco Felsch
2021-05-25 5:15 ` Sascha Hauer
2021-05-25 8:42 ` Marco Felsch
2021-05-25 12:28 ` Ahmad Fatoum
2021-05-21 16:34 ` Marco Felsch [this message]
2021-05-21 16:34 ` [PATCH 3/4] common: bootm: replace printf by pr_err/info Marco Felsch
2021-05-21 16:34 ` [PATCH 4/4] common: oftree: replace printf by pr_info Marco Felsch
2021-05-21 16:52 ` [PATCH 0/4] Change printf behaviour Marco Felsch
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=20210521163435.17365-3-m.felsch@pengutronix.de \
--to=m.felsch@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