[PATCH] btrfs-progs: check: fix missing newlines

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

 



From: Omar Sandoval <osandov@xxxxxx>

Also, the other progress messages go to stderr, so "checking extents"
probably should, as well.

Fixes: c7a1f66a205f ("btrfs-progs: check: switch some messages to common helpers")
Signed-off-by: Omar Sandoval <osandov@xxxxxx>
---
As a side note, it seems almost completely random whether we print to
stdout or stderr for any given message. That could probably use some
cleaning up for consistency. A quick run of e2fsck indicated that it
prints almost everything on stdout except for usage and administrative
problems. xfs_repair just seems to put everything in stderr. I
personally like the e2fsck approach. Anyone have any preference?

 cmds-check.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmds-check.c b/cmds-check.c
index 57c4300..3fb3bd7 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -11467,13 +11467,13 @@ int cmd_check(int argc, char **argv)
 	}
 
 	if (!ctx.progress_enabled)
-		printf("checking extents");
+		fprintf(stderr, "checking extents\n");
 	if (check_mode == CHECK_MODE_LOWMEM)
 		ret = check_chunks_and_extents_v2(root);
 	else
 		ret = check_chunks_and_extents(root);
 	if (ret)
-		printf("Errors found in extent allocation tree or chunk allocation");
+		error("errors found in extent allocation tree or chunk allocation");
 
 	ret = repair_root_items(info);
 	if (ret < 0)
-- 
2.10.2

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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