eventscript: cleanup ctdb_event_script_v
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 24 Nov 2009 00:39:01 +0000 (11:09 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 24 Nov 2009 00:39:01 +0000 (11:09 +1030)
ctdb_event_script_v doesn't take varargs.  ctdb_run_event_script is
a better name, and fix comment.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
server/eventscript.c

index 854acd655eb87bd1240a0e1300fde1aa7818b779..2df941d2df82fae47680a128a5ca9b2d59ae4c70 100644 (file)
@@ -443,11 +443,11 @@ static struct ctdb_script_list *ctdb_get_script_list(struct ctdb_context *ctdb,
 
 
 /*
-  run the event script - varargs version
+  Actually run the event script
   this function is called and run in the context of a forked child
   which allows it to do blocking calls such as system()
  */
-static int ctdb_event_script_v(struct ctdb_context *ctdb, const char *options)
+static int ctdb_run_event_script(struct ctdb_context *ctdb, const char *options)
 {
        char *cmdstr;
        int ret;
@@ -813,7 +813,7 @@ static int ctdb_event_script_callback_v(struct ctdb_context *ctdb,
                close(state->fd[0]);
                set_close_on_exec(state->fd[1]);
 
-               rt = ctdb_event_script_v(ctdb, state->options);
+               rt = ctdb_run_event_script(ctdb, state->options);
                /* We must be able to write PIPEBUF bytes at least; if this
                   somehow fails, the read above will be short. */
                write(state->fd[1], &rt, sizeof(rt));