[libvirt] [PATCH] [0/6] implement synchronous hook scripts

Daniel Veillard veillard at redhat.com
Tue Mar 30 13:09:13 UTC 2010


On Mon, Mar 29, 2010 at 06:28:02PM +0200, Daniel Veillard wrote:
> On Fri, Mar 26, 2010 at 04:32:41PM +0100, Daniel Veillard wrote:
> > The script are supposed to be small, execute fast as it's synchronous,
> > their exit value is 0 otherwise it's considered a failure (which may
> > be ignored but in general will stops the ongoing operation).
> 
>   Okay, I have applied the changes suggested by Eric, rebased, added the
> missing entry in po/POTFILES.in and a few other cleanups, and then
> pushed this patch set,

  Of course I made a mistake in those last changes, so I applied that
trivial fix that Gerhard Stenzel raised on IRC

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
-------------- next part --------------
commit 0ec5cd0704255d056f93041a9492dc13d2ba03d3
Author: Daniel Veillard <veillard at redhat.com>
Date:   Tue Mar 30 15:06:13 2010 +0200

    Fix daemon hook script initialization
    
    * daemon/libvirtd.c: we should error out only if virHookInitialize()
      return value is negative

diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 4bdf4e2..208ffca 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -3150,7 +3150,7 @@ int main(int argc, char **argv) {
     }
 
     /* setup the hooks if any */
-    if (virHookInitialize()) {
+    if (virHookInitialize() < 0) {
         ret = VIR_DAEMON_ERR_HOOKS;
         goto error;
     }


More information about the libvir-list mailing list