Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JRram-0004EG-6x for qemu-devel@nongnu.org; Wed, 20 Feb 2008 11:14:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JRrak-0004C7-9Z for qemu-devel@nongnu.org; Wed, 20 Feb 2008 11:14:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRrak-0004C0-3r for qemu-devel@nongnu.org; Wed, 20 Feb 2008 11:14:42 -0500 Received: from smtp02.citrix.com ([66.165.176.63]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JRraj-00036r-SY for qemu-devel@nongnu.org; Wed, 20 Feb 2008 11:14:42 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18364.20902.320376.795960@mariner.uk.xensource.com> Date: Wed, 20 Feb 2008 16:13:26 +0000 Subject: Re: [Qemu-devel] [PATCH] bdrv_flush error handling In-Reply-To: <20080220160457.GD14209@redhat.com> References: <18364.19722.241175.337829@mariner.uk.xensource.com> <20080220160457.GD14209@redhat.com> From: Ian Jackson Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Daniel P. Berrange writes ("Re: [Qemu-devel] [PATCH] bdrv_flush error handling"): > On Wed, Feb 20, 2008 at 03:53:46PM +0000, Ian Jackson wrote: > > Finally, it would perhaps be best if the block device emulators wrote > > to the qemu console to complain if they give write errors. Otherwise > > the errno value and other important information will be lost, which > > makes debugging hard. > > If by 'qemu console' you mean stderr, then fine, but please don't > spew log messages to the monitor console, because that'll make it > very hard to interact with reliably from management tools. Is it permitted, then, to generally print to qemu's stderr from inside a device model ? This seems to be done quite a bit during initialisation, and quite a bit in various rather less common kinds of device, but not routinely in the main emulations. Perhaps it would be better to invent a `logprintf' function to make it easier to redirect these kind of messages later if that turns out to be desirable ? Ian.