diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-11-15 17:38:01 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-11-21 11:38:23 -0800 |
commit | 2367b0e9d25b4f46ad8e52cca6122a099368aa79 (patch) | |
tree | e9e397990e6bd3d767c27444ada1c016a9b22322 | |
parent | 946d8f458345d59c5b5f7849302706fd46893718 (diff) | |
download | f2fs-tools-2367b0e9d25b4f46ad8e52cca6122a099368aa79.tar.gz |
f2fs-tools: show versions if exist
If it's not defined, we need to skip to show the definition.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | include/f2fs_fs.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 { |