[Libvir] [PATCH] virterror Cleanups

Hi, The virsh command sometimes says wrong message that indicating where the error is coming from. So I have some fixes for libvirt error. * Add two number for virErrorDomain (virterror.h) * Add six message indicating where it's coming from (virterror.c) * Fix virErrorDomain number specified with __virRaiseError (openvz_conf.c/openvz_driver.c/stats_linux.c/xm_internal.c) Regards, Saori Fukuta

On Tue, Nov 20, 2007 at 03:02:09PM +0900, Saori Fukuta wrote:
Hi,
The virsh command sometimes says wrong message that indicating where the error is coming from. So I have some fixes for libvirt error. * Add two number for virErrorDomain (virterror.h) * Add six message indicating where it's coming from (virterror.c) * Fix virErrorDomain number specified with __virRaiseError (openvz_conf.c/openvz_driver.c/stats_linux.c/xm_internal.c)
Thanks a lot for chasing and fixing those issues, this makes a lot of sense, applied and commited to CVS ! thanks again, Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Daniel Veillard wrote:
On Tue, Nov 20, 2007 at 03:02:09PM +0900, Saori Fukuta wrote:
Hi,
The virsh command sometimes says wrong message that indicating where the error is coming from. So I have some fixes for libvirt error. * Add two number for virErrorDomain (virterror.h) * Add six message indicating where it's coming from (virterror.c) * Fix virErrorDomain number specified with __virRaiseError (openvz_conf.c/openvz_driver.c/stats_linux.c/xm_internal.c)
Thanks a lot for chasing and fixing those issues, this makes a lot of sense, applied and commited to CVS !
Agreed +1, but I think that VIR_FROM_LINUX should be renamed to VIR_FROM_STATS_LINUX. Should I make this change? Rich. /me really must change the ocaml bindings to autogenerate these lists of errors, otherwise the bindings crash when an unknown error is generated :-( -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903

On Tue, Nov 20, 2007 at 10:36:21AM +0000, Richard W.M. Jones wrote:
Daniel Veillard wrote:
On Tue, Nov 20, 2007 at 03:02:09PM +0900, Saori Fukuta wrote:
Hi,
The virsh command sometimes says wrong message that indicating where the error is coming from. So I have some fixes for libvirt error. * Add two number for virErrorDomain (virterror.h) * Add six message indicating where it's coming from (virterror.c) * Fix virErrorDomain number specified with __virRaiseError (openvz_conf.c/openvz_driver.c/stats_linux.c/xm_internal.c)
Thanks a lot for chasing and fixing those issues, this makes a lot of sense, applied and commited to CVS !
Agreed +1, but I think that VIR_FROM_LINUX should be renamed to VIR_FROM_STATS_LINUX.
Should I make this change?
Sure, fine by me.
/me really must change the ocaml bindings to autogenerate these lists of errors, otherwise the bindings crash when an unknown error is generated :-(
if you use the XML description, well they are there paphio:~/libvirt -> grep VIR_FROM docs/libvirt-api.xml <exports symbol='VIR_FROM_XML' type='enum'/> <exports symbol='VIR_FROM_TEST' type='enum'/> <exports symbol='VIR_FROM_OPENVZ' type='enum'/> [...] <exports symbol='VIR_FROM_XEN' type='enum'/> <enum name='VIR_FROM_CONF' file='virterror' value='9' type='virErrorDomain' info='Error in the configuration file handling'/> <enum name='VIR_FROM_DOM' file='virterror' value='6' type='virErrorDomain' info='Error when operating on a domain'/> [...] Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Daniel Veillard wrote:
On Tue, Nov 20, 2007 at 10:36:21AM +0000, Richard W.M. Jones wrote:
Daniel Veillard wrote:
On Tue, Nov 20, 2007 at 03:02:09PM +0900, Saori Fukuta wrote:
Hi,
The virsh command sometimes says wrong message that indicating where the error is coming from. So I have some fixes for libvirt error. * Add two number for virErrorDomain (virterror.h) * Add six message indicating where it's coming from (virterror.c) * Fix virErrorDomain number specified with __virRaiseError (openvz_conf.c/openvz_driver.c/stats_linux.c/xm_internal.c) Thanks a lot for chasing and fixing those issues, this makes a lot of sense, applied and commited to CVS ! Agreed +1, but I think that VIR_FROM_LINUX should be renamed to VIR_FROM_STATS_LINUX.
Should I make this change?
Sure, fine by me.
OK, committed.
/me really must change the ocaml bindings to autogenerate these lists of errors, otherwise the bindings crash when an unknown error is generated :-(
New release of ocaml-libvirt fixes this: http://libvirt.org/ocaml/ Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
participants (3)
-
Daniel Veillard
-
Richard W.M. Jones
-
Saori Fukuta