From mboxrd@z Thu Jan 1 00:00:00 1970 From: ccaulfield@sourceware.org Date: 16 Jul 2008 14:53:46 -0000 Subject: [Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.06-11-g6818dd7 Message-ID: <20080716145346.20579.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project". http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=6818dd7db3d7a1a91192889966f5cf6bd942047a The branch, master has been updated via 6818dd7db3d7a1a91192889966f5cf6bd942047a (commit) from d493de97ef6714d1ee576932adec1dad12428d65 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6818dd7db3d7a1a91192889966f5cf6bd942047a Author: Christine Caulfield Date: Wed Jul 16 15:34:40 2008 +0100 [CCS] add -c flag to ccs_tool query The -c (compat) flag displays the query results in the same format emitted by the old "ccs_test" tool. Signed-off-by: Christine Caulfield ----------------------------------------------------------------------- Summary of changes: ccs/ccs_tool/ccs_tool.c | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ccs/ccs_tool/ccs_tool.c b/ccs/ccs_tool/ccs_tool.c index b63b576..2d48633 100644 --- a/ccs/ccs_tool/ccs_tool.c +++ b/ccs/ccs_tool/ccs_tool.c @@ -140,15 +140,22 @@ static int xpath_query(int argc, char **argv) int handle; char *ret; int i; + int compat_output = 0; if (argc < 2) { fprintf(stderr, "Usage:\n" "\n" - "ccs_tool query \n"); + "ccs_tool query [-c] \n"); return 1; } + if (strcmp(argv[1], "-c") == 0) { + argc--; + argv++; + compat_output = 1; + } + /* Tell the library we want full XPath parsing */ fullxpath = 1; @@ -157,11 +164,22 @@ static int xpath_query(int argc, char **argv) /* Process all the queries on the command-line */ for (i=1; i\n", ret); + } + else { + printf("%s\n", ret); + } free(ret); } else { - printf("Query failed: %s\n", strerror(errno)); + if (compat_output) { + fprintf(stderr, "ccs_get failed: %s\n", strerror(errno)); + } + else { + fprintf(stderr, "Query failed: %s\n", strerror(errno)); + } ccs_disconnect(handle); return -1; } @@ -292,6 +310,7 @@ static void tool_print_usage(FILE *stream){ " query Query the cluster configuration.\n" #else " query Query the cluster configuration.\n" + " query [-c] Query the cluster configuration, old output format.\n" #endif " addnode Add a node\n" " delnode Delete a node\n" hooks/post-receive -- Cluster Project