linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] erofs-utils: simplify prints in usage()
@ 2019-10-23  6:37 Gao Xiang
  2019-10-23 15:36 ` Li Guifu
  0 siblings, 1 reply; 2+ messages in thread
From: Gao Xiang @ 2019-10-23  6:37 UTC (permalink / raw)
  To: Li Guifu, linux-erofs; +Cc: Miao Xie

Use a single puts instead, trivial update.

Suggested-by: Li Guifu <bluce.liguifu@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
---
 mkfs/main.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/mkfs/main.c b/mkfs/main.c
index 1161b3f0f7cc..ab57896e9ca8 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -44,15 +44,15 @@ static void print_available_compressors(FILE *f, const char *delim)
 
 static void usage(void)
 {
-	fprintf(stderr, "usage: [options] FILE DIRECTORY\n\n");
-	fprintf(stderr, "Generate erofs image from DIRECTORY to FILE, and [options] are:\n");
-	fprintf(stderr, " -zX[,Y]   X=compressor (Y=compression level, optional)\n");
-	fprintf(stderr, " -d#       set output message level to # (maximum 9)\n");
-	fprintf(stderr, " -x#       set xattr tolerance to # (< 0, disable xattrs; default 2)\n");
-	fprintf(stderr, " -EX[,...] X=extended options\n");
-	fprintf(stderr, " -T#       set a fixed UNIX timestamp # to all files\n");
-	fprintf(stderr, " --help    display this help and exit\n");
-	fprintf(stderr, "\nAvailable compressors are: ");
+	fputs("usage: [options] FILE DIRECTORY\n\n"
+	      "Generate erofs image from DIRECTORY to FILE, and [options] are:\n"
+	      " -zX[,Y]   X=compressor (Y=compression level, optional)\n"
+	      " -d#       set output message level to # (maximum 9)\n"
+	      " -x#       set xattr tolerance to # (< 0, disable xattrs; default 2)\n"
+	      " -EX[,...] X=extended options\n"
+	      " -T#       set a fixed UNIX timestamp # to all files\n"
+	      " --help    display this help and exit\n"
+	      "\nAvailable compressors are: ", stderr);
 	print_available_compressors(stderr, ", ");
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] erofs-utils: simplify prints in usage()
  2019-10-23  6:37 [PATCH] erofs-utils: simplify prints in usage() Gao Xiang
@ 2019-10-23 15:36 ` Li Guifu
  0 siblings, 0 replies; 2+ messages in thread
From: Li Guifu @ 2019-10-23 15:36 UTC (permalink / raw)
  To: Gao Xiang, Li Guifu, linux-erofs; +Cc: Miao Xie



On 2019/10/23 14:37, Gao Xiang wrote:
> Use a single puts instead, trivial update.
> 
> Suggested-by: Li Guifu <bluce.liguifu@huawei.com>
> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
> ---

It looks good
Reviewed-by: Li Guifu <blucerlee@gmail.com>

Thanks,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-23 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23  6:37 [PATCH] erofs-utils: simplify prints in usage() Gao Xiang
2019-10-23 15:36 ` Li Guifu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).