From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nm8DO-0007r3-H0 for qemu-devel@nongnu.org; Mon, 01 Mar 2010 11:11:26 -0500 Received: from [199.232.76.173] (port=58896 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nm8DN-0007qf-OG for qemu-devel@nongnu.org; Mon, 01 Mar 2010 11:11:25 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nm8DL-0007iM-89 for qemu-devel@nongnu.org; Mon, 01 Mar 2010 11:11:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45236) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nm8DK-0007hx-GU for qemu-devel@nongnu.org; Mon, 01 Mar 2010 11:11:22 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o21GBLnf003206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Mar 2010 11:11:21 -0500 Date: Mon, 1 Mar 2010 13:11:15 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH RFC 15/48] error: Don't abuse qemu_error() for non-error in qdev_device_help() Message-ID: <20100301131115.20294ad3@redhat.com> In-Reply-To: References: <1267034160-3517-1-git-send-email-armbru@redhat.com> <1267034160-3517-16-git-send-email-armbru@redhat.com> <20100226164453.2c5e86ba@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org On Mon, 01 Mar 2010 10:05:18 +0100 Markus Armbruster wrote: > 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. Makes sense. > > 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. Okay.