Received: from eggs.gnu.org ([208.118.235.92]:41090) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4yIY-0000ni-Ra for qemu-devel@nongnu.org; Fri, 24 Aug 2012 14:07:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4yIX-0007mo-Q9 for qemu-devel@nongnu.org; Fri, 24 Aug 2012 14:07:58 -0400 Received: from fe02x03-cgp.akado.ru ([77.232.31.165]:50367 helo=akado.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4yIX-0007mK-J1 for qemu-devel@nongnu.org; Fri, 24 Aug 2012 14:07:57 -0400 Date: Fri, 24 Aug 2012 22:07:47 +0400 (MSK) From: malc In-Reply-To: <1345827353-17112-1-git-send-email-peter.maydell@linaro.org> Message-ID: References: <1345827353-17112-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: Peter Maydell Cc: Christophe Lyon , Riku Voipio , qemu-devel@nongnu.org, patches@linaro.org 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. [..snip..] -- mailto:av1474@comtv.ru