Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nnact-0003Ii-Ky for qemu-devel@nongnu.org; Fri, 05 Mar 2010 11:43:47 -0500 Received: from [199.232.76.173] (port=41984 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nnact-0003IG-3R for qemu-devel@nongnu.org; Fri, 05 Mar 2010 11:43:47 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nnacr-0000RE-Lr for qemu-devel@nongnu.org; Fri, 05 Mar 2010 11:43:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39474) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nnacr-0000Qw-7z for qemu-devel@nongnu.org; Fri, 05 Mar 2010 11:43:45 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o25GhhhO030615 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 5 Mar 2010 11:43:44 -0500 From: Markus Armbruster References: <1267718231-13303-1-git-send-email-armbru@redhat.com> <1267718231-13303-29-git-send-email-armbru@redhat.com> <20100304175020.67e8de5a@redhat.com> <20100305124300.6d633ec9@redhat.com> Date: Fri, 05 Mar 2010 17:43:40 +0100 In-Reply-To: <20100305124300.6d633ec9@redhat.com> (Luiz Capitulino's message of "Fri, 5 Mar 2010 12:43:00 -0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 28/50] error: Let converted handlers print in human monitor List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org Luiz Capitulino writes: > On Thu, 4 Mar 2010 17:50:20 -0300 > Luiz Capitulino wrote: > >> On Thu, 4 Mar 2010 16:56:49 +0100 >> Markus Armbruster wrote: >> >> > While fully converted handlers are not supposed to print anything when >> > running in a QMP monitor, they are free to print in a human monitor. >> >> I disagree. > > I've talked to Markus by irc about this one and he convinced me that > this is the best solution for the immediate term. > > Actually, I found out that only error is printed in the human monitor > (through qerror_report()) so this is not as serious as I thought at first. In case I confused not just you: the patch does not affect QMP monitors at all. I wish I had explained this better. Let me retry: the patch provides for partially converted handlers. Without it, CONFIG_DEBUG_MONITOR cries bloody murder, and converted errors get delayed until after all output from the not-yet-converted parts of the handler. For instance, it takes me four steps to fully convert do_device_add(). I want all the partially converted intermediate versions to work. Even more compelling is the case of utility functions: I want to be able to convert a function to QError without having to convert all the handlers using it to QError / QObject in the same commit, because doing that would result in an unreviewable hairball of a patch. > So, I won't nack it and the bigger mid-term discussion we should have > is whether or not it's ok to mix qerror_report(), error_printf() & > friends in handlers. I think mixing is both unavoidable and harmless in intermediate conversion steps. Whether we want to allow stuff like error_printf_unless_qmp() in the final state is a separate and valid question. error_printf_unless_qmp() solved the problem at hand for me, but of course I'm open to other ideas. I don't think delaying this series could help with that, though.