[libvirt] [PATCH 3/5] domain conf: char: Add an explicit targetType field
Daniel P. Berrange
berrange at redhat.com
Mon Jul 19 15:51:21 UTC 2010
On Wed, Jul 14, 2010 at 03:44:54PM -0400, Cole Robinson wrote:
> targetType only tracks the actual <target> format we are parsing.
> TYPE_DEFAULT is the typical serial/parallel format, NONE is for the
> <monitor> device which prints nothing.
>
> Signed-off-by: Cole Robinson <crobinso at redhat.com>
> ---
> src/conf/domain_conf.c | 108 ++++++++++++++++++++++++-----------------------
> src/conf/domain_conf.h | 19 ++++++--
> src/qemu/qemu_conf.c | 6 +-
> 3 files changed, 72 insertions(+), 61 deletions(-)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index c9140fe..e4d52ff 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -161,14 +161,18 @@ VIR_ENUM_IMPL(virDomainNet, VIR_DOMAIN_NET_TYPE_LAST,
> "internal",
> "direct")
>
> +VIR_ENUM_IMPL(virDomainChrTarget, VIR_DOMAIN_CHR_TARGET_TYPE_LAST,
> + "none",
> + "default",
> + "guestfwd",
> + "virtio")
Looking at this again, I think that this list needs to vary based on
device type.
eg
serial: uart16550a, uml (usermode linux paravirt serial)
channels: guestfwd, virtio, (possibly xen in future)
consoles: xen, uml, serial, virtio
otherwise we're allowing for combinations that don't really
make sense like console+guestfwd. I don't think we should
have a 'default' type either - we should set the explicit
type for all based on the virtualization type.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list