qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation
Date: Tue, 12 Feb 2013 11:25:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

Il 12/02/2013 10:44, Markus Armbruster ha scritto:
> Aside: 'type' is only there because we can't be bothered to figure out
> the device type ourselves.  Lame.

Is there any API for that, apart from shooting out random ioctls?

> Now let's take another step back: a character device is just a file.
> Why can't we use plain ChardevFile for it?

Because it doesn't make sense in general to use separate in/out for them.

> File type could be determined automatically.  If we don't want to do
> that, we have to make the user specify it via parameter.  The parameter
> could be optional and default to "regular file".

It also would have to be separate for in and out; also, I'm not sure how
you would handle a serial port that is used only for input or only for
output.  Right now ChardevFile uses a simple string for the input and
output sides.

{ 'type': 'ChardevFile', 'data': { '*in' : 'str',
                                   'out' : 'str' } }

>> > So, if you have a better name suggestion in time for 1.4 ...
> I believe the cautious choice is disabling type port for 1.4, so we can
> figure out the design we want without undue time pressure.
> 
> Disabling it for 1.4 shouldn't be a big deal, because the QMP command is
> not yet feature complete anyway.

I think it's overkill.

> If we decide to keep it for 1.4, I'd suggest to rename from 'port' to
> 'hostdev' or similar.

Fine by me.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]