From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Myhr2-0005GA-4s for qemu-devel@nongnu.org; Fri, 16 Oct 2009 04:08:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Myhqx-0005DG-9m for qemu-devel@nongnu.org; Fri, 16 Oct 2009 04:08:03 -0400 Received: from [199.232.76.173] (port=58211 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Myhqv-0005D8-V3 for qemu-devel@nongnu.org; Fri, 16 Oct 2009 04:07:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11930) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Myhqv-0003Z0-Fz for qemu-devel@nongnu.org; Fri, 16 Oct 2009 04:07:57 -0400 Message-ID: <4AD82972.7010200@redhat.com> Date: Fri, 16 Oct 2009 10:06:10 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1255453026-18637-1-git-send-email-lcapitulino@redhat.com> <1255453026-18637-7-git-send-email-lcapitulino@redhat.com> <1255561330.29192.2.camel@slab.beaverton.ibm.com> <20091015103405.591e2f3b@doriath> <1255626960.29192.7.camel@slab.beaverton.ibm.com> <20091015145208.1d871f09@doriath> <1255630433.29192.16.camel@slab.beaverton.ibm.com> <20091015160839.7dbef5bf@doriath> <1255637617.29192.59.camel@slab.beaverton.ibm.com> <4AD78CCD.6030006@us.ibm.com> <1255641511.29192.68.camel@slab.beaverton.ibm.com> <4AD793C6.9060508@us.ibm.com> <1255646688.3954.45.camel@slab.beaverton.ibm.com> In-Reply-To: <1255646688.3954.45.camel@slab.beaverton.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hollis Blanchard Cc: Anthony Liguori , Luiz Capitulino , kraxel@redhat.com, qemu-devel@nongnu.org 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. Paolo