Re: [PATCH 1/4] Fix error messages codes when TypeFromString fails

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

 



On Wed, Apr 27, 2011 at 16:57:43 +0200, Michal Privoznik wrote:
> ---
>  src/conf/cpu_conf.c                |    4 +-
>  src/conf/domain_conf.c             |  100 ++++++++++++++++++-----------------
>  src/conf/interface_conf.c          |    2 +-
>  src/conf/network_conf.c            |    2 +-
>  src/conf/node_device_conf.c        |    4 +-
>  src/conf/nwfilter_conf.c           |    6 +-
>  src/conf/secret_conf.c             |    2 +-
>  src/conf/storage_conf.c            |    2 +-
>  src/conf/storage_encryption_conf.c |    4 +-
>  9 files changed, 64 insertions(+), 62 deletions(-)
> 
> diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
> index ad49916..db8b4bb 100644
> --- a/src/conf/cpu_conf.c
> +++ b/src/conf/cpu_conf.c
> @@ -156,7 +156,7 @@ virCPUDefParseXML(const xmlNodePtr node,
>              VIR_FREE(match);
>  
>              if (def->match < 0) {
> -                virCPUReportError(VIR_ERR_INTERNAL_ERROR,
> +                virCPUReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>                          "%s", _("Invalid match attribute for CPU specification"));
>                  goto error;
>              }
...

I think all of these errors should really be changed to the new
VIR_ERR_XML_CONFIG. This is not the case that a driver doesn't support
particular value, it's that the value is not know to libvirt at all, i.e., it
is an error in XML configuration file.

Jirka
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]