From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC 2/2] env: Add prefix to error messages when loading env
Date: Thu, 19 Jul 2018 21:52:39 +0200 [thread overview]
Message-ID: <20180719195239.9AC7E240175@gemini.denx.de> (raw)
In-Reply-To: <CAKaJLVuxoS0mz9pDDYqmqomsSfd83kSed=LZ261=wfUUC-Q-Xw@mail.gmail.com>
Dear Sam,
In message <CAKaJLVuxoS0mz9pDDYqmqomsSfd83kSed=LZ261=wfUUC-Q-Xw@mail.gmail.com> you wrote:
>
> Also, I figured how to do prefixing (to display MMC errors as nested
> w.r.t. "Loading environment), without adding new field to gd. We can
> just add some new GD_LG_ and print prefix when it's installed. I'm
> gonna send new RFC soon. Please let me know what you think about [1].
This is IMO a totally wrong approach. We don't want to add more
code (and more output) jsut to paper over inconsistent error
reporting. This problem should be fixed at the root cause, i. e.
we should report errors where they are detected, and only once.
If all callers can rely that, in the error path, their callees which
return error codes, have already printed appropriate messages, there
is no need to print even more lines.
What we need is not fancy code, but consistent (and consequent)
error handling.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"One day," said a dull voice from down below, "I'm going to be back
in form again and you're going to be very sorry you said that. For a
very long time. I might even go so far as to make even more Time just
for you to be sorry in." - Terry Pratchett, _Small Gods_
next prev parent reply other threads:[~2018-07-19 19:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 22:09 [U-Boot] [RFC 1/2] env: Drop error messages when loading environment Sam Protsenko
2018-07-17 22:09 ` [U-Boot] [RFC 2/2] env: Add prefix to error messages when loading env Sam Protsenko
2018-07-18 6:23 ` Wolfgang Denk
2018-07-18 12:53 ` Tom Rini
2018-07-18 13:04 ` Sam Protsenko
2018-07-18 14:28 ` Tom Rini
2018-07-18 14:09 ` Wolfgang Denk
2018-07-19 12:52 ` Tom Rini
2018-07-19 13:12 ` Sam Protsenko
2018-07-19 19:52 ` Wolfgang Denk [this message]
2018-07-19 20:16 ` Sam Protsenko
2018-07-19 19:49 ` Wolfgang Denk
2018-07-18 6:19 ` [U-Boot] [RFC 1/2] env: Drop error messages when loading environment Wolfgang Denk
2018-07-18 12:50 ` Sam Protsenko
2018-07-18 12:51 ` 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=20180719195239.9AC7E240175@gemini.denx.de \
--to=wd@denx.de \
--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