From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RunVA-0003JN-4l for qemu-devel@nongnu.org; Tue, 07 Feb 2012 11:02:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RunV2-0002QN-01 for qemu-devel@nongnu.org; Tue, 07 Feb 2012 11:02:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21495) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RunV1-0002Q5-PO for qemu-devel@nongnu.org; Tue, 07 Feb 2012 11:02:31 -0500 Message-ID: <4F314BE4.4000005@redhat.com> Date: Tue, 07 Feb 2012 17:05:56 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1328623766-12287-1-git-send-email-armbru@redhat.com> In-Reply-To: <1328623766-12287-1-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 00/19] Fix and improve chardev open error messages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Am 07.02.2012 15:09, schrieb Markus Armbruster: > Our chardev open error messages are an embarrassment. Commit 6e1db57b > tried to improve the useless "opening backend FOO failed" message in > qemu_chr_open_opts(), but it is flawed: some failure modes went from > an unhelpful "failed" to an outright misleading error message (see > first patch for details). And even for failure modes where the > message isn't misleading, it's still sub-par. > > Clue: many backends already report their errors. The "failed" message > is merely redundant then. > > Since I'm touching the error reporting anyway, convert it to > error_report(), so that a future a monitor command to add character > devices emits its errors to the monitor, not stderr. > > Outline: > > [01-04/19] Revert the flawed commit > [05-06/19] Prepare for use of error_report() > [07-17/19] Make the backends report decent errors on all failure paths > [ 18/18] Rip out the useless "failed" message > [ 19/19] Bonus fix: legacy chardev syntax error reporting I had some minor comments which can be fixed on top. I also think that introducing Error** to these functions can (or actually should) be a separate step. Reviewed-by: Kevin Wolf