qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user: If loading fails, print error as st


From: malc
Subject: Re: [Qemu-devel] [PATCH] linux-user: If loading fails, print error as string, not number
Date: Fri, 24 Aug 2012 22:07:47 +0400 (MSK)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

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:address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]