cluster/fence/agents/xvm Makefile fence_xvm.c ...
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: lhh at sourceware.org 2006-11-03 15:58:56
Modified files:
fence/agents/xvm: Makefile fence_xvm.c fence_xvmd.c options.c
virt.c
Log message:
Fix bugzillas #212444, #212433
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/xvm/Makefile.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/xvm/fence_xvm.c.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/xvm/fence_xvmd.c.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/xvm/options.c.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/xvm/virt.c.diff?cvsroot=cluster&r1=1.2&r2=1.3
fence/agents/xvm/Makefile +3 -3
@@ -27,10 +27,10 @@ -I../../../cman/lib CFLAGS+=-DFENCE_RELEASE_NAME=\"${RELEASE}\" \ - -Wall -Werror -Wstrict-prototypes -Wshadow -ggdb + -Wall -Werror -Wstrict-prototypes -Wshadow -ggdb -D_GNU_SOURCE LIBS+=-L../../../cman/lib -L../../../ccs/lib -L${libdir}/openais \ - -L../../../dlm/lib -lccs -lcman -ldlm -lnss3 -lvirt -lSaCkpt + -L../../../dlm/lib -lnss3 all: ${TARGETS}
@@ -38,7 +38,7 @@ gcc -o $@ $^ $(LIBS) fence_xvmd: ${fence_xvmd_SOURCE:.c=.o} - gcc -o $@ $^ $(LIBS) + gcc -o $@ $^ $(LIBS) -lvirt -lccs -lcman -lSaCkpt %.o: %.c gcc $(CFLAGS) -c -o $@ $^ $(INCLUDES)
fence/agents/xvm/fence_xvm.c +1 -1
@@ -47,7 +47,7 @@#include <nss.h> /* Local includes */ -#include "virt.h" +#include "xvm.h" #include "ip_lookup.h" #include "simple_auth.h" #include "options.h"
fence/agents/xvm/fence_xvmd.c +44 -1
69 lines not on this page · raw message
fence/agents/xvm/options.c +2 -2
@@ -299,7 +299,7 @@ assign_key }, {'o' ,"-o <operation>" ,"option" , -"Fencing operation (null, [off], reboot)" , +"Fencing operation (null, off, [reboot])" , assign_op }, { 'H', "-H <domain>", "domain",
@@ -375,7 +375,7 @@ args->addr =NULL ; args->domain =NULL ; args->key_file =DEFAULT_KEY_FILE ; - args->op =FENCE_OFF ; + args->op =FENCE_REBOOT ; args->hash =DEFAULT_HASH ; args->auth =DEFAULT_AUTH ; args->port =1229 ;
fence/agents/xvm/virt.c +4 -14
@@ -176,25 +176,15 @@virt_state_t *vl_find_name (virt_list_t *vl,char *name) { -int b,e,x,y; +int x;if (!vl || !name || !vl->vm_count)return NULL ; - b =0 ; - e = vl->vm_count; - -do { - x = (b + e) /2 ; - y =strcasecmp (vl->vm_states[x].v_name, name); -if (y ==0 ) { +for (x =0 ; x < vl->vm_count; x++) { +if (!strcasecmp (vl->vm_states[x].v_name, name))return &vl->vm_states[x]; - }else if (y <0 ) { - e = x; - }else { - b = x; - } - }while (b != e); + }return NULL ; }