Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nm1Z5-0004AC-UH for qemu-devel@nongnu.org; Mon, 01 Mar 2010 04:05:24 -0500 Received: from [199.232.76.173] (port=51295 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nm1Z4-00049j-W4 for qemu-devel@nongnu.org; Mon, 01 Mar 2010 04:05:23 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nm1Z3-0007M2-MT for qemu-devel@nongnu.org; Mon, 01 Mar 2010 04:05:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54956) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nm1Z3-0007Ly-9p for qemu-devel@nongnu.org; Mon, 01 Mar 2010 04:05:21 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2195KKn004085 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Mar 2010 04:05:20 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH RFC 15/48] error: Don't abuse qemu_error() for non-error in qdev_device_help() References: <1267034160-3517-1-git-send-email-armbru@redhat.com> <1267034160-3517-16-git-send-email-armbru@redhat.com> <20100226164453.2c5e86ba@redhat.com> Date: Mon, 01 Mar 2010 10:05:18 +0100 In-Reply-To: <20100226164453.2c5e86ba@redhat.com> (Luiz Capitulino's message of "Fri, 26 Feb 2010 16:44:53 -0300") Message-ID: 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 Wed, 24 Feb 2010 18:55:27 +0100 > Markus Armbruster wrote: > >> qdev_device_help() prints device information with qemu_error(). A >> later commit will make qemu_error() print additional stuff that is >> only appropriate for proper errors, and then this will break. Use >> error_printf() instead. > > Aren't you abusing the error function just like the current code? error_printf() isn't a function to report an error. It's a function to print to the error destination, which is either the current monitor or stderr. It serves as a building block for functions that report an error. > Also, > I think that this information should be printed to stdout. Agree in principle. Existing code is sloppy about stdout vs. stderr, however. If it's important to start cleaning that up *now*, we could add functions to print to the "user destination", which is either the current monitor or stdout. In any case, it needs to be a separate commit, because this commit should do just one thing: fix the qemu_error() abuse. Proper use of stderr and stdout is a separate issue.