diff mbox series

[v1,01/18] btrfs-progs: receive: fix option quiet

Message ID 20191030084122.29745-2-anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: global verbose and quiet option | expand

Commit Message

Anand Jain Oct. 30, 2019, 8:41 a.m. UTC
Even when -q option specified, the receive sub-command is not quiet as
show below.

 btrfs receive -q -f /tmp/t /btrfs1
 At snapshot ss3

It must be quiet atlest when its been asked to be quiet.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 cmds/receive.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/cmds/receive.c b/cmds/receive.c
index 4b03938ea3eb..c4827c1dd999 100644
--- a/cmds/receive.c
+++ b/cmds/receive.c
@@ -269,7 +269,8 @@  static int process_snapshot(const char *path, const u8 *uuid, u64 ctransid,
 		goto out;
 	}
 
-	fprintf(stdout, "At snapshot %s\n", path);
+	if (g_verbose)
+		fprintf(stdout, "At snapshot %s\n", path);
 
 	memcpy(rctx->cur_subvol.received_uuid, uuid, BTRFS_UUID_SIZE);
 	rctx->cur_subvol.stransid = ctransid;