From nobody Sun Feb 8 04:30:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1511354227861291.48260439594003; Wed, 22 Nov 2017 04:37:07 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0BE49780D0; Wed, 22 Nov 2017 12:37:06 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DA74A60F91; Wed, 22 Nov 2017 12:37:05 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A19524BB79; Wed, 22 Nov 2017 12:37:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAMCb1sb028864 for ; Wed, 22 Nov 2017 07:37:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id A625A60C80; Wed, 22 Nov 2017 12:37:01 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.105]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7A62860F9F for ; Wed, 22 Nov 2017 12:36:58 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 8AAA7100425; Wed, 22 Nov 2017 13:36:57 +0100 (CET) From: Jiri Denemark To: libvir-list@redhat.com Date: Wed, 22 Nov 2017 13:36:54 +0100 Message-Id: <579d5c19e080ee3d7123cd2bcb952983d6d871f0.1511354114.git.jdenemar@redhat.com> In-Reply-To: References: In-Reply-To: References: Mail-Followup-To: libvir-list@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/3] qemu: Properly skip "char device redirected to" in QEMU log X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 22 Nov 2017 12:37:06 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When reading QEMU log for reporting it as an error message, we want to skip "char device redirected to" line. However, this string is not printed at the beginning of a line, which means STRPREFIX will never find it. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 6d242b1b51..3da297c16f 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1847,7 +1847,7 @@ qemuProcessReadLog(qemuDomainLogContextPtr logCtxt, c= har **msg) while ((eol =3D strchr(filter_next, '\n'))) { *eol =3D '\0'; if (virLogProbablyLogMessage(filter_next) || - STRPREFIX(filter_next, "char device redirected to")) { + strstr(filter_next, "char device redirected to")) { size_t skip =3D (eol + 1) - filter_next; memmove(filter_next, eol + 1, buf + got - eol); got -=3D skip; --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list