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")
Have a good day.....
--
PAOLO SMIRAGLIA
http://portale.isf.polito.it/paolo-smiraglia