From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCtzh-0004rL-84 for qemu-devel@nongnu.org; Tue, 24 Nov 2009 06:55:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCtzc-0004pg-Dr for qemu-devel@nongnu.org; Tue, 24 Nov 2009 06:55:40 -0500 Received: from [199.232.76.173] (port=39525 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCtzc-0004pZ-5p for qemu-devel@nongnu.org; Tue, 24 Nov 2009 06:55:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36020) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NCtzb-0004IX-LO for qemu-devel@nongnu.org; Tue, 24 Nov 2009 06:55:35 -0500 Date: Tue, 24 Nov 2009 09:55:22 -0200 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH 00/10]: QError v4 Message-ID: <20091124095522.436756c2@doriath> In-Reply-To: References: <1258487037-24950-1-git-send-email-lcapitulino@redhat.com> <4B04383A.9050101@linux.vnet.ibm.com> <4B06C00F.3020107@codemonkey.ws> <4B06E854.7080101@codemonkey.ws> <4B0961F0.3070004@codemonkey.ws> <20091123110619.4522c7cc@doriath> <4B0A8A19.6030607@codemonkey.ws> <20091123113413.0c1b05f3@doriath> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: "qemu-devel@nongnu.org" , "kraxel@redhat.com" , Markus Armbruster On Mon, 23 Nov 2009 14:50:05 +0100 Alexander Graf wrote: > > Am 23.11.2009 um 14:34 schrieb Luiz Capitulino : > > > On Mon, 23 Nov 2009 07:11:53 -0600 > > Anthony Liguori wrote: > > > >> Luiz Capitulino wrote: > >>> On Sun, 22 Nov 2009 10:08:16 -0600 > >>> Anthony Liguori wrote: > >>> > >>> > >>>> I'm certainly willing to consider alternative ways to do qmp_error > >>>> () but > >>>> taking a free form string is not an option in my mind. It goes > >>>> against > >>>> the fundamentals of what we're trying to build with QMP. > >>>> > >>> > >>> Agreed. > >>> > >>> > >>>> So if you're opposed to structured error data, just having > >>>> qmp_error(error_code) is a reasonable alternative. I don't think > >>>> it's > >>>> the right thing to do, but I think it's still within the spirit > >>>> of the > >>>> goals of QMP. > >>>> > >>> > >>> You mean, we would have calls like: > >>> > >>> qemu_error_new(error_code, 'device '%s' not found', name); > >>> > >> > >> Except drop the 'device %s not found' bit. > > > > We would need a table to have the strings for the user protocol > > then. Not having the table is a key point in Markus's argument, > > I guess. > > We would need that for internationalization anyways, right? > > Though I don't dislike the idea of passing a plain default syntax over > the wire as a bonus / fallback. Especially for cases where the ui is > older than qemu. > > So why not have the table inside qemu do a lookup and send that as > default format in addition to the error code (that should usually be > used to find out the format)? The current proposal does have a table, the argument against it is that we're making error reporting complex, as developers will have to edit more than one place to report errors.