cluster/fence/fence_node fence_node.c
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rohara at sourceware.org 2006-07-10 17:05:54
Modified files:
fence/fence_node: fence_node.c
Log message:
Added "self" parameter to dispatch_fence_agent. Added "-s" option as way to pass name of current node.
This is needed for SCSI persistent reservation (fence_scsi).
fence/fence_node/fence_node.c +9 -3
@@ -20,7 +20,7 @@#include "copyright.cf" #include "ccs.h" -#define OPTION_STRING ("hOuV") +#define OPTION_STRING ("hOs:uV") #define die(fmt, args...) \ do \
@@ -34,7 +34,7 @@static char *prog_name;static int force; -int dispatch_fence_agent (int cd,char *victim); +int dispatch_fence_agent (int cd,char *victim,char *self);static void print_usage (void ) {
@@ -46,6 +46,7 @@printf ("\n" );printf (" -h Print this help, then exit\n" );printf (" -O Force connection to CCS\n" ); +printf (" -s Name of current node\n" );printf (" -V Print program version information, then exit\n" );printf ("\n" ); }
@@ -54,6 +55,7 @@ {int cont =1 , optchar, error, cd;char *victim =NULL ; +char *self =NULL ; prog_name = argv[0 ];
@@ -67,6 +69,10 @@exit (EXIT_SUCCESS );break ; +case 's' : + self = optarg; +break ; +case 'O' : force =1 ;break ;
@@ -116,7 +122,7 @@ goto fail; } - error =dispatch_fence_agent (cd, victim); + error =dispatch_fence_agent (cd, victim, self);if (error) goto fail_ccs;