From patchwork Tue Jun 6 11:58:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 9768725 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3CDFE6035D for ; Tue, 6 Jun 2017 11:59:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 304D1223C7 for ; Tue, 6 Jun 2017 11:59:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24C0227F07; Tue, 6 Jun 2017 11:59:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DEE06223C7 for ; Tue, 6 Jun 2017 11:59:01 +0000 (UTC) Received: from localhost ([::1]:37752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dID8T-0002no-Gf for patchwork-qemu-devel@patchwork.kernel.org; Tue, 06 Jun 2017 07:58:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dID7t-0002mW-Ko for qemu-devel@nongnu.org; Tue, 06 Jun 2017 07:58:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dID7s-0005Jl-9R for qemu-devel@nongnu.org; Tue, 06 Jun 2017 07:58:21 -0400 Received: from mail-lf0-x22e.google.com ([2a00:1450:4010:c07::22e]:34404) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dID7r-0005ID-UG for qemu-devel@nongnu.org; Tue, 06 Jun 2017 07:58:20 -0400 Received: by mail-lf0-x22e.google.com with SMTP id v20so53074027lfa.1 for ; Tue, 06 Jun 2017 04:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vbXtZUdUPy7NtvhKMZ7Os7bvilnUhQN5wcLgM0PXcaQ=; b=puddDnMF0/GDMHdBcpAtCM71/R5uTST3WFWcmujsvAbyVgMKQrNw63VWTAaPdcqfKK o79daDz8OoB9YdAV/Ks/0qgUncw7dVzAEcFy9iesdI3wrBYpopTE7CC4gMlfa/76/okC odS4bqFzGPZAsNdfsL35P1S8NtIiAbBMDcdNCOveRsE+lfc5IB7hTQinGg3jvR9fdF1A +nD6Trc4UJGavbTNHW8RAGlMxTDCKjsY7BBGEysyVSsvhFcHYvmizI+V3KX7zvqi7v+I h8Aw3LjO+ugA6x7p6obXnYU56jkzhKWo9yXduMlhE//apLaYFGphsgCEfsPnT4ZQOpg2 uTVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vbXtZUdUPy7NtvhKMZ7Os7bvilnUhQN5wcLgM0PXcaQ=; b=PkAhMEE1ilGtyZuZyffk20uQHflcYPxUwRpqneoM6wOHdvgS/YPEz44Mu4SfcbqpsR VVIFHm23rYfFeWzVkuRZcat/wwVioqqZLeObgOB+vdiD6FbbkHXC/Yk4jYYs9hU141yZ O20zzgnhiNHH+1FmHNXrbyUTyZU0n8uUH4x8slOk1Ir409DX4IjPouNwRdMMbELpDZxm CYrc+E7xYi+mmPu9wCok8YncFsQdsMFjay3xOYNwnB3I7u/k8gkkqoqxBZlQO6xDxH6l zgBBs3Z9dOf+CkGR/P1gsR7jue4plIOBeO4Mi9Wno7DM2F42SguDZCDaRY8ZPDT1ktoa 0Mww== X-Gm-Message-State: AODbwcD1Sy7hSg05TF9xOEcOFDVHOJkO7ZOsu6w4vU/9Ek+DoteHK1UC Ph1GfM9J8frn25cSXfUJeyYPWC3XSw== X-Received: by 10.46.72.9 with SMTP id v9mr8292152lja.21.1496750298561; Tue, 06 Jun 2017 04:58:18 -0700 (PDT) MIME-Version: 1.0 References: <2b2311b1b070a0b03973e39deccf4682de4a6cd4.1496686997.git.alistair.francis@xilinx.com> In-Reply-To: <2b2311b1b070a0b03973e39deccf4682de4a6cd4.1496686997.git.alistair.francis@xilinx.com> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Tue, 06 Jun 2017 11:58:07 +0000 Message-ID: To: Alistair Francis , qemu-devel@nongnu.org, Gerd Hoffmann , pbonzini@redhat.com X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22e X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [Qemu-devel] [PATCH v1 1/1] char-socket: Don't report TCP socket waiting as an error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair23@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi On Mon, Jun 5, 2017 at 10:37 PM Alistair Francis < alistair.francis@xilinx.com> wrote: > When QEMU is waiting for a TCP socket connection it reports that message as > an error. This isn't an error though, so let's change the report to just > use qemu_log(). > > I don't think this is a good idea, since stdout output my be mixed with console or other expected output. In fact, it used to be on stdout, and got moved to stderr: commit fdca2124adc293f84f2b7aaf0df43faa6b6bf420 Author: Gerd Hoffmann Date: Mon Jun 24 08:39:49 2013 +0200 qemu-char: print notification to stderr Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek Signed-off-by: Michael Tokarev Signed-off-by: Alistair Francis > --- > > chardev/char-socket.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/chardev/char-socket.c b/chardev/char-socket.c > index ccc499cfa1..a9884fa85b 100644 > --- a/chardev/char-socket.c > +++ b/chardev/char-socket.c > @@ -27,6 +27,7 @@ > #include "io/channel-tls.h" > #include "qemu/error-report.h" > #include "qapi/error.h" > +#include "qemu/log.h" > #include "qapi/clone-visitor.h" > > #include "chardev/char-io.h" > @@ -765,7 +766,7 @@ static int tcp_chr_wait_connected(Chardev *chr, Error > **errp) > * in TLS and telnet cases, only wait for an accepted socket */ > while (!s->ioc) { > if (s->is_listen) { > - error_report("QEMU waiting for connection on: %s", > + qemu_log("QEMU waiting for connection on: %s", > chr->filename); > qio_channel_set_blocking(QIO_CHANNEL(s->listen_ioc), true, > NULL); > tcp_chr_accept(QIO_CHANNEL(s->listen_ioc), G_IO_IN, chr); > -- > 2.11.0 > > > -- Marc-André Lureau diff --git a/qemu-char.c b/qemu-char.c index e3b3224886..371f6308c5 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2666,8 +2666,8 @@ static CharDriverState *qemu_chr_open_socket_fd(int fd, bool do_nodelay, } if (is_listen && is_waitconnect) { - printf("QEMU waiting for connection on: %s\n", - chr->filename); + fprintf(stderr, "QEMU waiting for connection on: %s\n", + chr->filename);