From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4z2m-0001iY-N4 for qemu-devel@nongnu.org; Fri, 24 Aug 2012 14:55:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4z2l-0005RX-G5 for qemu-devel@nongnu.org; Fri, 24 Aug 2012 14:55:44 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49453 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4z2l-0005RF-85 for qemu-devel@nongnu.org; Fri, 24 Aug 2012 14:55:43 -0400 Message-ID: <5037CE2A.7060603@suse.de> Date: Fri, 24 Aug 2012 20:55:38 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1345827353-17112-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] linux-user: If loading fails, print error as string, not number List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: Peter Maydell , Christophe Lyon , Riku Voipio , qemu-devel@nongnu.org, patches@linaro.org Am 24.08.2012 20:07, schrieb malc: > On Fri, 24 Aug 2012, Peter Maydell wrote: >=20 >> 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". >=20 > Double edged sword: >=20 > a. Localized strings that is near impossible to map back to anything > useful > b. Codes whose meaning is overloaded beyond repair >=20 > 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 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg