------------------------------------------------------------ revno: 283 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Sat 2007-05-12 15:44:56 +1000 message: report number of frozen/thawed nodes modified: tools/ctdb_control.c ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1 === modified file 'tools/ctdb_control.c' --- a/tools/ctdb_control.c 2007-05-12 05:15:27 +0000 +++ b/tools/ctdb_control.c 2007-05-12 05:44:56 +0000 @@ -806,7 +806,7 @@ */ static int control_freeze(struct ctdb_context *ctdb, int argc, const char **argv) { - int ret=0; + int ret=0, count=0; uint32_t vnn, i; uint32_t *nodes; uint32_t num_nodes; @@ -830,9 +830,12 @@ int res = ctdb_ctrl_freeze(ctdb, timeval_current_ofs(5, 0), nodes[i]); if (res != 0) { printf("Warning: Unable to freeze node %u\n", nodes[i]); + } else { + count++; } ret |= res; } + printf("Froze %u nodes\n", count); talloc_free(nodes); return 0; } @@ -842,7 +845,7 @@ */ static int control_thaw(struct ctdb_context *ctdb, int argc, const char **argv) { - int ret=0; + int ret=0, count=0; uint32_t vnn, i; uint32_t *nodes; uint32_t num_nodes; @@ -866,9 +869,12 @@ int res = ctdb_ctrl_thaw(ctdb, timeval_current_ofs(5, 0), nodes[i]); if (res != 0) { printf("Warning: Unable to thaw node %u\n", nodes[i]); + } else { + count++; } ret |= res; } + printf("Thawed %u nodes\n", count); talloc_free(nodes); return 0; }