From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0x71-0006f1-0S for qemu-devel@nongnu.org; Fri, 24 Feb 2012 10:31:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0x6z-0004Xl-Mi for qemu-devel@nongnu.org; Fri, 24 Feb 2012 10:31:10 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:54168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0x6z-0004Xd-Ii for qemu-devel@nongnu.org; Fri, 24 Feb 2012 10:31:09 -0500 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 24 Feb 2012 10:31:07 -0500 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id C4F796E808A for ; Fri, 24 Feb 2012 10:30:32 -0500 (EST) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q1OFUVC1233044 for ; Fri, 24 Feb 2012 10:30:32 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q1OFUT5v027428 for ; Fri, 24 Feb 2012 13:30:30 -0200 Message-ID: <4F47AD11.7070608@us.ibm.com> Date: Fri, 24 Feb 2012 09:30:25 -0600 From: Anthony Liguori 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-1; format=flowed 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: kwolf@redhat.com, qemu-devel@nongnu.org On 02/07/2012 08:09 AM, Markus Armbruster wrote: > 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. I've applied 1-8 and 14 as discussed in the mail exchange. I've still got the remaining patches in my review queue. Thanks, Anthony Liguori > > 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 > > Markus Armbruster (19): > Revert "qemu-char: Print strerror message on failure" and deps > qemu-char: Use qemu_open() to avoid leaking fds to children > qemu-char: Re-apply style fixes from just reverted aad04cd0 > qemu-char: qemu_chr_open_fd() can't fail, don't check > vl.c: Error locations for options using add_device_config() > gdbstub: Error locations for -gdb > sockets: Drop sockets_debug debug code > sockets: Clean up inet_listen_opts()'s convoluted bind() loop > sockets: Chardev open error reporting, sockets part > qemu-char: Chardev open error reporting, !_WIN32 part > qemu-char: Chardev open error reporting, _WIN32 part > qemu-char: Chardev open error reporting, tty part > qemu-char: Chardev open error reporting, parport part > console: Eliminate text_consoles[] > console: Chardev open error reporting, console part > spice-qemu-char: Chardev open error reporting, spicevmc part > baum: Chardev open error reporting, braille part > qemu-char: Chardev open error reporting, generic part > qemu-char: Fix legacy chardev syntax error reporting > > console.c | 28 ++---- > console.h | 2 +- > hw/baum.c | 16 ++-- > hw/baum.h | 2 +- > hw/msmouse.c | 5 +- > hw/msmouse.h | 2 +- > qemu-char.c | 263 ++++++++++++++++++++++++++++++----------------------- > qemu-sockets.c | 203 +++++++++++++++-------------------------- > spice-qemu-char.c | 21 ++-- > ui/qemu-spice.h | 2 +- > vl.c | 20 ++--- > 11 files changed, 265 insertions(+), 299 deletions(-) >