From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Myn1v-0001GO-7Y for qemu-devel@nongnu.org; Fri, 16 Oct 2009 09:39:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Myn1q-0001F8-Iz for qemu-devel@nongnu.org; Fri, 16 Oct 2009 09:39:38 -0400 Received: from [199.232.76.173] (port=40471 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Myn1o-0001El-Lp for qemu-devel@nongnu.org; Fri, 16 Oct 2009 09:39:33 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:48272) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Myn1o-0007O8-Dt for qemu-devel@nongnu.org; Fri, 16 Oct 2009 09:39:32 -0400 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e39.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id n9GDXaot008600 for ; Fri, 16 Oct 2009 07:33:36 -0600 Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n9GDdAgg119530 for ; Fri, 16 Oct 2009 07:39:12 -0600 Received: from d03av05.boulder.ibm.com (loopback [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id n9GDdAHp009277 for ; Fri, 16 Oct 2009 07:39:10 -0600 Message-ID: <4AD8777D.30802@us.ibm.com> Date: Fri, 16 Oct 2009 08:39:09 -0500 From: Anthony Liguori 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> <4AD82972.7010200@redhat.com> In-Reply-To: <4AD82972.7010200@redhat.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: Paolo Bonzini Cc: qemu-devel@nongnu.org, Luiz Capitulino , hollisb@linux.vnet.ibm.com, kraxel@redhat.com 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