From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzNT7-0002Ex-V2 for qemu-devel@nongnu.org; Sun, 18 Oct 2009 00:34:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzNT3-0002EH-1a for qemu-devel@nongnu.org; Sun, 18 Oct 2009 00:34:09 -0400 Received: from [199.232.76.173] (port=43023 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzNT2-0002EE-TQ for qemu-devel@nongnu.org; Sun, 18 Oct 2009 00:34:04 -0400 Received: from mail2.shareable.org ([80.68.89.115]:37530) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MzNT2-0000mW-BE for qemu-devel@nongnu.org; Sun, 18 Oct 2009 00:34:04 -0400 Date: Sun, 18 Oct 2009 05:34:01 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error Message-ID: <20091018043401.GJ15656@shareable.org> 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> <4AD8288E.6080102@redhat.com> <20091018042826.GI15656@shareable.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091018042826.GI15656@shareable.org> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, Hollis Blanchard , kraxel@redhat.com Jamie Lokier wrote: > Paolo Bonzini wrote: > > On 10/15/2009 09:08 PM, Luiz Capitulino wrote: > > >{ "error": { "code": 12 > > > "desc": "device already open", > > > "data": { "bus": 0, "address": 12 } } } > > > > > > Note that this also can be reused by any bus, as the "data" information > > >is built at error time and can contain anything. > > > > The "desc" is not even necessary on the wire. > > When you send an error code that that client doesn't know yet (because > you can't update every client immediately), it'll be very helpful to > users to see "device already open" instead of "unknown error 12". About that technique in general. It works much better when the client and server are managed together, for example as a single project, or by the same people working on both. Then you can keep the client's set of error codes in sync with the server in every version. But that's not possible when there are umpteen clients maintained by other people on their own schedule, each used by users who may combine them with newer servers. Which I gather is something that the new monitor protocol is intended to support. -- Jamie