Thread (5 messages) 5 messages, 3 authors, 2021-02-22

[RFC] btrfs-progs: format-output: remove newline in fmt_end text mode

From: Sidong Yang <hidden>
Date: 2021-02-16 16:30:01
Subsystem: the rest · Maintainer: Linus Torvalds

Remove a code that inserting new line in fmt_end() for text mode.
Old code made a failure in fstest btrfs/006.

Signed-off-by: Sidong Yang <redacted>
---
Hi, I've just read mail that Filipe written that some failure about fstest.
I'm worried about this patch makes other problem. So make it RFC. Thanks.
---
 common/format-output.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/common/format-output.c b/common/format-output.c
index f5b12548..96e0dfef 100644
--- a/common/format-output.c
+++ b/common/format-output.c
@@ -124,9 +124,7 @@ void fmt_end(struct format_ctx *fctx)
 
 	/* Close, no continuation to print */
 
-	if (bconf.output_format & CMD_FORMAT_TEXT)
-		putchar('\n');
-	else if (bconf.output_format & CMD_FORMAT_JSON) {
+	if (bconf.output_format & CMD_FORMAT_JSON) {
 		fmt_dec_depth(fctx);
 		fmt_separator(fctx);
 		printf("}\n");
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help