[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: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation |
Date: |
Tue, 12 Feb 2013 16:34:30 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Gerd Hoffmann <address@hidden> writes:
> Hi,
>
>> Now let's take another step back: a character device is just a file.
>> Why can't we use plain ChardevFile for it?
>
> It's not.
A Unix character device is a special file.
> First, the file backend allows input and output being different files,
> and the input file is optional. That doesn't make sense for the
> parallel/serial port case.
>
> Second, it's actually more than a file. The guest can change device
> parameters such as the baudrate on the virtual device and qemu will
> apply those changes to the host device.
>
> IMO it is different enough to have its own type.
Special files support some special operations. I didn't propose to drop
support for the special operations and treat special files exactly like
regular files. I asked whether we really need a completely separate way
to configure them.
The argument for separate configuration is file's capability to split
input and output. Okay.
But why nested discriminators?
regular files: type=file
serial : type=port, data.type=serial
parallel : type=port, data.type=parallel
Simpler, and closer to existing -chardev:
regular files: type=file
serial : type=serial
parallel : type=parallel
I also dislike the pointless '"data" : {}' required by type pty and
null, but I can't figure out how to express 'void' in the schema.
[...]
- [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Markus Armbruster, 2013/02/11
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Eric Blake, 2013/02/11
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Markus Armbruster, 2013/02/11
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Eric Blake, 2013/02/11
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Gerd Hoffmann, 2013/02/12
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Markus Armbruster, 2013/02/12
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Paolo Bonzini, 2013/02/12
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Gerd Hoffmann, 2013/02/12
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation,
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Gerd Hoffmann, 2013/02/12
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Markus Armbruster, 2013/02/12
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, mdroth, 2013/02/12
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Anthony Liguori, 2013/02/12
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Markus Armbruster, 2013/02/13
- Re: [Qemu-devel] [PATCH for-1.4] qapi: Improve chardev-add documentation, Anthony Liguori, 2013/02/12