switch chardev to QemuOpts: infrastructure, null device
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 10 Sep 2009 08:58:35 +0000 (10:58 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 11 Sep 2009 15:19:47 +0000 (10:19 -0500)
commite1a036644760692206a7d8537c569c0c042fce65
tree2e88485ef5ca527010d714964bb441020f0df0b1
parent21c6d22a013839eb38d63764502e9e4da4cd9500
switch chardev to QemuOpts: infrastructure, null device

start switching chardevs to QemuOpts.  This patch adds the
infrastructure and converts the null device.

The patch brings two new functions:

qemu_chr_open_opts()
same as qemu_chr_open(), but uses QemuOpts instead of a
option char string.

qemu_chr_parse_compat()
accepts a traditional chardev option string, returns the
corresponding QemuOpts instance, to handle backward
compatibility.

The patch also adds a new -chardev switch which can be used to create
named+unconnected chardevs, like this:

-chardev null,id=test

This uses the new qemu_chr_open_opts.  Thus with this patch alone only
the null device works.  The other devices will follow ...

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char.c
qemu-char.h
qemu-config.c
qemu-config.h
qemu-options.hx
vl.c