[btrfs-progs,1/2] btrfs-progs: balance: Don't set stderr to /dev/null on balance_start
diff mbox series

Message ID 20191030233641.30123-2-marcos.souza.org@gmail.com
State New
Headers show
Series
  • balance: check balance errors on background
Related show

Commit Message

Marcos Paulo de Souza Oct. 30, 2019, 11:36 p.m. UTC
From: Marcos Paulo de Souza <mpdesouza@suse.com>

Remove the close/open calls in order to receive the error messages when
starting balance in the background.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
 cmds/balance.c | 2 --
 1 file changed, 2 deletions(-)

Patch
diff mbox series

diff --git a/cmds/balance.c b/cmds/balance.c
index 32830002..f0394a2e 100644
--- a/cmds/balance.c
+++ b/cmds/balance.c
@@ -659,10 +659,8 @@  static int cmd_balance_start(const struct cmd_struct *cmd,
 				i = chdir("/");
 				close(0);
 				close(1);
-				close(2);
 				open("/dev/null", O_RDONLY);
 				open("/dev/null", O_WRONLY);
-				open("/dev/null", O_WRONLY);
 				break;
 			default:
 				exit(0);