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

Re: [libvirt] [PATCH 3/5] domain conf: char: Add an explicit targetType field



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 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")
> +
>  VIR_ENUM_IMPL(virDomainChrDevice, VIR_DOMAIN_CHR_DEVICE_TYPE_LAST,
> -              "null",
>                "monitor",
>                "parallel",
>                "serial",
>                "console",
> -              "guestfwd",
> -              "virtio")
> +              "channel")

This is breaking backwards compatability AFAICT.

> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
> index b4e756a..75dc29a 100644
> --- a/src/conf/domain_conf.h
> +++ b/src/conf/domain_conf.h
> @@ -312,15 +312,22 @@ struct _virDomainNetDef {
>  };
>  
>  enum virDomainChrDeviceType {
> -    VIR_DOMAIN_CHR_DEVICE_TYPE_NULL = 0,
> -    VIR_DOMAIN_CHR_DEVICE_TYPE_MONITOR,
> +    VIR_DOMAIN_CHR_DEVICE_TYPE_MONITOR = 0,
>      VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL,
>      VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL,
>      VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE,
> -    VIR_DOMAIN_CHR_DEVICE_TYPE_GUESTFWD,
> -    VIR_DOMAIN_CHR_DEVICE_TYPE_VIRTIO,
> +    VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL,
>  
> -    VIR_DOMAIN_CHR_DEVICE_TYPE_LAST
> +    VIR_DOMAIN_CHR_DEVICE_TYPE_LAST,
> +};

This is breaking backwards compatability with existing XML configs
surely.

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 :|


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