All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Alexander Graf <agraf@suse.de>
Cc: Chunyan Liu <cyliu@novell.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH V2] Add "tee" option to qemu char device
Date: Sat, 23 Jul 2011 14:11:39 -0500	[thread overview]
Message-ID: <4E2B1CEB.5040606@codemonkey.ws> (raw)
In-Reply-To: <7740093E-1D7B-4D0C-8D77-5C9126BCB52D@suse.de>

On 07/23/2011 01:31 PM, Alexander Graf wrote:
>
> On 23.07.2011, at 17:23, Anthony Liguori wrote:
>
>> On 07/14/2011 03:58 AM, Chunyan Liu wrote:
>>> Add "tee" backend to char device. It could be used as follows:
>>>      -serial tee:filepath,pty
>>>      -chardev tee,tee_fpath=path,tee_backend=pty,,path=path,,[mux=on|off]
>>> With "tee" option, "pty" output would be duplicated to filepath.
>>> Related thread:
>>> http://lists.nongnu.org/archive/html/qemu-devel/2011-07/msg00105.html
>>
>> I loathe adding even more complexity to the the char layer.  Can't you do this just as well with socat?
>
> I disagree. For socat we'd have to open some listening port (unix, tcg, etc) and then have socat connect to it.

And what's the problem?  Use a unix domain socket and call it a day.

> While socat is not up yet, the VM won't run. It also adds another layer of complexity (syncing of socat and qemu process) to the picture that I don't like.

These arguments all apply to any possible option.  Why not a grep 
target?  Why not a cut or less target?

> As long as the tee target is reasonably isolated, I don't think it'd clutter the char backend.

It'll never be tested and end up becoming dead bloat code.

For uncommon use cases where there's another way to do something with no 
real obvious technical advantages, using existing code (and utilities) 
always wins vs reinventing the wheel IMHO.

Regards,

Anthony Liguori

  reply	other threads:[~2011-07-23 19:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14  8:58 [Qemu-devel] [PATCH V2] Add "tee" option to qemu char device Chunyan Liu
2011-07-23 15:23 ` Anthony Liguori
2011-07-23 18:31   ` Alexander Graf
2011-07-23 19:11     ` Anthony Liguori [this message]
2011-07-24  9:47       ` Alexander Graf
2011-07-24 13:25         ` Anthony Liguori
2011-07-24  9:44 ` Alexander Graf
2011-08-05  2:26 Chun Yan Liu
2011-08-05 13:32 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E2B1CEB.5040606@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=agraf@suse.de \
    --cc=cyliu@novell.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.