On 4/30/23 21:14, Shin'ichiro Kawasaki wrote:
When kernel version numbers have postfix letters, _have_fio_ver fail to
parse the version. For example, uname -r returns "6.3.0+", it handles
"0+" as a number and fails to parse. Fix it by dropping all letters
other than numbers or period.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
---
common/rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index af4c0b1..525867c 100644
--- a/common/rc
+++ b/common/rc
@@ -207,7 +207,7 @@ _have_kernel_option() {
_have_kver() {
local d=$1 e=$2 f=$3
- IFS='.' read -r a b c < <(uname -r | sed 's/-.*//')
+ IFS='.' read -r a b c < <(uname -r | sed 's/-.*//' | sed 's/[^.0-9]//')
if [ $((a * 65536 + b * 256 + c)) -lt $((d * 65536 + e * 256 + f)) ];
then
SKIP_REASONS+=("Kernel version too old")
Please combine the two sed statements into a single sed statement, e.g. as
follows:
sed 's/-.*//;s/[^.0-9]//'
Thanks,
Bart.