From: Oded Gabbay <oded.gabbay@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] spl: don't use %.*s with CONFIG_USE_TINY_PRINTF
Date: Wed, 28 Dec 2016 09:36:37 +0200 [thread overview]
Message-ID: <1482910597-24780-1-git-send-email-oded.gabbay@gmail.com> (raw)
In the tiny-printf implementation, there is no support for %.*s. This patch
checks if CONFIG_USE_TINY_PRINTF is defined and if so, prints a different
debug statement which doesn't use %.*s
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
---
common/spl/spl.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/common/spl/spl.c b/common/spl/spl.c
index f7df834..7c4744d 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -115,9 +115,14 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
}
spl_image->os = image_get_os(header);
spl_image->name = image_get_name(header);
+#ifdef CONFIG_USE_TINY_PRINTF
+ debug("spl: payload image: %s load addr: 0x%x size: %d\n",
+ spl_image->name, spl_image->load_addr, spl_image->size);
+#else
debug("spl: payload image: %.*s load addr: 0x%x size: %d\n",
(int)sizeof(spl_image->name), spl_image->name,
spl_image->load_addr, spl_image->size);
+#endif
} else {
#ifdef CONFIG_SPL_PANIC_ON_RAW_IMAGE
/*
--
2.7.4
next reply other threads:[~2016-12-28 7:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-28 7:36 Oded Gabbay [this message]
2017-01-12 5:07 ` [U-Boot] [PATCH] spl: don't use %.*s with CONFIG_USE_TINY_PRINTF Simon Glass
2017-01-17 7:30 ` Masahiro Yamada
2017-01-17 8:06 ` Oded Gabbay
2017-01-17 9:18 ` Masahiro Yamada
2017-01-17 9:25 ` Oded Gabbay
2017-01-19 3:03 ` Tom Rini
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=1482910597-24780-1-git-send-email-oded.gabbay@gmail.com \
--to=oded.gabbay@gmail.com \
--cc=u-boot@lists.denx.de \
/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