]> git.proxmox.com Git - qemu.git/commit
qemu-char: Saner naming of memchar stuff & doc fixes
authorMarkus Armbruster <armbru@redhat.com>
Wed, 6 Feb 2013 20:27:24 +0000 (21:27 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 6 Feb 2013 22:35:19 +0000 (16:35 -0600)
commit3949e59414fccefadc50ae65650d676cc734048c
treebb6d54b1ce4491ec37c74d06cbf6e4aedefa54a9
parent5c230105cdea8ac9338bd5b4485c6ae80ec1fa18
qemu-char: Saner naming of memchar stuff & doc fixes

New device, has never been released, so we can still improve things
without worrying about compatibility.

Naming is a mess.  The code calls the device driver CirMemCharDriver,
the public API calls it "memory", "memchardev", or "memchar", and the
special commands are named like "memchar-FOO".  "memory" is a
particularly unfortunate choice, because there's another character
device driver called MemoryDriver.  Moreover, the device's distinctive
property is that it's a ring buffer, not that's in memory.  Therefore:

* Rename CirMemCharDriver to RingBufCharDriver, and call the thing a
  "ringbuf" in the API.

* Rename QMP and HMP commands from memchar-FOO to ringbuf-FOO.

* Rename device parameter from maxcapacity to size (simple words are
  good for you).

* Clearly mark the parameter as optional in documentation.

* Fix error reporting so that chardev-add reports to current monitor,
  not stderr.

* Replace cirmem in C identifiers by ringbuf.

* Rework documentation.  Document the impact of our crappy UTF-8
  handling on reading.

* QMP examples that even work.

I could split this up into multiple commits, but they'd change the
same documentation lines multiple times.  Not worth it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hmp-commands.hx
hmp.c
hmp.h
qapi-schema.json
qemu-char.c
qemu-options.hx
qmp-commands.hx