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. 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.

As long as the tee target is reasonably isolated, I don't think it'd clutter 
the char backend. It'd be just like any other backend and eventually could 
maybe move into something more structured, plugin'ish, like the block layer.

I haven't gotten around to review the patch again though, will try to do soon.

Alex


Reply via email to