qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error


From: Anthony Liguori
Subject: [Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error
Date: Fri, 16 Oct 2009 08:39:09 -0500
User-agent: Thunderbird 2.0.0.23 (X11/20090825)

Paolo Bonzini wrote:
On 10/16/2009 12:44 AM, Hollis Blanchard wrote:
How about this (basically what Paolo suggested):

{ "error": { "code": 12,
              "desc": "device %{bus}:%{address} already open",
              "data": { "bus": 0, "address": 12 } } }

'desc'*may*  be used by the client, or may be replaced with a localized
version.

I would say that desc need not go on the wire too. The client might not even want to show the same string to the user, for example they may want to say "mouse already" open.

The "device %{bus}:%{address} already open" would be strictly inside QEMU, for consumption of the monitor interface. Of course since the server is in QEMU too it makes sense to consolidate it in the same struct, but this does not mean that everything in the struct needs to go on the wire.

Agreed. It could also go in a client library and we could provide something equivalent to strerror(). The advantage of putting this in a client library is that we could potentially localize it.

--
Regards,

Anthony Liguori





reply via email to

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