From: Peter Collingbourne via Linux-erofs <linux-erofs@lists.ozlabs.org>
To: xiang@kernel.org
Cc: Peter Collingbourne <pcc@google.com>, linux-erofs@lists.ozlabs.org
Subject: [PATCH] erofs-utils: Print program name and version to stdout
Date: Tue, 8 Feb 2022 16:53:07 -0800 [thread overview]
Message-ID: <20220209005307.1288161-2-pcc@google.com> (raw)
In-Reply-To: <20220209005307.1288161-1-pcc@google.com>
The program name and version is not an error message, so it should
go to stdout, not stderr.
Signed-off-by: Peter Collingbourne <pcc@google.com>
---
dump/main.c | 2 +-
fsck/main.c | 2 +-
fuse/main.c | 2 +-
mkfs/main.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dump/main.c b/dump/main.c
index b7560ec..ad1b62e 100644
--- a/dump/main.c
+++ b/dump/main.c
@@ -109,7 +109,7 @@ static void usage(void)
static void erofsdump_print_version(void)
{
- fprintf(stderr, "dump.erofs %s\n", cfg.c_version);
+ printf("dump.erofs %s\n", cfg.c_version);
}
static int erofsdump_parse_options_cfg(int argc, char **argv)
diff --git a/fsck/main.c b/fsck/main.c
index aefa881..2ebc5e9 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -43,7 +43,7 @@ static void usage(void)
static void erofsfsck_print_version(void)
{
- fprintf(stderr, "fsck.erofs %s\n", cfg.c_version);
+ printf("fsck.erofs %s\n", cfg.c_version);
}
static int erofsfsck_parse_options_cfg(int argc, char **argv)
diff --git a/fuse/main.c b/fuse/main.c
index 255965e..b7760e4 100644
--- a/fuse/main.c
+++ b/fuse/main.c
@@ -210,7 +210,7 @@ int main(int argc, char *argv[])
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
erofs_init_configure();
- fprintf(stderr, "%s %s\n", basename(argv[0]), cfg.c_version);
+ printf("%s %s\n", basename(argv[0]), cfg.c_version);
#if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE)
if (signal(SIGSEGV, signal_handle_sigsegv) == SIG_ERR) {
diff --git a/mkfs/main.c b/mkfs/main.c
index 58a6441..4325ab4 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -548,7 +548,7 @@ int parse_source_date_epoch(void)
void erofs_show_progs(int argc, char *argv[])
{
if (cfg.c_dbg_lvl >= EROFS_WARN)
- fprintf(stderr, "%s %s\n", basename(argv[0]), cfg.c_version);
+ printf("%s %s\n", basename(argv[0]), cfg.c_version);
}
int main(int argc, char **argv)
--
2.35.0.263.gb82422642f-goog
next prev parent reply other threads:[~2022-02-09 0:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-09 0:53 [PATCH] erofs-utils: Print configuration only at INFO debug level Peter Collingbourne via Linux-erofs
2022-02-09 0:53 ` Peter Collingbourne via Linux-erofs [this message]
2022-02-09 1:48 ` [PATCH] erofs-utils: Print program name and version to stdout Gao Xiang
2022-02-09 1:47 ` [PATCH] erofs-utils: Print configuration only at INFO debug level Gao Xiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220209005307.1288161-2-pcc@google.com \
--to=linux-erofs@lists.ozlabs.org \
--cc=pcc@google.com \
--cc=xiang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox