This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: STABLE3 - cman: Remove cman_dump_objdb
- From: Christine Caulfield <chrissie at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Tue, 13 Jan 2009 14:21:05 +0000 (UTC)
- Subject: cluster: STABLE3 - cman: Remove cman_dump_objdb
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=2e4a105e554e4b162b4d5ee19efc9e09b07e7e8e
Commit: 2e4a105e554e4b162b4d5ee19efc9e09b07e7e8e
Parent: 60c68fdb407f447fb8f4be57c6379788ee6546cd
Author: Christine Caulfield <ccaulfie@redhat.com>
AuthorDate: Tue Jan 13 14:20:19 2009 +0000
Committer: Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Tue Jan 13 14:20:19 2009 +0000
cman: Remove cman_dump_objdb
This function is far better performed by corosync-objtool now available
in corosync.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
cman/cman_tool/main.c | 32 --------------------------------
cman/daemon/commands.c | 16 ----------------
cman/lib/libcman.c | 10 ----------
cman/lib/libcman.h | 3 ---
4 files changed, 0 insertions(+), 61 deletions(-)
diff --git a/cman/cman_tool/main.c b/cman/cman_tool/main.c
index 2cace84..2181dbd 100644
--- a/cman/cman_tool/main.c
+++ b/cman/cman_tool/main.c
@@ -21,7 +21,6 @@
#define OP_NODES 9
#define OP_SERVICES 10
#define OP_DEBUG 11
-#define OP_DUMP_OBJDB 12
static void print_usage(int subcmd)
@@ -706,20 +705,6 @@ static void set_debuglog(commandline_t *comline)
cman_finish(h);
}
-#ifdef DEBUG
-static void dump_objdb(commandline_t *comline)
-{
- cman_handle_t h;
-
- h = open_cman_handle(1);
-
- if (cman_dump_objdb(h, comline->filename))
- perror("dump objdb failed");
-
- cman_finish(h);
-}
-#endif
-
static int get_int_arg(char argopt, char *arg)
{
char *tmp;
@@ -928,18 +913,6 @@ static void decode_arguments(int argc, char *argv[], commandline_t *comline)
if (comline->operation)
die("can't specify two operations");
comline->operation = OP_DEBUG;
-#ifdef DEBUG
- } else if (strcmp(argv[optind], "dump-db") == 0) {
- if (comline->operation)
- die("can't specify two operations");
- comline->operation = OP_DUMP_OBJDB;
- if (!argv[optind+1])
- die("no filename given");
- comline->filename = strdup(argv[optind+1]);
- if (comline->filename[0] != '/')
- die("dump filename must be an absolute path");
- optind++;
-#endif
} else if (strcmp(argv[optind], "remove") == 0) {
comline->remove = TRUE;
} else if (strcmp(argv[optind], "force") == 0) {
@@ -1061,11 +1034,6 @@ int main(int argc, char *argv[], char *envp[])
case OP_DEBUG:
set_debuglog(&comline);
break;
-#ifdef DEBUG
- case OP_DUMP_OBJDB:
- dump_objdb(&comline);
- break;
-#endif
}
exit(EXIT_SUCCESS);
diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index 34af7de..13e6ca2 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -1297,9 +1297,6 @@ int process_command(struct connection *con, int cmd, char *cmdbuf,
struct cl_version cnxman_version;
char *outbuf = *retbuf;
int value;
-#ifdef DEBUG
- FILE *dumpfile;
-#endif
P_MEMB("command to process is %x\n", cmd);
@@ -1330,19 +1327,6 @@ int process_command(struct connection *con, int cmd, char *cmdbuf,
set_debuglog(value);
err = 0;
break;
-#ifdef DEBUG
- case CMAN_CMD_DUMP_OBJDB:
- dumpfile = fopen(cmdbuf, "w+");
- if (dumpfile) {
- corosync->object_dump(OBJECT_PARENT_HANDLE, dumpfile);
- fclose(dumpfile);
- err = 0;
- }
- else {
- err = -errno;
- }
- break;
-#endif
case CMAN_CMD_START_CONFCHG:
con->confchg = 1;
err = 0;
diff --git a/cman/lib/libcman.c b/cman/lib/libcman.c
index b05011c..21f9763 100644
--- a/cman/lib/libcman.c
+++ b/cman/lib/libcman.c
@@ -1096,13 +1096,3 @@ int cman_node_fenced(cman_handle_t handle, int nodeid, uint64_t time, char *agen
strcpy(f.fence_agent, agent);
return info_call(h, CMAN_CMD_UPDATE_FENCE_INFO, &f, sizeof(f), NULL, 0);
}
-
-#ifdef DEBUG
-int cman_dump_objdb(cman_handle_t handle, char *filename)
-{
- struct cman_handle *h = (struct cman_handle *)handle;
- VALIDATE_HANDLE(h);
-
- return info_call(h, CMAN_CMD_DUMP_OBJDB, filename, strlen(filename)+1, NULL, 0);
-}
-#endif
diff --git a/cman/lib/libcman.h b/cman/lib/libcman.h
index 37058df..7557cb9 100644
--- a/cman/lib/libcman.h
+++ b/cman/lib/libcman.h
@@ -319,9 +319,6 @@ int cman_get_fenceinfo(cman_handle_t handle, int nodeid, uint64_t *fence_time, i
/* Get stuff for cman_tool. Nobody else should use this */
int cman_get_extra_info(cman_handle_t handle, cman_extra_info_t *info, int maxlen);
-/* Dump the objdb contents (only works if compiled with DEBUG enabled) */
-int cman_dump_objdb(cman_handle_t handle, char *filename);
-
/*
* -----------------------------------------------------------------------------
* Admin functions. You will need privileges and have a handle created by