From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 125B7C433DF for ; Fri, 15 May 2020 03:28:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0791206F4 for ; Fri, 15 May 2020 03:28:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fVAtM3Mn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0791206F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZR1e-0006e6-2p for qemu-devel@archiver.kernel.org; Thu, 14 May 2020 23:28:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZR0B-0004XI-1M for qemu-devel@nongnu.org; Thu, 14 May 2020 23:27:11 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:24734 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jZR08-0002oO-Sl for qemu-devel@nongnu.org; Thu, 14 May 2020 23:27:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589513227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JJOqv42V6tLoeQoywZ6eBdxVfljzZGfj09udbv0mdl8=; b=fVAtM3MnsZVBsfM0eM75+beIzobPZ04CSHcmxkLOxNY6s4M+rAFzMPEz+yYtcx5SR4oRwM F8wAcf98yFeZVNCojvXKeRHwc/wOrJQkIgC0CmlvHQY2FG50TN14nKmGrbuGc9Sacr13Ws iCJWlY0q2wdOpCO+w36wC67xZRak54E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-232-nlt4EoVMOSqfzHFJjB44Tg-1; Thu, 14 May 2020 23:27:03 -0400 X-MC-Unique: nlt4EoVMOSqfzHFJjB44Tg-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8459E1800D4A; Fri, 15 May 2020 03:27:02 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2A50860BE2; Fri, 15 May 2020 03:26:54 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9C2AB11358BC; Fri, 15 May 2020 05:26:52 +0200 (CEST) From: Markus Armbruster To: Alexander Bulekov Subject: Re: [PATCH v3 1/2] chardev: enable distinct input for -chardev file References: <20200512034750.5773-1-alxndr@bu.edu> <20200512034750.5773-2-alxndr@bu.edu> Date: Fri, 15 May 2020 05:26:52 +0200 In-Reply-To: <20200512034750.5773-2-alxndr@bu.edu> (Alexander Bulekov's message of "Mon, 11 May 2020 23:47:49 -0400") Message-ID: <877dxdubcz.fsf@dusky.pond.sub.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Received-SPF: pass client-ip=205.139.110.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/14 23:27:07 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: berrange@redhat.com, qemu-devel@nongnu.org, darren.kenny@oracle.com, bsd@redhat.com, marcandre.lureau@gmail.com, stefanha@redhat.com, =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Alexander Bulekov writes: > char-file already supports distinct paths for input/output but it was > only possible to specify a distinct input through QMP. With this change, > we can also specify a distinct input with the -chardev file argument: > qemu -chardev file,id=char1,path=/out/file,pathin=/in/file > > Signed-off-by: Alexander Bulekov > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Darren Kenny > --- > chardev/char-file.c | 5 +++++ > chardev/char.c | 3 +++ > qemu-options.hx | 7 +++++-- > 3 files changed, 13 insertions(+), 2 deletions(-) [...] > diff --git a/qemu-options.hx b/qemu-options.hx > index 292d4e7c0c..488961099b 100644 > --- a/qemu-options.hx > +++ b/qemu-options.hx > @@ -2938,7 +2938,7 @@ DEF("chardev", HAS_ARG, QEMU_OPTION_chardev, > "-chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]]\n" > " [,mux=on|off][,logfile=PATH][,logappend=on|off]\n" > "-chardev ringbuf,id=id[,size=size][,logfile=PATH][,logappend=on|off]\n" > - "-chardev file,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n" > + "-chardev file,id=id,path=path[,pathin=PATH][,mux=on|off][,logfile=PATH][,logappend=on|off]\n" > "-chardev pipe,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n" > #ifdef _WIN32 > "-chardev console,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n" > @@ -3137,13 +3137,16 @@ The available backends are: > Create a ring buffer with fixed size ``size``. size must be a power > of two and defaults to ``64K``. > > -``-chardev file,id=id,path=path`` > +``-chardev file,id=id,path=path[,pathin=pathin]`` > Log all traffic received from the guest to a file. > > ``path`` specifies the path of the file to be opened. This file will > be created if it does not already exist, and overwritten if it does. > ``path`` is required. > > + ``pathin`` specifies a separate file as the input to the chardev. If > + ``pathin`` is omitted, ``path`` is used for both input and output > + > ``-chardev pipe,id=id,path=path`` > Create a two-way connection to the guest. The behaviour differs > slightly between Windows hosts and other hosts: "pathin" is ugly. What about "path-input"?