path: root/cmds-balance.c
diff options
authorNoah Massey <>2016-05-04 15:43:26 -0400
committerDavid Sterba <>2016-05-11 16:37:12 +0200
commit00fd55385312d0cc2c340dc31d06806167c7dcb4 (patch)
treebf4f3353f9bd78d56ee7b05ddb79bec0ec9c45ca /cmds-balance.c
parenta6bbbe60874cd7f92bcf55f75fa26f33957e9b25 (diff)
btrfs-progs: Adjust timing of safety delay countdown
When printing the countdown in the safety delay, the number should correspond to the number of seconds remaining to wait at the time the delay is printed. In other words, there should be a one second sleep after printing '1'. Signed-off-by: Noah Massey <> Signed-off-by: David Sterba <>
Diffstat (limited to 'cmds-balance.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-balance.c b/cmds-balance.c
index 5f05f603..8f3bf5bc 100644
--- a/cmds-balance.c
+++ b/cmds-balance.c
@@ -445,9 +445,9 @@ static int do_balance(const char *path, struct btrfs_ioctl_balance_args *args,
printf("\twarning. The operation will start in %d seconds.\n", delay);
printf("\tUse Ctrl-C to stop it.\n");
while (delay) {
- sleep(1);
printf("%2d", delay--);
+ sleep(1);
printf("\nStarting balance without any filters.\n");