linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 1/2] f2fs-tools: show versions if exist
Date: Thu, 15 Nov 2018 22:06:02 -0800	[thread overview]
Message-ID: <20181116060603.51965-1-jaegeuk@kernel.org> (raw)

If it's not defined, we need to skip to show the definition.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 include/f2fs_fs.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index cdf54e5..65cc8fd 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -1326,7 +1326,11 @@ static inline int is_qf_ino(struct f2fs_super_block *sb, nid_t ino)
 
 static inline void show_version(const char *prog)
 {
+#if defined(F2FS_TOOLS_VERSION) && defined(F2FS_TOOLS_DATE)
 	MSG(0, "%s %s (%s)\n", prog, F2FS_TOOLS_VERSION, F2FS_TOOLS_DATE);
+#else
+	MSG(0, "%s -- version not supported\n", prog);
+#endif
 }
 
 struct feature {
-- 
2.19.0.605.g01d371f741-goog

             reply	other threads:[~2018-11-16  6:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16  6:06 Jaegeuk Kim [this message]
2018-11-16  6:06 ` [PATCH 2/2] f2fs-tools: create sparse file first before stat Jaegeuk Kim
2018-11-17  2:32   ` Chao Yu
2018-11-17  2:27 ` [PATCH 1/2] f2fs-tools: show versions if exist Chao Yu

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=20181116060603.51965-1-jaegeuk@kernel.org \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).