Linux-EROFS Archive on lore.kernel.org
 help / color / 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	[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, back to index

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

Linux-EROFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-erofs/0 linux-erofs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-erofs linux-erofs/ https://lore.kernel.org/linux-erofs \
		linux-erofs@lists.ozlabs.org linux-erofs@ozlabs.org
	public-inbox-index linux-erofs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linux-erofs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git