From d0054d383d9177b6b349c727bab4422c2d893aeb Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Thu, 7 Oct 2010 16:18:27 +1100 Subject: [PATCH] get rid of the "ctdb setflags" command since 1, we dont need it 2, it uses the ugly "modify flags" control that should die (This used to be ctdb commit 25f96db966230e90291eee57841c9faaae33713b) --- ctdb/tools/ctdb.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index ff2e7e9826f..8d422552aca 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -4461,50 +4461,6 @@ static int control_wipedb(struct ctdb_context *ctdb, int argc, return 0; } -/* - * set flags of a node in the nodemap - */ -static int control_setflags(struct ctdb_context *ctdb, int argc, const char **argv) -{ - int ret; - int32_t status; - int node; - int flags; - TDB_DATA data; - struct ctdb_node_flag_change c; - - if (argc != 2) { - usage(); - return -1; - } - - if (sscanf(argv[0], "%d", &node) != 1) { - DEBUG(DEBUG_ERR, ("Badly formed node\n")); - usage(); - return -1; - } - if (sscanf(argv[1], "0x%x", &flags) != 1) { - DEBUG(DEBUG_ERR, ("Badly formed flags\n")); - usage(); - return -1; - } - - c.pnn = node; - c.old_flags = 0; - c.new_flags = flags; - - data.dsize = sizeof(c); - data.dptr = (unsigned char *)&c; - - ret = ctdb_control(ctdb, options.pnn, 0, CTDB_CONTROL_MODIFY_FLAGS, 0, - data, NULL, NULL, &status, NULL, NULL); - if (ret != 0 || status != 0) { - DEBUG(DEBUG_ERR,("Failed to modify flags\n")); - return -1; - } - return 0; -} - /* dump memory usage */ @@ -4803,7 +4759,6 @@ static const struct { { "dumpdbbackup", control_dumpdbbackup, false, true, "dump database backup from a file.", ""}, { "wipedb", control_wipedb, false, false, "wipe the contents of a database.", ""}, { "recmaster", control_recmaster, false, false, "show the pnn for the recovery master."}, - { "setflags", control_setflags, false, false, "set flags for a node in the nodemap.", " "}, { "scriptstatus", control_scriptstatus, false, false, "show the status of the monitoring scripts (or all scripts)", "[all]"}, { "enablescript", control_enablescript, false, false, "enable an eventscript", "