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>
This commit is contained in:
Jaegeuk Kim 2018-11-15 17:38:01 -08:00
parent 946d8f4583
commit 2367b0e9d2

View File

@ -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 {