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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marcos Paulo de Souza <mpdesouza@xxxxxxxx>

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@xxxxxxxx>
---
 cmds/balance.c | 2 --
 1 file changed, 2 deletions(-)

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);
-- 
2.23.0




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux