From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] puts() and newlines (was Re: Discussion topics / issues)
Date: Mon, 20 Oct 2014 11:51:26 -0400 [thread overview]
Message-ID: <20141020155126.GO25506@bill-the-cat> (raw)
In-Reply-To: <20141015084012.GA20015@amd>
On Wed, Oct 15, 2014 at 10:40:12AM +0200, Pavel Machek wrote:
> Hi!
>
> > First, we have a compatibility problem here. GCC assumes that puts()
> > will add a newline character after the string; U-Boot puts() does NOT
> > do this. So the GCC auto-converted printf()s will all be wrong, as
> > they are missing the newline. [1]
>
> > [1] One might argue that this is a bug in U-Boot and should be fixed,
> > but that is another topic.
>
> I believe we should fix that, yes.
>
> I did quick grep,
>
> pavel at duo:~/wagabuibui/u-boot$ grep -ri puts . | wc -l
> 4287
>
> and that is probably too much to change in one go. So what about this?
I'm thinking, now that we know that with $(CC) -ffreestanding printf is
not converted to puts, we should (a) globally change puts("no newline")
to printf (b) fix puts behavior to conform to standards and correct
puts("newline\n") to puts("newline"). And then let people use whatever
of the print functions they want, while we sort out making people use
debug(...) / error(...) more and come up with a clever output scheme
like we talked about in person.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141020/112db177/attachment.pgp>
next prev parent reply other threads:[~2014-10-20 15:51 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 12:45 [U-Boot] [SoCFPGA] next steps Marek Vasut
2014-10-08 8:58 ` Michal Simek
2014-10-08 10:39 ` Marek Vasut
2014-10-08 11:17 ` Pavel Machek
2014-10-08 20:09 ` Tom Rini
2014-10-09 8:37 ` Michal Simek
2014-10-09 11:20 ` Jagan Teki
2014-10-09 13:42 ` Marek Vasut
2014-10-09 16:11 ` Jagan Teki
2014-10-09 16:15 ` [U-Boot] Discussion topics / issues Marek Vasut
2014-10-09 16:41 ` Jagan Teki
2014-10-09 14:03 ` Marek Vasut
2014-10-09 14:45 ` Michal Simek
2014-10-09 15:57 ` Tom Rini
2014-10-09 16:10 ` Marek Vasut
2014-10-09 16:25 ` Tom Rini
2014-10-09 16:29 ` Marek Vasut
2014-10-09 22:11 ` Pavel Machek
2014-10-09 22:24 ` Wolfgang Denk
2014-10-09 23:00 ` Pavel Machek
2014-10-10 12:22 ` Wolfgang Denk
2014-10-10 14:04 ` Jeroen Hofstee
2014-10-10 14:26 ` Marek Vasut
2014-10-10 14:35 ` Fabio Estevam
2014-10-10 16:09 ` Jeroen Hofstee
2014-10-10 19:51 ` Albert ARIBAUD
2014-10-10 20:40 ` Jeroen Hofstee
2014-10-10 21:13 ` Albert ARIBAUD
2014-10-11 15:03 ` Wolfgang Denk
2014-10-11 15:16 ` Wolfgang Denk
2014-10-15 8:40 ` [U-Boot] puts() and newlines (was Re: Discussion topics / issues) Pavel Machek
2014-10-15 9:42 ` Pavel Machek
2014-10-20 15:51 ` Tom Rini [this message]
2014-10-11 14:44 ` [U-Boot] Discussion topics / issues Wolfgang Denk
2014-10-12 15:06 ` Jeroen Hofstee
2014-10-09 23:05 ` Pavel Machek
2014-10-10 11:05 ` Albert ARIBAUD
2014-10-10 12:34 ` Wolfgang Denk
2014-10-10 0:12 ` Tom Rini
2014-10-08 13:18 ` [U-Boot] [SoCFPGA] next steps Dinh Nguyen
2014-10-08 19:05 ` Marek Vasut
2014-10-11 18:22 ` Masahiro YAMADA
2014-10-19 21:19 ` Marek Vasut
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=20141020155126.GO25506@bill-the-cat \
--to=trini@ti.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