From: "Andreas Färber" <afaerber@suse.de>
To: malc <av1474@comtv.ru>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Christophe Lyon <christophe.lyon@linaro.org>,
Riku Voipio <riku.voipio@iki.fi>,
qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] linux-user: If loading fails, print error as string, not number
Date: Fri, 24 Aug 2012 20:55:38 +0200 [thread overview]
Message-ID: <5037CE2A.7060603@suse.de> (raw)
In-Reply-To: <alpine.LNX.2.00.1208242206130.3705@linmac>
Am 24.08.2012 20:07, schrieb malc:
> On Fri, 24 Aug 2012, Peter Maydell wrote:
>
>> If the attempt to load the guest executable fails, print the
>> error message as a string, not a number. This requires us to
>> fix a couple of places in loader_exec() where we were returning
>> -1 instead of a valid negative errno.
>>
>> The change allows us to drop the "Unknown binary format" message
>> because the strerror-enhanced message is now a more self-explanatory
>> "Error while loading $guest-binary: Exec format error".
>
> Double edged sword:
>
> a. Localized strings that is near impossible to map back to anything
> useful
> b. Codes whose meaning is overloaded beyond repair
>
> Sometimes sticking to plain numbers works better.
I ran into the same issue some time ago and was lucky to have pm215 on
#qemu knowing what was causing this. A pure number (or number translated
to E*) is not so telling.
Could the diplomatic solution be to include the number in the error
message? :)
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
prev parent reply other threads:[~2012-08-24 18:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-24 16:55 [Qemu-devel] [PATCH] linux-user: If loading fails, print error as string, not number Peter Maydell
2012-08-24 18:07 ` malc
2012-08-24 18:55 ` Andreas Färber [this message]
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=5037CE2A.7060603@suse.de \
--to=afaerber@suse.de \
--cc=av1474@comtv.ru \
--cc=christophe.lyon@linaro.org \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.