FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 12-13-2007, 09:38 AM
 
Default cluster/ccs/ccs_tool editconf.c

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: pcaulfield@sourceware.org 2007-12-13 10:38:47

Modified files:
ccs/ccs_tool : editconf.c

Log message:
Fix altname option

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/ccs_tool/editconf.c.diff?cvsroot=cluster&r1=1.11&r2=1.12

--- cluster/ccs/ccs_tool/editconf.c 2006/05/24 13:50:41 1.11
+++ cluster/ccs/ccs_tool/editconf.c 2007/12/13 10:38:42 1.12
@@ -417,7 +417,7 @@
/* Print name=value pairs for a (n XML) node.
* "ignore" is a string to ignore if present as a property (probably already printed on the main line)
*/
-static void print_properties(xmlNode *node, char *prefix, char *ignore, char *ignore2)
+static int print_properties(xmlNode *node, char *prefix, char *ignore, char *ignore2)
{
xmlAttr *attr;
int done_prefix = 0;
@@ -440,6 +440,7 @@
}
if (done_prefix)
printf("
");
+ return done_prefix;
}

/* Add name=value pairs from the commandline as properties to a node */
@@ -477,6 +478,7 @@
{
xmlNode *clusternodes;
xmlNode *newnode;
+
xmlNode *newfence;
xmlNode *newfencemethod;
xmlNode *newfencedevice;
@@ -507,6 +509,15 @@
xmlSetProp(newnode, BAD_CAST "nodeid", BAD_CAST ninfo->nodeid);
xmlAddChild(clusternodes, newnode);

+ if (ninfo->altname)
+ {
+ xmlNode *altnode;
+
+ altnode = xmlNewNode(NULL, BAD_CAST "altname");
+ xmlSetProp(altnode, BAD_CAST "name", BAD_CAST ninfo->altname);
+ xmlAddChild(newnode, altnode);
+ }
+
/* Add the fence attributes */
newfence = xmlNewNode(NULL, BAD_CAST "fence");
newfencemethod = xmlNewNode(NULL, BAD_CAST "method");
@@ -975,6 +986,13 @@
ftype?ftypexmlChar *)"");
if (verbose)
{
+ xmlNode *a = findnode(cur_node, "altname");
+ if (a)
+ {
+ printf(" altname %s=%s", "name", xmlGetProp(a, BAD_CAST "name"));
+ if (!print_properties(a, "","",""))
+ printf("
");
+ }
print_properties(cur_node, " Node properties: ", "votes", "nodeid");
print_properties(fencenode, " Fence properties: ", "agent", "");
}
 

Thread Tools




All times are GMT. The time now is 08:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org