Skip to content

Commit

Permalink
Log exact number of deleted nodes when purge fails
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
(cherry picked from commit 34d3ca8)
  • Loading branch information
miurahr authored and tmenjo committed Jan 20, 2017
1 parent 088913a commit f4aef34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/zk_control.c
Expand Up @@ -367,6 +367,9 @@ static int do_purge(int argc, char **argv)
fprintf(stdout, "completed. %d queue nodes are deleted\n", deleted);
return 0;
err:
if (deleted > 0) {
fprintf(stderr, "%d queue nodes are deleted, but ", deleted);
}
fprintf(stderr, "failed to purge %s, %s\n", QUEUE_ZNODE, zerror(rc));
return -1;
}
Expand Down

0 comments on commit f4aef34

Please sign in to comment.