On Fri, May 28, 2010 at 01:33:49PM +0200, Paolo Smiraglia wrote:
I'm working on hooks mechanism. When I try to add some field in
enum
virHookQemuOp
make command return me error
$ util/hooks.c:***: error: negative width in bit-field
'verify_error_if_negative_size__'
I think the error is caused by a little programming error in
/src/util/hooks.c:74
where the struct virHookLxcOp is allocated by macro VIR_ENUM_IMPL with
dimension VIR_HOOK_QEMU_OP_LAST and not with VIR_HOOK_LXC_OP_LAST.
A possible solution could be to apply the patch listed below.
diff --git a/libvirt-20100528/src/util/hooks.c
b/libvirt-20100528-pmchook/src/util/hooks.c
index dec9223..482480d 100644
--- a/libvirt-20100528/src/util/hooks.c
+++ b/libvirt-20100528-pmchook/src/util/hooks.c
@@ -71,7 +71,7 @@ VIR_ENUM_IMPL(virHookQemuOp, VIR_HOOK_QEMU_OP_LAST,
"start",
"stopped")
-VIR_ENUM_IMPL(virHookLxcOp, VIR_HOOK_QEMU_OP_LAST,
+VIR_ENUM_IMPL(virHookLxcOp, VIR_HOOK_LXC_OP_LAST,
"start",
"stopped")
Oops, my bad, I hope there isn't more QEMU/LXC cut and paste errors :-)
thanks for the report !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/