[libvirt] [PATCH v2] conf: Always use VIR_ERR_CONFIG_UNSUPPORTED on enumFromString() failures

Ján Tomko jtomko at redhat.com
Tue Jan 14 13:04:19 UTC 2014


On 01/13/2014 11:41 AM, Christophe Fergeau wrote:
> Currently, during XML parsing, when a call to a FromString() function to
> get an enum value fails, the error which is reported is either
> VIR_ERR_CONFIG_UNSUPPORTED, VIR_ERR_INTERNAL_ERROR or VIR_ERR_XML_ERROR.
> 
> This commit makes such conversion failures consistently return
> VIR_ERR_CONFIG_UNSUPPORTED.
> ---
> Changes since v1:
> - return VIR_ERR_CONFIG_UNSUPPORTED instead of the too generic
>   VIR_ERR_XML_ERROR
> 
> 
>  src/conf/cpu_conf.c                  |  10 +-
>  src/conf/domain_conf.c               | 172 +++++++++++++++++------------------
>  src/conf/interface_conf.c            |   2 +-
>  src/conf/netdev_vlan_conf.c          |   2 +-
>  src/conf/netdev_vport_profile_conf.c |   2 +-
>  src/conf/network_conf.c              |   6 +-
>  src/conf/node_device_conf.c          |   4 +-
>  src/conf/nwfilter_conf.c             |   4 +-
>  src/conf/secret_conf.c               |   2 +-
>  src/conf/snapshot_conf.c             |   8 +-
>  src/conf/storage_conf.c              |  16 ++--
>  src/conf/storage_encryption_conf.c   |   4 +-
>  12 files changed, 116 insertions(+), 116 deletions(-)

ACK

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140114/416adf95/attachment-0001.sig>


More information about the libvir-list mailing list