Whamcloud - gitweb
LU-16386 mkfs: Handle --version argument correctly 79/49379/3
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Mon, 12 Dec 2022 14:42:44 +0000 (09:42 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 20 Dec 2022 14:44:28 +0000 (14:44 +0000)
commit73ee4e7fe31f31fae6b823086f706869b50adec6
tree918f8ac897feec4f4f58c147708b35f0e69e5e13
parent40389067f5645fed903304d19dd6c58de72d0b88
LU-16386 mkfs: Handle --version argument correctly

Running mkfs.lustre with --version or -V argument
fails instead of printing the version. This patch
fixes the error.

Without patch:
--------------
$ ./lustre/utils/mkfs.lustre --version
usage: mkfs.lustre <target type> [--backfstype=ldiskfs]
<snip>

With patch:
-----------
$ ./lustre/utils/mkfs.lustre --version
mkfs.lustre 2.15.52_175_ge7aa83d

Test-Parameters: trivial fstype=zfs testlist=sanity
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I4d4d1144d669fce8b02e9f8c3fb5f45f68b337b4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49379
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/mkfs_lustre.c