Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCZJ6-00066o-Mg for qemu-devel@nongnu.org; Mon, 23 Nov 2009 08:50:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCZJ2-00061z-1j for qemu-devel@nongnu.org; Mon, 23 Nov 2009 08:50:20 -0500 Received: from [199.232.76.173] (port=54927 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCZJ1-00061h-SY for qemu-devel@nongnu.org; Mon, 23 Nov 2009 08:50:15 -0500 Received: from cantor2.suse.de ([195.135.220.15]:48871 helo=mx2.suse.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NCZJ1-0003dF-6U for qemu-devel@nongnu.org; Mon, 23 Nov 2009 08:50:15 -0500 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> Message-Id: From: Alexander Graf In-Reply-To: <20091123113413.0c1b05f3@doriath> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (iPhone Mail 7A341) Subject: Re: [Qemu-devel] [PATCH 00/10]: QError v4 Date: Mon, 23 Nov 2009 14:50:05 +0100 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: "qemu-devel@nongnu.org" , "kraxel@redhat.com" , Markus Armbruster 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)? Alex >