f2fs-tools: correct get kernel version logic

commit 3218ff95d9
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Current implementation, If define WITH_KERNEL_VERSION
get_kernel_uname_version just return release info, not define
WITH_KERNEL_VERSION, return release and version info.
So remove "!" in get_kernel_uname_version, make logic more clear.

Signed-off-by: lijiazi <lijiazi@xiaomi.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
This commit is contained in:
lijiazi 2021-05-14 21:15:20 +08:00 committed by dongsenhao
parent 31d2f7c45a
commit 0c15655e55

View File

@ -837,7 +837,7 @@ void get_kernel_uname_version(__u8 *version)
if (uname(&buf))
return;
#if !defined(WITH_KERNEL_VERSION)
#if defined(WITH_KERNEL_VERSION)
snprintf((char *)version,
VERSION_LEN, "%s %s", buf.release, buf.version);
#else