From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mr016-0004EZ-6Q for qemu-devel@nongnu.org; Thu, 24 Sep 2009 21:54:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mr011-0004CM-10 for qemu-devel@nongnu.org; Thu, 24 Sep 2009 21:54:35 -0400 Received: from [199.232.76.173] (port=39184 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mr010-0004CH-Rj for qemu-devel@nongnu.org; Thu, 24 Sep 2009 21:54:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16554) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mr010-0000f2-AG for qemu-devel@nongnu.org; Thu, 24 Sep 2009 21:54:30 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8P1sTrS011962 for ; Thu, 24 Sep 2009 21:54:29 -0400 Subject: Re: [Qemu-devel] [PATCH] Fix exit on 'pci_add' Monitor command References: <20090924111601.1d3668d2@doriath> <87iqf8ciup.fsf@pike.pond.sub.org> <20090924163123.5eec5c90@doriath> From: Markus Armbruster Date: Fri, 25 Sep 2009 03:50:03 +0200 In-Reply-To: <20090924163123.5eec5c90@doriath> (Luiz Capitulino's message of "Thu\, 24 Sep 2009 16\:31\:23 -0300") Message-ID: <87iqf76bec.fsf@pike.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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, 24 Sep 2009 20:12:30 +0200 > Markus Armbruster wrote: [...] >> My major complaint is that I'd rather see the code cleaned up there. >> It's perfectly fine for code that can run only during startup to >> terminate the program on configuration error. Code to be used after >> startup (used from monitor, in particular) must not do that. Instead, >> it should return failure up the call chain, until we reach either >> startup code or monitor code, where the policy how to handle the error >> resides. > > What cleanup do you suggest? > > Note that it's not only about exit(), the function also has some > fprintf()s. If a big refactor is needed to properly fix this, > I guess we will have to live with the bug for a long time... See the patch series I'm going to post.